3 ms·
A normalized data model has no redundancies. In the best cases, denormalization is caching sub-queries within the database by storing the same (or equivalent a
by KMag 3y ago
A normalized data model has no redundancies.
In the best cases, denormalization is caching sub-queries within the database by storing the same (or equivalent after transformation) data in multiple places. However, that requires more complex transactions to keep everything consistent every time you update data. If done carefully and correctly, you can sometimes get better read performance from denormalized data.
As others have pointed out, materialized views give you the same advantages as denormalization, except the database takes care of keeping everything consistent.
In the worst cases, denormalization is an excuse to not think too hard about organizing your data, hand-waving that the database will perform better with redundancies.