KevsRobots Learning Platform
By Kevin McAleer, 3 Minutes
The Third Normal Form (3NF) builds on First Normal Form (1NF) and Second Normal Form (2NF). It helps eliminate data redundancy and improves data integrity in relational databases.
To achieve 3NF, the following conditions must be met:
In other words, every column should describe the key, not some other column.
By eliminating transitive dependencies, 3NF helps prevent update, insertion and deletion anomalies.
Suppose we have a table called “Students” with the columns Student_ID, Student_Name, Tutor_ID and Tutor_Room:
| Student_ID | Student_Name | Tutor_ID | Tutor_Room |
|---|---|---|---|
| 1 | Alice | T1 | Lab 3 |
| 2 | Bob | T2 | Room 12 |
| 3 | Charlie | T1 | Lab 3 |
| 4 | Dana | T1 | Lab 3 |
The primary key is Student_ID. Tutor_ID depends on the student, which is fine. But Tutor_Room depends on Tutor_ID, not on the student. That’s a transitive dependency: Student_ID → Tutor_ID → Tutor_Room.
This causes problems:
To normalise to 3NF, move the tutor details into their own table:
| Student_ID | Student_Name | Tutor_ID |
|---|---|---|
| 1 | Alice | T1 |
| 2 | Bob | T2 |
| 3 | Charlie | T1 |
| 4 | Dana | T1 |
| Tutor_ID | Tutor_Room |
|---|---|
| T1 | Lab 3 |
| T2 | Room 12 |
Now each tutor’s room is stored once. Moving a tutor means changing one row, and a tutor can exist without any students. You can still get the original view back with a JOIN.
Quick quiz
In the original table, why is Tutor_Room a problem?
You can use the arrows ← → on your keyboard to navigate between lessons.
Comments