Third Normal Form (3NF)
Goal:
- Be in 2NF AND
- Eliminate transitive dependencies (non-key columns must depend only on the primary key, not on other non-key columns).
A table in 2NF but NOT in 3NF:
| student_id | student_name | student_zipcode | zipcode_city |
|---|---|---|---|
| 1 | Alice | 12345 | New York |
| 2 | Bob | 67890 | Los Angeles |
Problem:
zipcode_citydepends onstudent_zipcode, not directly onstudent_id.- This is a transitive dependency:
student_id → student_zipcode → zipcode_city.
Fix — Table in 3NF:
Split into two tables:
Students
| student_id | student_name | student_zipcode |
|---|---|---|
| 1 | Alice | 12345 |
| 2 | Bob | 67890 |
Zipcodes
| student_zipcode | zipcode_city |
|---|---|
| 12345 | New York |
| 67890 | Los Angeles |
✅ Now, all non-key columns depend only on the primary key.
Summary Table
| Normal Form | What It Fixes | Requirement |
|---|---|---|
| 1NF | Repeating groups, multivalued columns | Atomic values (no lists or sets inside fields). |
| 2NF | Partial dependencies | No non-key column depends on part of a composite key. |
| 3NF | Transitive dependencies | No non-key column depends on another non-key column. |
🎯 In Simple Words:
- 1NF: One value per cell.
- 2NF: No partial key dependency.
- 3NF: No indirect dependency.