Normalization vs Denormalization
Overview
Normalization organizes data into multiple related tables to remove redundancy, while denormalization deliberately duplicates data across tables or documents to make reads faster. System designs constantly trade one against the other depending on whether reads or writes dominate.
Key Concepts
Normalization stores each fact exactly once and links tables through keys, following normal forms that progressively eliminate redundant and derivable data. A customer's address lives in one addresses row that others reference, so updating it touches a single place.
Denormalization intentionally repeats data - embedding a customer's name in each order, or precomputing an aggregate - so a read can be served without joins. This is common in read-heavy systems and in document or wide-column stores that lack cheap joins.
| Aspect | Normalization | Denormalization |
|---|---|---|
| Data redundancy | Minimal, single source of truth | Intentional duplication |
| Write cost | Lower, one place to update | Higher, must update every copy |
| Read cost | Joins required | Fewer joins, faster reads |
| Integrity | Easier to keep consistent | Risk of divergent copies |
A representative trade-off of normalization: it minimizes redundancy and keeps integrity easy, but read queries must join many tables, which grows expensive as data and traffic scale.
A representative trade-off of denormalization: reads are fast and join-free, but every write must update all duplicated copies, and any missed update leaves the data inconsistent.
This tension frequently tracks the SQL vs NoSQL decision: relational designs lean normalized, while many NoSQL data models are denormalized so that a single read returns everything an access pattern needs.
Trade-offs
The core trade-off is write simplicity and integrity (normalized) versus read speed (denormalized). Denormalization is essentially a precomputed cache baked into the schema, so it inherits cache problems: staleness and the need for invalidation. The right mix depends on the read/write ratio and on how tolerant the use case is of brief inconsistency.
Interview Tips
- State your read/write ratio, then justify the level of normalization from it.
- If you denormalize, immediately explain how you keep copies in sync (dual writes, async updates, or periodic rebuilds).
- Avoid absolute claims; most systems normalize the core and denormalize hot read paths.
Summary
- Normalization removes redundancy by splitting data into related tables.
- Denormalization duplicates data to serve reads without joins.
- Normalization trade-off: easy integrity but costly joins on reads.
- Denormalization trade-off: fast reads but every write must update duplicates.
- The choice follows the read/write ratio and often tracks the SQL-vs-NoSQL decision.