Inside Normalisation: Why We Split Data Into Tables
Beginners often ask why databases spread information across several tables when one big table looks simpler. The answer has a name, normalisation, and it is really about avoiding a few specific kinds of mistake. This essay explains them in plain words.
The one big table
Imagine a school keeps everything in one table:
| student | student_email | course | teacher | teacher_email |
|---|---|---|---|---|
| Amira | amira@example.org | Maths | Mr Lee | lee@example.org |
| Amira | amira@example.org | Art | Ms Diaz | diaz@example.org |
| Jonas | jonas@example.org | Maths | Mr Lee | lee@example.org |
It works, at first. The trouble is that the same facts appear in many places: Amira's email twice, Mr Lee's email twice.
Three things that go wrong
Update problems. Mr Lee changes his email. You must change it on every row where he appears. Miss one and the database now holds two different answers to "what is Mr Lee's email?".
Insert problems. A new teacher joins but has no students yet. Where do you record them? There is no row to put them in without inventing a fake student.
Delete problems. Jonas leaves and you delete his row. If he was the only student in a course, you also lose the fact that the course exists and who teaches it.
Database people call these anomalies. Normalisation is the process of rearranging tables so they cannot happen.
The fix: one fact in one place
Split the big table by what each fact is about:
- students (id, name, email)
- teachers (id, name, email)
- courses (id, name, teacher_id)
- enrolments (student_id, course_id)
Now each email is stored once. A new teacher gets a row in teachers straight away. Deleting an enrolment does not delete a course. Keys link the tables back together when you need the full picture, using a JOIN.
The normal forms, gently
Textbooks describe steps called normal forms. The first three cover most everyday needs:
- First normal form: each cell holds one value, not a list, and each row is identified by a key. "Maths, Art" in one cell breaks this.
- Second normal form: every column depends on the whole key, not just part of it. In a table keyed by (student, course), the student's email depends only on the student, so it belongs elsewhere.
- Third normal form: columns depend on the key and nothing else. The teacher's email depends on the teacher, not on the course, so it moves to the teachers table.
A common way to remember the idea: every column should describe the key, the whole key, and nothing but the key.
When people stop splitting
Normalisation can go further, and sometimes designers deliberately keep a little repetition, called denormalisation, for example to make a busy report faster. That is a later, conscious choice made by people who understand the trade-off. For beginners, aiming for third normal form is a safe and sensible default.
Signs a table needs splitting
- the same value is typed again and again in many rows
- a cell contains commas separating several items
- you cannot add one kind of thing without inventing another
- deleting one row loses facts about something else
Try it yourself
Our written walkthrough on untangling a messy spreadsheet applies these ideas to a real-looking example, step by step.
A free learning page for beginners. Practise on a test database, never on real customer data, and check the official documentation for your database version.
Illustrative outline only: no live session, recording, registration or certificate is offered on this site. Any speakers, panels or schedules mentioned are hypothetical.