Database DesignNormalizationLesson 22 / 69

Why duplication hurts

Docs15 min

Why duplication hurts

Store a fact twice and the two copies will eventually disagree:

order #1: customer "Sokha", city "Phnom Penh"
order #2: customer "Sokha", city "Phnom Penh"
order #3: customer "Sokha", city "Phnom Penh "   ← typo

Now "how many orders came from Phnom Penh?" is wrong forever, and you cannot fix the city without finding every row. Update, insert, and delete anomalies is the formal name for these failures. Normalization — the next lessons — is the cure, and it is nothing more than "each fact lives in exactly one place".

Exercise

Find the anomaly: a table stores (course, instructor, instructor_email) per row. What breaks when an instructor changes their email? List all three anomaly types.