8.1.5 Normalising Data to Third Normal Form
Normalisation is a systematic way to turn loosely organised data into related tables. At each stage, the designer studies which attributes determine other attributes and separates facts that belong to different entities.
By the end of this section, you should be able to:
- Explain how normalisation reduces redundancy and update problems.
- Identify repeating groups and atomic values.
- Convert unnormalised data into First Normal Form.
- Remove partial dependencies to reach Second Normal Form.
- Remove transitive dependencies to reach Third Normal Form.
- Explain why a given table is or is not in 3NF.
- Produce a normalised design from a description, dataset or set of tables.
Why Normalise Data?
A single large table may repeat the same facts many times. Repetition wastes storage, but the more serious problem is that several copies of one fact can become inconsistent. Normalisation separates facts according to what they describe.
| Design problem | What can happen | Example consequence |
|---|---|---|
| Update anomaly | The same fact must be changed in several tuples. | One copy of a team's base is updated while another keeps the old value. |
| Insertion anomaly | A fact cannot be stored until an unrelated fact also exists. | A new team cannot be recorded until it makes an equipment request. |
| Deletion anomaly | Deleting one tuple accidentally removes another useful fact. | Deleting a team's final request also removes the only stored team details. |
Functional Dependencies
To normalise confidently, ask which attribute values determine other attribute values. The notation X → Y means that one value of X determines one value of Y.
In the expedition example used throughout this lesson:
These dependencies reveal four different kinds of fact: a request, a team, an item and the quantity of one item included in one request.
Starting with Unnormalised Data
A field-research organisation records an equipment request on one digital form. One request has one date and one team, but it can include several requested items.
| ItemID | Description | Unit mass | Quantity |
|---|---|---|---|
| I-208 | Water-quality probe | 1.4 kg | 3 |
| I-315 | Solar charger | 0.8 kg | 5 |
| I-422 | Sample case | 2.2 kg | 2 |
As an unnormalised attribute list, the repeating part can be shown inside nested brackets:
The group of item attributes repeats because one request can contain several items. A relational design must not store this list in one cell or use numbered fields such as Item1, Item2 and Item3.
First Normal Form: Remove Repeating Groups
A relation is in First Normal Form (1NF) when every field contains one atomic value, there are no repeating groups, and each tuple can be identified by a key.
One way to create 1NF is to place each request–item combination in its own tuple:
The compound primary key is (RequestID, ItemID). It identifies one item line within one request.
| RequestID | ItemID | RequestDate | TeamID | TeamName | TeamBase | ItemDescription | UnitMassKg | Quantity |
|---|---|---|---|---|---|---|---|---|
| RQ-731 | I-208 | 2027-04-08 | T-14 | Aurora Survey | North Depot | Water-quality probe | 1.4 | 3 |
| RQ-731 | I-315 | 2027-04-08 | T-14 | Aurora Survey | North Depot | Solar charger | 0.8 | 5 |
| RQ-731 | I-422 | 2027-04-08 | T-14 | Aurora Survey | North Depot | Sample case | 2.2 | 2 |
This relation is in 1NF because every cell contains one value. However, it still repeats request, team and item details, so it is not yet in 2NF.
Second Normal Form: Depend on the Whole Key
A table is in Second Normal Form (2NF) when it is already in 1NF and every non-key attribute depends on the whole of every compound candidate key.
| Non-key attribute | What determines it? | 2NF decision |
|---|---|---|
| RequestDate, TeamID, TeamName, TeamBase | RequestID only | Move to a Request table. |
| ItemDescription, UnitMassKg | ItemID only | Move to an Item table. |
| QuantityRequested | RequestID + ItemID | Keep in the link table. |
The 2NF design is:
RequestItem keeps QuantityRequested because the quantity is not a property of the item alone or of the request alone. It describes one specific item within one specific request.
Third Normal Form: Remove Non-Key Dependencies
A table is in Third Normal Form (3NF) when it is already in 2NF and its non-key attributes do not depend on other non-key attributes.
In Request, the dependency chain is:
TeamName and TeamBase describe a team, not a request. Keeping them in Request would repeat those values every time the same team makes another request.
The final 3NF design is:
| Table | Primary key | Foreign key(s) | Why it is in 3NF |
|---|---|---|---|
| Team | TeamID | — | TeamName and TeamBase depend directly on TeamID. |
| Request | RequestID | TeamID | RequestDate and TeamID describe the request; no non-key attribute determines another. |
| Item | ItemID | — | ItemDescription and UnitMassKg depend directly on ItemID. |
| RequestItem | RequestID + ItemID | RequestID, ItemID | QuantityRequested depends on the complete compound key. |
Explaining Whether Tables Are in 3NF
The syllabus requires more than carrying out a familiar worked example. You must be able to inspect unfamiliar tables and justify your conclusion.
Check 1NF: Are values atomic? Are repeating groups absent? Is each tuple identifiable?
Check 2NF: For every compound candidate key, does each non-key attribute depend on the whole key?
Check 3NF: Does any non-key attribute determine another non-key attribute?
| Given table | 3NF? | Reason |
|---|---|---|
| Employee(EmployeeID, EmployeeName, DepartmentID, DepartmentName) | No | DepartmentID → DepartmentName, so a non-key attribute determines another non-key attribute. |
| Employee(EmployeeID, EmployeeName, DepartmentIDFK) | Yes, assuming the stated dependencies | Each non-key attribute depends directly on EmployeeID, with no partial or transitive dependency shown. |
| Enrolment(StudentID, CourseID, StudentName, Grade) | No | StudentName depends only on StudentID, part of the compound key. |
| Enrolment(StudentID, CourseID, Grade) | Yes, assuming one grade per student–course pairing | Grade depends on the complete compound key. |
A Reliable Method for Normalisation Questions
- List the attributes and mark any repeating group.
- Choose a primary key for each emerging table.
- Create 1NF by making values atomic and removing repeated sets.
- Write the dependencies rather than guessing where attributes belong.
- Create 2NF by removing attributes that depend on only part of a compound key.
- Create 3NF by removing dependencies between non-key attributes.
- Add foreign keys so the separated tables remain connected.
- Check the final design table by table and explain why each is in 3NF.
Interactive: Normalisation Step Builder
Move through the same expedition request from unnormalised data to 3NF. At each stage, the widget shows the current relations, the dependency problem and the design decision.
Common Mistakes and Misconceptions
- Assuming atomic values alone prove that a table is in 3NF.
- Using the sample values to guess dependencies instead of using the meaning of the data.
- Removing every repeated value, including valid foreign-key repetition.
- Checking 2NF without first identifying the complete candidate key.
- Moving an attribute that depends on the whole compound key.
- Calling a transitive dependency a partial dependency, or vice versa.
- Creating new tables but forgetting their primary keys.
- Splitting data without adding the foreign keys needed to reconstruct the original information.
- Stating that a table is in 3NF without explaining the dependencies.
Practice
Original practice tasks
- Define repeating group, partial dependency and transitive dependency.
- Explain why RequestItemFlat is in 1NF but not in 2NF.
- Explain why QuantityRequested remains in RequestItem after conversion to 2NF.
- Explain why Request(RequestID, RequestDate, TeamID, TeamName, TeamBase) is in 2NF but not in 3NF.
- A relation has the key (PatientID, AppointmentDate) and includes PatientName, DoctorID and ConsultationLength. PatientName depends only on PatientID. Identify the normalisation problem and propose a correction.
- Determine whether Room(RoomID, Capacity, BuildingID, BuildingName) is in 3NF. State any assumption you make.
- A bicycle-hire form stores HireID, HireDate, CustomerID, CustomerName and a repeating list of BicycleID, BicycleType and HoursUsed. Produce a 3NF design.
- Explain one update anomaly and one deletion anomaly that normalisation can reduce.
Review
| Stage | Condition | Problem removed | Typical action |
|---|---|---|---|
| 1NF | Atomic values, no repeating groups and identifiable tuples | Repeated sets within one record | Make one tuple per occurrence and define a key |
| 2NF | 1NF plus full dependency on every compound candidate key | Partial dependencies | Move attributes determined by part of the key |
| 3NF | 2NF plus no dependency of a non-key attribute on another non-key attribute | Transitive dependencies | Create a table for the intermediate determinant |