Skip to content
StackDecode
System Design
4. Database FundamentalsAnimated

Database Denormalisation

Deliberately duplicating data to speed up reads.

The idea

You copy or pre-join data so common reads need fewer joins, at the cost of extra writes and consistency work.

Watch it work

Press play, pause, or step through. Some animations have settings you can change.

ClientCommand sideWrite DBQuery sideRead DBProjection
  • client
  • gateway / proxy
  • service
  • cache
  • data store
  • queue / stream

Writes (commands) and reads (queries) use separate models.

step:
1/4
at:
Client
1/12

The green dot is a request moving through the system.

Step by step

  1. 1Find slow, hot read paths
  2. 2Store pre-joined or duplicated fields
  3. 3Update copies when the source changes
  4. 4Accept the added complexity

Where it is used

Read-heavy systems and analytics.

Watch out for

Copies drift apart if updates are missed.

Related