Database Normalization
Organizing tables to eliminate redundancy and keep data consistent.
Why Normalize?
Without normalization, the same data can get duplicated across rows, leading to update anomalies â you might update one copy and forget another, causing inconsistent data.
1NF, 2NF, 3NF
1NF: every column holds atomic (indivisible) values, no repeating groups. 2NF: 1NF + every non-key column depends on the WHOLE primary key (no partial dependency). 3NF: 2NF + no non-key column depends on another non-key column (no transitive dependency).
Trade-off
Highly normalized databases reduce redundancy but can require more joins to fetch related data. In practice, systems sometimes denormalize slightly for read performance â it's a balance, not a strict rule.
đ Real-World Use
An e-commerce database normalizes Customer, Order, and Product into separate tables instead of repeating customer details in every order row â this way, updating a customer's address changes it in one place, not thousands of order records.
đĄ Pro Tip
In interviews, always give an example while explaining normal forms â e.g. 'if a Student table stores Course_Name alongside Course_ID, that's a transitive dependency, violating 3NF' â examples show real understanding, not memorized definitions.
đ§Ē Quick Self-Test
Check what you just learned â no pressure, just practice.
1. What does 1NF require?
2. A transitive dependency violates which normal form?