When would you denormalise a data model?
Short answer
When read performance and query simplicity matter more than write consistency — which is most of the time in analytical systems.
Full answer
Normalisation optimises for write consistency and storage. Denormalisation optimises for read performance and query simplicity. Analytical systems are read-heavy and written by controlled pipelines, so the trade usually favours denormalisation.
Concretely, denormalise when:
- The model is analytical. Star schemas are deliberately denormalised, and dimension tables are wide on purpose.
- The join is on the hot path. If every query traverses the same three tables, collapsing them removes work from every query.
- Storage is cheap relative to compute, which is the normal situation in a columnar warehouse where repeated values compress heavily.
- Writes are controlled. A pipeline that rebuilds a table cannot create the update anomalies normalisation protects against.
Keep it normalised when writes are frequent and uncontrolled, when the duplicated attribute changes often, or when a compliance requirement demands a single source of a field.
What the interviewer is assessing
A strong answer names the trade explicitly rather than asserting a preference. The follow-up is usually "what do you lose?" — and the answer is update anomalies and storage, both of which are manageable in a pipeline-fed analytical model and dangerous in a transactional one.
Mentioning that columnar engines dictionary-encode repeated values, so the storage cost of a wide dimension is much smaller than it looks, tends to land well.
If you get stuck
- Hint 1. What is normalisation optimising for?
- Hint 2. Who writes to an analytical table, and how often?