Home

Normalization

Without Scaring Them

Removing Future Pain

Not academic theory. Practical survival.

"Normalization is about preventing lies."
😰
Without It

Update anomalies
Data contradictions
Nightmares

😌
With It

Single source of truth
One place to update
Sleep at night

1NF — Atomic Values

No lists. No repeating groups. One value per cell.

Bad
💥

The List Lie

phones = "9841, 9812, 9756"

How do you find who has 9812?
How do you update just one?
Pain.

Good

The Atomic Truth

phone = "9841"
phone = "9812"
phone = "9756"

One row per phone.
Queryable. Updatable.
Clean.

1
If you see commas in a cell, you have already lost.

2NF — No Partial Dependency

Everything must depend on the whole key, not just part of it.

The Problem: Composite Key Abuse
ENROLLMENT
PK: (student_id, course_id)
student_id + course_idenrollment_date
student_id + course_idstudent_name

student_name depends on student_id only.
Not on the whole key.

2
"If it doesn't depend on the whole key, it doesn't belong."

3NF — No Dependency Chains

No transitive dependencies. No chains of "this depends on that depends on that."

The Chain of Lies
student_id
The Key
department_id
Intermediate
department_name
The Lie

Break The Chain

STUDENTS
student_id
name
department_id →
DEPARTMENTS
department_id
department_name
location

Now department_name depends ONLY on department_id.
No chains. No lies.

3
"A column should depend only on the key, the whole key, and nothing but the key."

The Three Rules of Truth

1

Atomic

One value per cell. No lists, no commas.

2

Whole Key

Every column depends on the entire primary key.

3

Nothing But

No chains. Only direct dependencies on the key.

"So help me Codd." — The Database Prime Directive

Why We Normalize

🔄

Update Anomaly

Change department_name in 500 student records? Or one department table?

🗑️

Delete Anomaly

Delete last student in CS dept, lose the department data forever?

Insert Anomaly

Can't add a new department until we have a student in it?

🎭

Contradiction

Student A says CS dept is "Computer Science", Student B says "Comp Sci"?

"Normalization isn't rules for rules' sake.
It's preventing these nightmares."
Slide 1 / 6