Denormalization in DBMS
In this lesson: What denormalization is, why big apps use it, pros and cons vs normalization — with practical MySQL examples.
What is denormalization
Denormalization is deliberately adding some redundant data back into tables to make reading faster. It is the opposite of normalization. Where normalization splits data to remove duplication, denormalization accepts a little duplication to avoid slow joins on large, read-heavy databases.
Why denormalize
A fully normalized database stores each fact once, but reading it often needs joins across many tables, which can be slow when data is large. Denormalization stores some data together so queries can read it directly, without joins. The goal is faster reads.
A simple example
Normalized: an orders table stores only customer_id, and you join to customers to get the name:
orders(id, customer_id) JOIN customers(id, name)
Denormalized: the orders table also stores the customer's name directly:
orders(id, customer_id, customer_name)
Now reading an order with its customer name needs no join — but the name is duplicated in every order.
The trade-off
- Faster reads — no joins needed for common queries.
- More storage — duplicated data takes extra space.
- Risk of inconsistency — if a customer's name changes, every copy must be updated.
You trade update simplicity and storage for read speed. It only pays off when reads far outnumber writes.
Normalization vs denormalization
| Point | Normalization | Denormalization |
|---|---|---|
| Goal | Remove redundancy | Speed up reads |
| Redundancy | Minimal | Some, on purpose |
| Joins | More needed | Fewer needed |
| Updates | Simple, safe | Must sync copies |
| Best for | Correctness, writes | Read-heavy performance |
When to use it
- Reads vastly outnumber writes — like reporting or analytics.
- A normalized design is measurably too slow.
- You can manage the duplicated data and keep copies in sync.
For most applications, start normalized. Denormalize selectively, only where it clearly helps performance.
Common mistakes
- Denormalizing too early. Start normalized; optimise only when needed.
- Forgetting to sync copies. Duplicated data must be updated everywhere.
- Denormalizing write-heavy tables. It helps reads, not frequent writes.
- Confusing it with poor design. Denormalization is deliberate, not accidental redundancy.
Summary
- Denormalization adds some redundancy back for faster reads.
- It avoids joins by storing data together, at the cost of duplication.
- The trade-off is read speed vs storage and update complexity.
- Use it only when reads dominate and normalization is too slow.
- Start normalized; denormalize selectively as an optimisation.
Next, revise the opposite in normalization, or see worked steps in normalization examples.
