Chapter 4 — Data models
Lesson map
Lesson 04 published. Map, example, EX010.
flowchart TD
N0["Learning outcomes"]
N1["4.1 Modelling network records"]
N2["4.2 Formats for exchange"]
N3["4.3 Accuracy and maintenance"]
N4["4.4 Personal data in records"]
N5["Synthesis"]
N0 --> N1 --> N2 --> N3 --> N4 --> N5
N5 --> EX["Worked example"]
EX --> Q["Exercise EX010"]
Logical drawing
flowchart LR
N0["Learning outcomes"]
N1["4.1 Modelling network records"]
N2["4.2 Formats for exchange"]
N3["4.3 Accuracy and maintenance"]
N4["4.4 Personal data in records"]
N5["Synthesis"]
N0 --> N1 --> N2 --> N3 --> N4 --> N5 --> Q["EX010"]
[Learning outcomes]
|
v
[4.1 Modelling network records]
|
v
[4.2 Formats for exchange]
|
v
[4.3 Accuracy and maintenance]
|
v
[4.4 Personal data in records]
|
v
[Synthesis]
|
v
[Worked example] --> [Exercise EX010]
Learning outcomes
You will (1) design simple data models for network records; (2) keep data accurate; (3) protect personal data.
4.1 Modelling network records
A data model decides what is recorded and how records relate. For the school, Tomás models devices, networks and owners. Each device record has a unique name, type, location, network group and owner. Each network group has a name, purpose and address range. Owners are roles, such as "science department head", rather than individuals where possible, so records stay valid when staff change. A clear model makes the inventory easy to query and helps prevent inconsistent entries, such as the same printer recorded twice under different names.
4.2 Formats for exchange
Data often moves between tools in formats such as CSV for tables and JSON for structured records. Tomás uses CSV for the inventory because Gareth can open it in a spreadsheet, and JSON for configuration summaries because it handles nested values. Python's standard library reads both. He documents each file's columns or fields, including units and allowed values, so that anyone receiving the data understands it. Undocumented formats lead to misreadings, such as treating a port number column as text.
4.3 Accuracy and maintenance
Records decay as devices are added, moved and removed. Tomás suggests that Gareth updates the inventory whenever he changes a device, and that a monthly script compares the inventory with devices seen on the network. Differences are investigated: unknown devices may be unauthorised, and listed devices not seen may have been retired. Keeping data accurate is a habit, not a project. A stale inventory is in some ways worse than none, because people trust it and make decisions on information that is no longer true.
4.4 Personal data in records
Network records can contain personal data, such as which student uses which laptop. Schools hold data about children, which carries extra legal care. Tomás records only what security needs: device assignments to staff roles, and student devices by year group rather than by name, unless the school's data protection lead approves otherwise. Data minimisation reduces harm if records leak and keeps the inventory focused. Tomás discusses the model with the school's data protection lead before using it, which also builds trust in his placement.
Worked example
The inventory model has three linked tables and is approved by the data protection lead with student devices recorded by year group.
Synthetic case. The model is synthetic.
Errors and limits
Recording individual names where roles would do creates unnecessary personal data.
Exercises
- EX010 — Owners as roles. Why record owners as roles rather than individuals? Rubric: 3 = records stay valid when staff change;; 2 = stability;; 1 = privacy only;; 0 = none.
- EX011 — Format choice. Why use CSV for the inventory? Rubric: 3 = technician can open in spreadsheet;; 2 = easy;; 1 = required;; 0 = none.
- EX012 — Student data minimisation. How are student devices recorded? Rubric: 3 = by year group unless approved otherwise;; 2 = year group;; 1 = by name;; 0 = none.
Synthesis
Simple, documented, accurate and minimal data models support every later security task.
Continue studying — chapter 04 of 30
← Chapter 03 (draft) · Course chapter index · Chapter 05 (draft) →