Keys and normal forms
See why a table should hold each fact once, how first, second and third normal form get there, and when a team repeats data on purpose to read faster.
L1–L4 are part of the Pro pass
L0 Explain simply
Analogy: one fact, one drawer. A customer's phone number is written on every order slip. When the number changes, someone must find every slip. Miss one, and the office now holds two numbers for one person.
Daily List is a made-up to-do app (SYNTHETIC / TRAINING ONLY). Sam, the , looks at a draft report. Every task row also holds the owner's email. Lily owns four tasks, so her email is written four times.
What it is: A is a named level of tidiness for a table, from first to third. Moving repeated facts out is called normalisation. (Structured Query Language) is how you define those tables. A table is a grid, a row is one thing, and a column is one fact. An update anomaly is the fault when a fact is stored in several rows and only some of them change. Denormalisation is the choice to copy a fact back on purpose so a report is easier to read. A tidy table and a fast report are the neighbours. They are not the same goal.
Why it matters: After one partial update, a query for Lily's email returns two answers. Nobody can tell from the table which one is right. Nina, the , would then ship the wrong address.
A tidy table is not always the fastest to read. The copy has to say how fresh it is.
PLAIN WORDS · 3 in this section
- tidiness
- being neat and in good order
- normalisation
- changing text into one plain, standard form for comparing
- denormalisation
- Putting repeated data back into tables on purpose.
PICTURE IT
The picture is the one the lesson above opens with. The table below shows how each part of it matches the work.
THE REAL JOB The picture helps a newcomer remember that each fact belongs in one place, so a change is made once.
- Spot the repeat
- Find the key
- Move the fact out
- Point back with a foreign key
- Copy on purpose only if needed
HOW THE PICTURE MAPS
| In the picture | In the work |
|---|---|
| A phone number written on every order slip | A fact repeated in many rows |
| Missing one slip when the number changes | An update anomaly |
| One drawer that holds the number | A table that stores the fact once |
| A slip that points to the drawer | A foreign key |
| A copy kept at the front desk for speed | Denormalisation |
WHERE THIS PICTURE STOPS
- An office slip points to a drawer by hand, but a join does it in one query.
- More drawers means more walking, and more tables means more joins.
- A front-desk copy can go out of date in the same way as any other copy.
HOOK
The key, the whole key and nothing but the key.
REMEMBER IT THIS WAY
A chunk: a long list grouped so it is easier to hold.
Say it as three parts: the key, the whole key and nothing but the key.
| In the trick | What it stands for |
|---|---|
| The key | a column that picks out each row |
| The whole key | every column of a key with two columns |
| Nothing but the key | no other column that is not the key |
The saying is necessary but not enough, so it cannot prove a table is in a form.
TELL A FRIEND
Normalisation stores each fact once so a change is made once, using keys to link the tables. Denormalisation repeats some data on purpose for speed, and the copy must be refreshed.
OFTEN MIXED UP WITH SQL for BAs: statement types, keys and constraints. That topic names the families of Structured Query Language () and the rules a table enforces. This one asks which facts belong in which table.
PRACTISE AND KEEP
Sources for this topic — 3 sources
- Market practice
Constraints (PostgreSQL documentation, data definition chapter) ↗ — PostgreSQL Global Development Group · PostgreSQL 18, §5.5 CHECK/NOT NULL/UNIQUE/primary/foreign keys; publisher page opened6November 2026. Dialect scope explicit.
PostgreSQL18 publisher documentation opened on6November2026: §5.5 CHECK/NOT NULL/UNIQUE/primary/foreign keys. No execution on PostgreSQL is claimed; engine-specific examples remain scoped to18.
- Market practice
Description of the database normalization basics (Microsoft Learn) ↗ — Microsoft · Microsoft Access beginner article, updated2025-05-26; relevant basic decomposition read6November 2026. Not a formal normalization specification; its Other normalization forms section incorrectly conflates BCNF and fourth normal form and is not relied upon.
Microsoft Access beginner article, updated2025-05-26; relevant basic decomposition read6November2026. Not a formal normalization specification; its Other normalization forms section incorrectly conflates BCNF and fourth normal form and is not relied upon.
- Simplified educational illustration
Payments Signal editorial teaching models — Payments Signal
What this simplifies: Daily List people, data and exercises are invented for teaching. Query results belong to the declared fixture and database version. Authorization, business identity, time bounds and unknown-value policy must be agreed in context; no universal mandatory query template is implied.
Used wherever diagrams, scenarios, figures, or example values are didactic constructions rather than sourced facts; every such use carries a simplifications disclosure. All people, companies, banks, and list entries in examples are fictional.
Deepest material on this page: L4 — Standards & sources. Where a topic stops short of implementation depth, that is a deliberate coverage decision, not an oversight — see coverage.