| Lesson 11 | Limitations of 2NF |
| Objective | Describe the limitations of Second Normal Form during the normalization process. |
Second Normal Form (2NF) is a significant milestone in the normalization process. It addresses a specific class of design defect - partial dependency in tables that use a composite primary key. When a relation is in 2NF, every non-key attribute is fully functionally dependent on the entire primary key, not just part of it.
That is a meaningful improvement over 1NF, but it is not the finish line. A table in 2NF can still contain repeated values, insertion anomalies, deletion anomalies, and modification anomalies. The reason is that 2NF addresses only the relationship between non-key attributes and the primary key. It says nothing about dependencies among non-key attributes themselves. Those are addressed by Third Normal Form.
The diagram below illustrates the limitations of 2NF using an Enrollment table with a composite
primary key of (StudentID, CourseID).
The original Enrollment table mixes data about three distinct entities - students, courses, and enrollments - in a single table:
| StudentID (PK part) | CourseID (PK part) | StudentName | CourseTitle | Grade |
|---|---|---|---|---|
| S001 | C101 | Alice | Intro to DB | A |
| S001 | C102 | Alice | Programming | B |
| S002 | C101 | Bob | Intro to DB | C |
Two partial dependencies are visible immediately:
StudentID → StudentName - StudentName depends only on StudentID, not on
the full composite key (StudentID, CourseID). Alice's name appears twice because
she is enrolled in two courses.CourseID → CourseTitle - CourseTitle depends only on CourseID. "Intro to
DB" appears twice because two different students are enrolled in that course.
Only Grade depends on the full composite key: (StudentID, CourseID) → Grade.
These partial dependencies cause three anomalies:
Decomposing the Enrollment table into three separate tables eliminates all partial dependencies:
| Students | |
| StudentID (PK) | StudentName |
|---|---|
| S001 | Alice |
| S002 | Bob |
| Courses | |
| CourseID (PK) | CourseTitle |
|---|---|
| C101 | Intro to DB |
| C102 | Programming |
| Enrollments | ||
| StudentID (FK) | CourseID (FK) | Grade |
|---|---|---|
| S001 | C101 | A |
| S001 | C102 | B |
| S002 | C101 | C |
Every non-key column now depends on the entire primary key of its table. No partial dependencies remain. The decomposition is complete - and the three anomalies are gone.
Second Normal Form resolves partial dependencies, but it does not resolve all anomalies. The following CD table illustrates a problem that 2NF does not prevent:
| CD | |||||
| CDNo | Title | Price | CatNo | CatName | DistId |
|---|---|---|---|---|---|
| 101 | Tales 1 | 14.95 | 1 | YA-8 | 101 |
| 102 | Tales 2 | 13.95 | 1 | YA-8 | 101 |
| 102 | Tales 2 | 13.95 | 1 | YA-8 | 102 |
| 103 | Tales 3 | 12.95 | 2 | YA-11 | 102 |
In relational notation: CD (CDNo, Title, Price, CatNo, CatName, DistID)
CatNo and CatName repeat across multiple rows. This creates the same
three anomalies:
CatNo=1 must be updated. A missed row creates an inconsistency.The normalization process is signaling that "category" is its own concept and belongs in a separate table. But 2NF alone does not force this decomposition when the primary key is a single column - because there can be no partial dependency on a single-column key.
For further reading on database normalization: Data Analysis for DB Design
2NF answers one specific question: does every non-key attribute depend on the whole primary key? It does not answer: do non-key attributes depend on other non-key attributes? That second question is the domain of Third Normal Form.
Five specific limitations of 2NF:
Key → A and
A → B, then B is transitively dependent on the key through A. 2NF places no
restriction on this pattern. Transitive dependencies are a primary cause of update anomalies
in 2NF-compliant tables.
The most important limitation of 2NF is that it leaves transitive dependencies unresolved. A transitive dependency occurs when:
X --> Y and Y --> Z (therefore X --> Z transitively)
Where X is the primary key and Y and Z are both non-key attributes. The dependency of Z on X runs through Y rather than directly.
Consider an Item table where each item comes from one distributor, and each distributor has one warehouse phone number:
Item (item_numb, title, distrib_numb, warehouse_phone_number)
The primary key is item_numb - a single column, so the table is automatically in 2NF.
But the functional dependencies reveal a transitive dependency:
item_numb --> distrib_numb
distrib_numb --> warehouse_phone_number
therefore:
item_numb --> warehouse_phone_number (transitively)
The warehouse phone number is a fact about the distributor, not about the item. Storing it in the Item table causes the same three anomalies:
This relation satisfies 2NF but remains poorly designed. That is the core practical limitation of 2NF: it does not prevent transitive dependencies, and transitive dependencies cause anomalies.
The solution is Third Normal Form decomposition: move the distributor data into a separate
Distributor table where distrib_numb is the primary key, and replace
warehouse_phone_number in the Item table with a foreign key reference to Distributor.
The next lesson introduces Third Normal Form.