Denormalization
Storing redundant copies of data to avoid costly joins. It improves reads, but hurts write performance and duplicates data.
Example
Store the author's name inside each post: reading a post needs no join, but if the author changes their name, all 500 posts must be updated.
Test yourself: Denormalization
Measure and optimize
What do you pay for denormalizing?
Storing the author's name in each post avoids a join on read. If the author changes their name, all 500 of their posts need updating.
Normalize and denormalize
Is denormalizing undoing normalization?
The database stays normalized; it only copies, say, 1 column where it's read a lot.
Normalize and denormalize
Denormalizing makes updates cheaper.
It's the opposite: if the name is copied into 500 orders, changing it means updating 500 rows.
0/3
â–¶ Play