Side by side
| Dimension | Normalization | Denormalization |
|---|---|---|
| Data organization | Separate facts according to their dependencies | Duplicate facts or store derived results |
| Read path | May require joins or multiple lookups | Can serve targeted reads with fewer lookups |
| Write path | Usually fewer copies of each fact to update | May require fan-out or aggregate maintenance |
| Integrity | Reduces insertion, update, and deletion anomalies | Requires keeping redundant representations aligned |
| Freshness | Read authoritative facts under chosen isolation | Transactional copies or asynchronously refreshed views |
| Storage | Less repeated data, with relational overhead | More copies, projections, or stored aggregates |
| Distributed queries | Related data may require cross-partition reads | Can colocate data needed by one access pattern |
| Operational work | Tune joins, indexes, and data placement | Also handle rebuilds, lag, and reconciliation |
The differences that matter
Normalization is about functional dependencies, not simply having more tables. For example, keep a customer's current contact information in a customer record instead of repeating it on every order. This avoids updating many orders when the customer's phone number changes. An order's shipping address at purchase time is a different fact, so storing that historical snapshot is not automatically unnecessary duplication.
Denormalization moves work from reads to writes or background processing. A restaurant's rating sum and review count let a listing page calculate an average without scanning its reviews. The trade-off is maintaining those aggregates correctly when reviews are created, edited, deleted, or replayed after a failure.
Neither approach determines consistency by itself. Redundant fields in one database can be updated in the same transaction. A read model maintained through events or change data capture usually has some lag and needs retry-safe processing, ordering rules, and a repair path. Normalization also does not make reads from asynchronous replicas immediately fresh.
Choose based on access patterns and measured costs, not a blanket rule about joins. An indexed join within one database can be inexpensive; joining across shards or services can add network calls and failure dependencies. A common design keeps normalized authoritative records while maintaining selected denormalized projections for feeds, search, or dashboards.
Choose Normalization when
- The same facts appear in many workflows, and updates must preserve constraints without coordinating many redundant copies.
- Related records fit within one transactional database, and indexed joins meet the read latency target.
- Query requirements are still changing, so committing to several specialized read models would create premature maintenance work.
- Frequently changing shared attributes would cause large update fan-out if copied into dependent records.
Choose Denormalization when
- A frequent, well-defined read repeatedly performs expensive joins or aggregation after reasonable indexing and query tuning.
- A latency-sensitive endpoint otherwise needs multiple cross-shard or cross-service lookups.
- Derived results such as rating totals or feed entries can be maintained more cheaply than recomputing them for every request.
- The product has an explicit freshness allowance, and the team can support projection lag, retries, backfills, and reconciliation.
A worked example
Author names in a busy news feed
Suppose a feed serves 20,000 requests per second with 20 entries per response. That creates 400,000 author-name references per second, though batching, joins, and caching can reduce actual database operations. Keeping names only in author records makes profile edits straightforward. Copying names into feed entries can remove enrichment lookups, but an author with 50,000 stored entries creates substantial update fan-out after a rename. Keep author records authoritative, then choose a policy: allow bounded staleness in feed copies, refresh names at read time through a cache, or propagate changes asynchronously. If immediate rename visibility is required, a copied name alone cannot satisfy that contract.
In the interview
- Start with entities, authoritative facts, and the highest-volume queries. Show the normalized model first, then identify exactly which fields or aggregates you would duplicate and why.
- Estimate read savings against write amplification. State request rate, records per response, attribute update frequency, and how many copies each update would touch.
- Name the consistency contract for each copy. Explain whether updates share a transaction or arrive asynchronously, and what users see while a projection is behind.
- Expect failure questions: what happens after a source commit but before projection delivery, how duplicate or out-of-order events are handled, and how a broken projection is rebuilt without losing newer changes.
- Separate display data from decision-making data. A stale listing summary may be acceptable, while inventory allocation, permissions, or a payment decision may require an authoritative check.
Common mistakes
- Claiming that normalization means SQL and denormalization means NoSQL. Relational databases can store denormalized tables, and nonrelational systems can keep separate authoritative records.
- Assuming all joins are slow without considering indexes, query plans, cardinality, and whether the join crosses a network boundary.
- Adding duplicated fields without defining their source of truth, update mechanism, freshness target, and repair process.
- Treating historical snapshots as stale current data, or using a stale read model to authorize an action that requires current state.
Where it comes up
Interview questions where choosing between Normalization and Denormalization comes up.
- Design a news feed like FacebookPrecomputed feed entries trade cheaper reads for fan-out work and maintenance when source posts or author data change.
- Design a restaurant review app like YelpStored rating aggregates accelerate discovery but must remain correct across review edits, deletions, and duplicate processing.
- Design Facebook MarketplaceDenormalized discovery results simplify reads, while purchase-related actions must check current authoritative listing state.
- Design Facebook post searchSearch indexes act as derived read models whose lag must not allow stale visibility data to bypass permission checks.
- Design a hotel booking systemPrecomputed availability can support search, but authoritative date-range inventory must decide whether a reservation succeeds.
Questions people ask
What is the difference between normalization and denormalization?
Normalization organizes facts according to their dependencies to reduce redundancy and data anomalies. Denormalization deliberately stores redundant facts or derived results to simplify particular reads. A system can use normalized source tables and denormalized read models together.
Is denormalization always faster than normalization?
No. It can make selected reads faster while increasing write work, storage, and maintenance costs. An indexed join may already meet the latency target, and updating many redundant copies can become the larger bottleneck.
Does denormalization require eventual consistency?
No. Copies maintained in the same transaction can remain consistent at commit, subject to the database's transaction guarantees. Eventual consistency commonly appears when projections are updated asynchronously across databases or services, so those designs need a stated freshness target and recovery strategy.