Question presented to candidate: "What is database normalization? Walk me through 1NF, 2NF and 3NF with an example, and tell me what problems normalization actually prevents."
What a strong answer should cover:
- Normalization is the process of splitting tables so that each fact is stored once, in the table whose key it depends on, to remove redundancy and the update, insert and delete anomalies it causes
- The normal forms as rules about keys and functional dependencies: 1NF (atomic values, no repeating groups), 2NF (no non-key column depends on only part of a composite key), 3NF (no non-key column depends on another non-key column), BCNF (every determinant is a candidate key)
- A concrete decomposition: a flat orders sheet split into customers, products, orders and order_items, joined back with foreign keys and no information lost
- Subtle modelling points: a price at the time of sale belongs on the order line, not on the product; a repeated value is not always redundancy
- Trade-off: more tables and joins on reads, cleaner writes and constraints; most OLTP schemas aim for 3NF and denormalize deliberately where reads demand it
Code / implementation expected: Optional β queries that expose redundancy in a flat table, and the normalized tables joined back into the same report.
Schema used by the examples: