The Normal Forms

The SQL course gave you the practical rule: store each fact once. The normal forms are that rule made precise, and each one prevents a specific kind of damage.

First normal form. One value per cell. No comma-separated lists, no tag1, tag2, tag3 columns. Prevents: data you cannot join, index or count.

Second normal form. Every non-key column depends on the whole key, not part of it. Prevents: a fact about the workshop repeated on every signup row.

Third normal form. No non-key column depends on another non-key column. Prevents: the venue's city stored on the workshop, which then disagrees when the venue moves.

Try it

'Ark Center' and 'Ark Center' are the same venue spelled two ways, because the design let the name be typed once per signup. No query can fix this: the information that they are the same was never recorded.

loading editor…
real SQLite, in your browser

This table breaks second and third normal form, and it has already gone wrong. Look at the venue name in rows 3 and 4.

The damage is always the same shape. A fact stored in many places becomes many versions of that fact. Then every count grouped by it is wrong, and it is wrong quietly.

That is not a hypothetical failure mode. It is rows 3 and 4 above, and it happened after four inserts.

Mark this lesson complete

Signed in, your progress follows you to every device.

Next: When to Denormalize →
← Back