Database Basics
In a database used mainly for reading and aggregation, normalized tables are sometimes deliberately merged into one so that the same data is held in duplicate (denormalization). Which correctly pairs an advantage and a disadvantage of this design?
- AStorage shrinks because duplication disappears, but reads become slower because there are more joins
- BBoth reads and updates become faster, and data consistency is maintained automatically
- CReads become faster because there are fewer joins, but more update work is needed to keep the duplicated data consistent
Show answer and explanation
Answer: C. Reads become faster because there are fewer joins, but more update work is needed to keep the duplicated data consistent
Normalization removes duplicated data and prevents update anomalies, but every search then needs joins across several tables. Where read performance matters, normalization is sometimes deliberately broken by merging columns that are often used together into one table or by storing aggregated results as columns. This is called denormalization. With fewer joins, reads become faster, but because the same data is recorded in several places, every change must correctly update all of them, increasing the update work and the risk of inconsistencies. Storage generally increases too. For this reason, databases for transaction processing with many updates are normalized as a rule, and denormalization is applied only where it is needed, after weighing its benefit against its cost.
- A. This is the opposite. Denormalization increases duplication and reduces joins.
- B. The consistency of duplicated data is not maintained automatically; the update processing must maintain it.
- C. Correct. Reads become faster, but there is more work to update the duplicated data consistently and a greater risk of inconsistency.