EMRS Computer Science candidates, preparing for teaching posts in the Eklavya Model Residential Schools, often revise Database Management Systems (DBMS), networks and cyber safety as three unrelated lists. The connection becomes harder to see when a question wraps them inside a school-lab situation. In the invented residential-school lab below, one sign-in travels from PC-B12 in Lab 2 across a subnetted client network to a normalized database row, and every control that could stop a stolen password sits somewhere on that path.
EMRS Computer Science lab model: four labs, 120 PCs and two servers
The model has four labs, L1 to L4, with 30 client PCs each, so 4 x 30 = 120. It has 240 student accounts, S001 to S240. APP-SRV at 10.0.0.20 runs the application, while DB-SRV at 10.0.0.10 sits on a separate server network.
We follow Meera, S014 from house H2, signing in on PC-B12 in L2 at 2026-07-15 10:00.
Every campus detail, count and address here is invented for teaching, not drawn from a real EMRS school. For how the two selection tiers differ in what they test, see EMRS Computer Science: Tier 1 vs Tier 2, and EMRS Computer Science Exam Preparation gathers the material for the rest of the syllabus.
DBMS design: turn a repetitive lab sheet into four tables
Suppose the first design is one relation:
LabUse(StudentID, StudentName, HouseID, DeviceID, LabID, LabRoom, GatewayIP, LoginAt)
StudentID | StudentName | HouseID | DeviceID | LabID | LabRoom | GatewayIP | LoginAt |
|---|---|---|---|---|---|---|---|
S014 | Meera | H2 | PC-B12 | L2 | Room-102 | 192.168.40.65 | 2026-07-15 10:00 |
S014 | Meera | H2 | PC-B19 | L2 | Room-102 | 192.168.40.65 | 2026-07-16 10:00 |
S031 | Arjun | H3 | PC-B12 | L2 | Room-102 | 192.168.40.65 | 2026-07-16 11:00 |
The dependencies are StudentID -> StudentName, HouseID, DeviceID -> LabID, and LabID -> LabRoom, GatewayIP. The candidate key is (StudentID, DeviceID, LoginAt). Repeating Meera's details risks inconsistent corrections. Repeating L2's room and gateway causes update anomalies; deleting its final use row could erase the lab description.
Decompose it into Student(StudentID PK, StudentName, HouseID), Lab(LabID PK, LabRoom, GatewayIP), Device(DeviceID PK, LabID FK), and LabUse(StudentID FK, DeviceID FK, LoginAt, PK(StudentID, DeviceID, LoginAt)). The split clears two distinct violations. StudentID -> StudentName, HouseID and DeviceID -> LabID were partial dependencies on part of the key (StudentID, DeviceID, LoginAt), a Second Normal Form (2NF) failure. LabID -> LabRoom, GatewayIP reached one non-key attribute through another, the transitive dependency Third Normal Form (3NF) removes. All four relations are now in 3NF, the foreign keys rebuild the student, device and lab path, and the joins stay lossless. The DBMS normalization guide runs the same two tests on other schemas.

