Skip to content
We areTOP 1%

What is denormalization, and when would you use it?

MediumConceptNormalization
Track your progress
First attempt
Re-solve after a few days
Final pass before interviews

Answer

Denormalization is the deliberate addition of redundant or precomputed data to a normalized schema to make frequent reads faster, at the cost of extra storage and more complex writes.

  • It is used when joins or aggregations on the normalized design are measured to be a bottleneck, typically in read-heavy systems, reports and analytics.
  • Techniques include copying a frequently joined column into another table, storing derived values such as an order total, and keeping summary tables or materialized views.
  • The risk is inconsistency: if an update misses one copy, the copies disagree, so they are kept in sync with transactions, triggers or background jobs.
  • It is not the same as skipping normalization: you normalize first, then denormalize selectively.

Example:

Normalized:    orders(id, customer_id)   customers(id, name)
Denormalized:  orders(id, customer_id, customer_name)

An order list page can now show customer names without a join. However, when a customer changes their name, every one of their orders must be updated too.

More in Normalization

Sign in to track your progress

Your checkboxes, streak and activity heatmap are saved to your account and sync across devices. It is free.
Sign in with email

New here? Create an account