Data Normalization
Problem What is data normalization in a relational database, and why is it used?
Be ready to discuss
- The core goal: organise tables and columns to eliminate redundant storage of the same fact in more than one place.
- The update, insert, and delete anomalies that redundancy causes, with a concrete example of each.
- The normal forms in order: 1NF (atomic values, no repeating groups), 2NF (no partial dependency on part of a composite key), 3NF (no transitive dependency on non-key attributes), and BCNF (every determinant is a candidate key).
- Functional dependencies and candidate keys as the formal machinery that decides which normal form a schema satisfies.
- The read-side cost: a more normalized schema needs more joins, so hot query paths can get slower.
- Deliberate denormalization - materialized views, summary tables, duplicated columns - and the consistency burden it adds.
- When to break the rules: analytics/warehouse schemas (star and snowflake) and document stores intentionally denormalize for read performance.
asked …