Bird
0
0

A denormalized table has a column ProductPrice repeated in many rows. After a price update, some rows show old prices. What is the best fix?

medium📝 Debug Q7 of 15
SQL - Database Design and Normalization
A denormalized table has a column ProductPrice repeated in many rows. After a price update, some rows show old prices. What is the best fix?
ADelete rows with old prices
BUpdate all rows with the new price to keep data consistent
CIgnore the inconsistency because it is normal
DAdd a new column for updated prices
Step-by-Step Solution
Solution:
  1. Step 1: Understand how to fix inconsistent redundant data

    All redundant copies must be updated to maintain consistency.
  2. Step 2: Evaluate options

    Update all rows with the new price to keep data consistent correctly suggests updating all rows; others are incorrect or ineffective.
  3. Final Answer:

    Update all rows with the new price to keep data consistent -> Option B
  4. Quick Check:

    Fix redundant data inconsistency = update all rows [OK]
Quick Trick: Update all redundant copies to fix inconsistency [OK]
Common Mistakes:
  • Deleting rows instead of updating
  • Ignoring inconsistent data
  • Adding columns without fixing data

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More SQL Quizzes