1
Normalization (1NF, 2NF, 3NF, BCNF) ★★★★★
Database
Normalization splits tables to remove redundancy and anomalies (insert, update, delete). It is based on functional dependency: A → B means A decides B.
Each normal form builds on the previous one
| Form | Rule | Example fix |
|---|---|---|
| 1NF | Every cell holds one atomic value; no repeating groups | Phone = "017.., 018.." → one row per phone |
| 2NF | 1NF and no non-key column depends on only part of a composite key | (Roll, CourseID) → CourseName depends only on CourseID → move to Course table |
| 3NF | 2NF and no non-key column depends on another non-key column | Roll → DeptID → DeptName → move DeptName to Department table |
| BCNF | For every A → B, A must be a super key | Stricter version of 3NF |
Q & A
- What is denormalization?
Adding some redundancy back on purpose (for example, storing a total) to make reads faster, at the cost of harder updates.