Without Scaring Them
Not academic theory. Practical survival.
Update anomalies
Data
contradictions
Nightmares
Single source of truth
One place to
update
Sleep at night
No lists. No repeating groups. One value per cell.
How do you find who has 9812?
How do you update just one?
Pain.
One row per phone.
Queryable. Updatable.
Clean.
Everything must depend on the whole key, not just part of it.
student_name depends on student_id only.
Not on the whole key.
No transitive dependencies. No chains of "this depends on that depends on that."
Now department_name depends ONLY on department_id.
No chains. No lies.
One value per cell. No lists, no commas.
Every column depends on the entire primary key.
No chains. Only direct dependencies on the key.
"So help me Codd." — The Database Prime Directive
Change department_name in 500 student records? Or one department table?
Delete last student in CS dept, lose the department data forever?
Can't add a new department until we have a student in it?
Student A says CS dept is "Computer Science", Student B says "Comp Sci"?