schema design

Normalization

Organize tables so each fact lives in one place — eliminating update anomalies and redundancy.

Normalization is the discipline of organising tables so that each fact is stored exactly once. When data is duplicated across rows — a customer's address copied onto every one of their orders — you get update anomalies: change the address and you must find and update every copy, miss one and the data is now inconsistent. Normalization eliminates that class of bug by giving every piece of information a single authoritative home, with relationships expressed through keys rather than repetition.

Don't copy your address into every order — store it once in the customer table and reference it.

Key Concepts

1
The progression is captured in normal forms. First Normal Form requires atomic column values and no repeating groups — no comma-separated lists stuffed into a single field. Second Normal Form removes partial dependencies: every non-key column must depend on the whole primary key, not just part of a composite key. Third Normal Form removes transitive dependencies: non-key columns must depend only on the key, not on other non-key columns (storing a customer's city and their country's calling code in the orders table violates this). The practical target for most systems is 3NF (or the slightly stricter Boyce-Codd Normal Form), at which point each table represents one entity, every column describes that entity's key, and shared facts are referenced via foreign keys instead of duplicated.
2
The benefits are integrity and efficient writes — there is one place to update, so inconsistency becomes structurally impossible — plus less storage and clearer modelling. The cost, and the natural lead-in to denormalization, is that answering a query may now require joining several tables back together, which can be slower for read-heavy workloads. The mature view interviewers look for is that you normalise to model the data correctly by default, and denormalise selectively and deliberately only where measured read performance demands it.