denormalization
Denormalization duplicates or precomputes data to serve a read pattern.
Use this when A measured read bottleneck motivates storing a value near its consumer.
without the term
“Showing the comment count on every post is slow because it counts comments each time. Can we store the count on the post, and keep it right?”
with the term · How do you ask a model for denormalization?
Denormalize this measured read path with an explicit update policy. Verify source changes, retries, and rebuilds without inconsistent copies.
What is denormalization?
You store a copy or precomputed value, such as a comment count on the post row, to make a read fast. Every copy needs a defined rule for when it is updated.
Why does denormalization matter when vibe coding?
A copied field can become an accidental second source of truth.
How do you do denormalization?
Choose whether the value is a historical snapshot or a maintained projection and test that policy.
What goes wrong with denormalization?
Maintaining the same copy through several independent update paths.
Sources for this entry
- MongoDB: Data modeling best practices
Embedding and duplicating data trade simpler reads against update and consistency responsibilities.
Sources checked . Source checks do not establish human editorial approval. How we check content.