SQL and constraints: find labs with repeated open incidents
The Device rows map PC-B12 and PC-B19 to L2, PC-C04 and PC-C11 to L3, and PC-D02 to L4. Add Incident(IncidentID PK, DeviceID FK, IncidentType, Status) with these rows: I01, PC-B12, PHISHING, OPEN; I02, PC-B19, MALWARE, CLOSED; I03, PC-B12, WEAK_PASSWORD, OPEN; I04, PC-C04, MALWARE, OPEN; I05, PC-C11, MALWARE, CLOSED; and I06, PC-D02, PHISHING, OPEN.
SELECT d.LabID, COUNT(*) AS open_incidents
FROM Incident AS i
JOIN Device AS d ON d.DeviceID = i.DeviceID
WHERE i.Status = 'OPEN'
GROUP BY d.LabID
HAVING COUNT(*) >= 2;The join first attaches a LabID to every incident. WHERE keeps I01, I03, I04 and I06 before grouping. Their counts are L2 = 2, L3 = 1 and L4 = 1. HAVING then filters the completed groups, leaving one result: L2 | 2.
WHERE filters rows, while HAVING filters groups. A PRIMARY KEY uniquely identifies its own row. A FOREIGN KEY need not be unique, but it prevents an incident from naming an unknown DeviceID when referential integrity is enforced.
Computer Networks: divide one /24 into four lab subnets
Start with 192.168.40.0/24. Four equal networks need two borrowed host bits because 2^2 = 4, making the prefix /26. Each subnet has 2^(32-26) = 2^6 = 64 addresses and, conventionally, 64 - 2 = 62 usable host addresses. Thirty PCs, one printer, one access point and one gateway need 33, so they fit.
Lab | Network | Gateway | Usable range | Broadcast |
|---|---|---|---|---|
L1 |
|
|
|
|
L2 |
|
|
|
|
L3 |
|
|
|
|
L4 |
|
|
|
|
The block size is 64, so the network addresses advance as 0, 64, 128 and 192. Therefore 192.168.40.190 is L3's last usable address, but 192.168.40.191 is its broadcast address and cannot be assigned to a PC in this model.
A switch connects devices within a local network. A router or Layer 3 switch moves traffic between IP subnets. Private addressing helps organise an internal network, but it does not encrypt traffic or make that traffic automatically secure.
Cyber safety: trace a phishing attempt to the database boundary
In a fictional incident on 2026-07-15, S014 enters a password through a fake portal link on PC-B12, and an attacker tries to reuse it. Reading student records breaks confidentiality, changing LabUse breaks integrity, and encrypting the service to stop access breaks availability.
Least privilege limits damage. A student may view only their session history; a teacher may read class summaries; a lab assistant may insert sessions and update device status; only the database administrator may change the schema or restore backups. No role shares an administrator password.
Client lab virtual local area networks (VLANs) may reach APP-SRV at 10.0.0.20 over TCP 443, but not DB-SRV at 10.0.0.10 directly, so a compromised client cannot query the database. Only APP-SRV may open TCP 5432, PostgreSQL's default listener. MySQL listens on 3306 and Microsoft SQL Server on 1433, so read the port from your own server.
Pair segmentation with multi-factor authentication, patching, phishing reporting and tested backups. Never share passwords or one-time passwords; verify the sign-in domain before typing either. Report cyberbullying or suspicious messages to an authorised adult, preserving evidence without forwarding harmful content.

DBMS, networking and cyber-safety misconceptions to remove
Claim | Verdict | Correction |
|---|---|---|
A foreign key must be unique. | False | Many devices may share one |
3NF means putting every attribute in its own table. | False | Decompose only where a dependency demands it, and keep the joins lossless. |
Deleting the duplicated lab columns is enough. | False | Store |
A switch and a router always do the same job. | False | Switches serve a LAN; routers join networks. A Layer 3 switch can route. |
A | False | It has 64 total and conventionally 62 usable. |
A private IPv4 address encrypts traffic. | False | Addressing is not encryption. |
HTTPS proves any login page is trustworthy. | False | Phishing domains can use HTTPS, so verify the domain. |
Antivirus alone protects the database. | False | Defence also needs privilege limits, segmentation, authentication, updates, logging and backups. |
The EMRS Computer Science syllabus also reaches into computer fundamentals, operating-system basics and MS Office, which Computer Fundamentals for CS Teaching Exams covers.
How EMRS can turn these concepts into questions
The NESTS ESSE-2025 TGT Computer Science syllabus names Database Management and Computer Networks as separate blocks, and lists Cyber safety inside Society, Law and Ethics beside phishing and identity protection. Its Database Management block goes down to candidate and foreign keys and to GROUP BY with HAVING. Check the NESTS site for the notification and syllabus governing your own cycle, since the PGT and TGT documents list different blocks.
Concept checks include identifying a candidate key or foreign key, finding an update anomaly, predicting the SQL result L2 | 2, calculating a subnet boundary, distinguishing a switch from a router, spotting a phishing control, or mapping an incident to confidentiality, integrity or availability.
Three quick answers follow from the model: L2's gateway is .65; L3's broadcast is .191; and HAVING COUNT(*) >= 2 returns L2 with 2 open incidents.
The short version: redraw the system before more practice
Without looking back, redraw the four-table 3NF schema, reproduce the four /26 ranges, and explain where the PC-B12 phishing chain should be stopped by the user, application and network controls. If you need a connected course sequence, Computer Science Fundamentals for Placements by Sanchit Sir includes DBMS, Computer Networks and Network Security, though the pedagogy parts of the paper still need separate work. Finally, recompute 2^2 = 4, 2^(32-26) = 64 and 64 - 2 = 62, then explain why normalization and segmentation both limit the damage from one bad record or one compromised account.




