DBMS Topics
Second Normal Form 2NF
Last Updated : 21 May, 2026
A relation is in Second Normal Form 2NF if:
Definition
A relation is in Second Normal Form (2NF) if:
- It is in 1NF, AND
- Every non-prime attribute is fully functionally dependent on the entire primary key (no partial dependencies)
A partial dependency occurs when a non-key attribute depends on only a part of a composite primary key. 2NF is automatically satisfied if the primary key has only one attribute.
Identifying Partial Dependencies
| Relation | OrderDetail(OrderID, ProductID, ProductName, Quantity, UnitPrice) |
| Primary Key | (OrderID, ProductID) |
| (OrderID, ProductID) | Quantity ← Full ✓ |
| ProductID | ProductName ← PARTIAL ✗ (depends on part of PK) |
| ProductID | UnitPrice ← PARTIAL ✗ |
Decomposition to 2NF
Remove each partial dependency into a separate table:
| Step 1 | Identify partial FDs: |
| ProductID | ProductName, UnitPrice |
| Step 2 | Create new table for each partial dependency: |
| Step 3 | Remove those attributes from original (keep FK): |
| FK: ProductID | Product.ProductID |
Another Example
| PK | (SID, CID) |
| SID | SName, SEmail (student info depends only on SID) |
| CID | CName, Credits (course info depends only on CID) |
| (SID, CID) | Grade (grade needs both — FULL ✓) |
Visual: Before and After 2NF
BEFORE (Partial Dependencies)
┌──────────────────────────────────────────┐
│ StudentCourse(SID, CID, SName, Grade) │
│ ↑ ↑ │
│ Composite PK │
│ SID ──────────────────► SName (✗ partial)│
│ (SID,CID) ────────────► Grade (✓ full) │
└──────────────────────────────────────────┘
AFTER (2NF)
Student(SID, SName)
Enrollment(SID, CID, Grade)
Key Points
- 2NF applies only when there is a composite primary key
- Single-attribute PK → relation in 1NF is automatically in 2NF
- After 2NF, transitive dependencies may still exist (fixed in 3NF)
Exam Focus
Revise definitions, diagrams, examples, and short-answer points for Second Normal Form 2NF.
Interview Use
Prepare one clear explanation, one practical example, and one common mistake for this DBMS topic.
Search Terms
dbms, database management system, database notes, sql, unit, second, normal, form
Related DBMS Topics