AQA 7517, section 4.10.3
Normalisation is a process for organising the tables of a database so that data is not duplicated and the structure is sound. You need to be able to normalise relations to third normal form (3NF).
Why normalise databases?
Badly designed tables suffer from redundancy (the same data stored again and again) and, because of it, anomalies.
| Problem | What goes wrong |
|---|---|
| Redundancy | The same fact is stored many times, wasting space |
| Update anomaly | A fact has to be changed in many places, and if one is missed, the data contradicts itself |
| Insert anomaly | You can't add a fact without also adding unrelated data (such as a new product that no one has ordered yet) |
| Delete anomaly | Deleting a record also loses facts that you wanted to keep (deleting the only order for a product loses the product's details) |
Normalisation:
- removes redundancy and saves storage;
- avoids the anomalies, so that the data stays consistent;
- makes the database easier to maintain, extend and query;
- keeps each fact in one place.
The normal forms
Each normal form builds on the one before.
First normal form (1NF)
A relation is in 1NF if:
- every attribute holds a single (atomic) value, with no repeating groups or lists in one cell;
- there are no repeated columns (such as
Item1,Item2,Item3); - each record is unique, with a primary key identifying it.
Second normal form (2NF)
A relation is in 2NF if it is in 1NF and there are no partial dependencies: every non-key attribute depends on the whole of the primary key, not on only part of it.
(A relation with a single-attribute key that is in 1NF is automatically in 2NF, because there is no "part" of the key.)
Third normal form (3NF)
A relation is in 3NF if it is in 2NF and there are no transitive dependencies: no non-key attribute depends on another non-key attribute. Every non-key attribute depends directly on the key.
A memorable summary of 3NF:
Every non-key attribute depends on the key, the whole key, and nothing but the key.
Worked example: normalising an order form
An unnormalised order table: each order is one row, so the product columns hold several values in one cell.
| OrderID | OrderDate | CustomerID | CustomerName | ProductID | ProductName | UnitPrice | Quantity |
|---|---|---|---|---|---|---|---|
| 1001 | 2026-11-02 | C5 | Asha Khan | P1, P2 | Pen, Ruler | 1.50, 0.80 | 10, 2 |
| 1002 | 2026-11-03 | C7 | Ben Ortiz | P1 | Pen | 1.50 | 5 |
| 1003 | 2026-11-05 | C5 | Asha Khan | P2 | Ruler | 0.80 | 4 |
Written as a relation, the repeating group goes in curly brackets (one order has many products):
ORDER (OrderID, OrderDate, CustomerID, CustomerName, {ProductID, ProductName, UnitPrice, Quantity})
Step 1: reach 1NF
Remove the repeating group, so there is one row for each product on each order, and choose a key. The key is now the composite (OrderID, ProductID):
ORDERLINE (OrderID, ProductID, OrderDate, CustomerID, CustomerName, ProductName, UnitPrice, Quantity)
| OrderID | ProductID | OrderDate | CustomerID | CustomerName | ProductName | UnitPrice | Quantity |
|---|---|---|---|---|---|---|---|
| 1001 | P1 | 2026-11-02 | C5 | Asha Khan | Pen | 1.50 | 10 |
| 1001 | P2 | 2026-11-02 | C5 | Asha Khan | Ruler | 0.80 | 2 |
| 1002 | P1 | 2026-11-03 | C7 | Ben Ortiz | Pen | 1.50 | 5 |
| 1003 | P2 | 2026-11-05 | C5 | Asha Khan | Ruler | 0.80 | 4 |
Each cell is now atomic. But there's a lot of repeated data.
Step 2: reach 2NF
Look for partial dependencies, attributes that depend on only part of the composite key.
OrderDate,CustomerIDandCustomerNamedepend onOrderIDonly.ProductNameandUnitPricedepend onProductIDonly.Quantitydepends on both (how many of this product on this order).
Split the table by these dependencies:
ORDER (OrderID, OrderDate, CustomerID, CustomerName)
| OrderID | OrderDate | CustomerID | CustomerName |
|---|---|---|---|
| 1001 | 2026-11-02 | C5 | Asha Khan |
| 1002 | 2026-11-03 | C7 | Ben Ortiz |
| 1003 | 2026-11-05 | C5 | Asha Khan |
PRODUCT (ProductID, ProductName, UnitPrice)
| ProductID | ProductName | UnitPrice |
|---|---|---|
| P1 | Pen | 1.50 |
| P2 | Ruler | 0.80 |
ORDERLINE (OrderID, ProductID, Quantity)
| OrderID | ProductID | Quantity |
|---|---|---|
| 1001 | P1 | 10 |
| 1001 | P2 | 2 |
| 1002 | P1 | 5 |
| 1003 | P2 | 4 |
Each product's name and price are now stored once. But Asha Khan's name still appears twice in ORDER, once for each of her orders.
Step 3: reach 3NF
Look for transitive dependencies: a non-key attribute that depends on another non-key attribute.
- In
ORDER,CustomerNamedepends onCustomerID, which is not the key. The chain isOrderID→CustomerID→CustomerName.
Move the customer details into their own table:
CUSTOMER (CustomerID, CustomerName)
| CustomerID | CustomerName |
|---|---|
| C5 | Asha Khan |
| C7 | Ben Ortiz |
ORDER (OrderID, OrderDate, CustomerID)
| OrderID | OrderDate | CustomerID |
|---|---|---|
| 1001 | 2026-11-02 | C5 |
| 1002 | 2026-11-03 | C7 |
| 1003 | 2026-11-05 | C5 |
PRODUCT (ProductID, ProductName, UnitPrice) and ORDERLINE (OrderID, ProductID, Quantity) are unchanged from 2NF.
In ORDER, CustomerID is now a foreign key to CUSTOMER.
The result
The data is now in 3NF. Each fact is stored once:
- a customer's name is stored in one place, so changing it takes one update;
- a product's price is stored once, and a new product can be added before any orders exist;
- deleting an order doesn't lose customer or product details.
(In a real shop, the price at the time of the order would often be copied into ORDERLINE, since prices change. That is a deliberate design choice, not a mistake.)
Properties of a relation in 3NF
- All attributes are atomic (1NF).
- There are no partial dependencies on a composite key (2NF).
- There are no transitive dependencies between non-key attributes (3NF).
- Every non-key attribute depends on the key, the whole key and nothing but the key.
Worked example
Task: STUDENT (StudentID, Name, TutorID, TutorName). Is it in 3NF? If not, normalise it.
TutorNamedepends onTutorID, which is a non-key attribute. That is a transitive dependency (StudentID→TutorID→TutorName), so the relation is not in 3NF.- It has a single-attribute key, so it's already in 2NF.
- Normalise by splitting:
STUDENT (StudentID, Name, TutorID)
TUTOR (TutorID, TutorName)
TutorID in STUDENT is a foreign key. Now a tutor's name is stored once.
Exam tip: work step by step (1NF, then 2NF, then 3NF), and say what you are removing at each stage: a repeating group, a partial dependency, a transitive dependency. Show the final tables with the primary keys underlined and the foreign keys marked. Every relation needs an identifier: you may add a new ID attribute, but don't use a name as a key.
Check yourself
Give two reasons for normalising a database
Any two of: it removes redundancy; it avoids update, insert and delete anomalies; it keeps data consistent; it saves storage; it makes the database easier to maintain.
What is a partial dependency?
A non-key attribute that depends on only part of a composite primary key, not the whole key.
What is a transitive dependency?
A non-key attribute that depends on another non-key attribute rather than directly on the primary key.
State the properties of a relation in third normal form
It is in 2NF with no transitive dependencies, so every non-key attribute depends on the key, the whole key and nothing but the key. (It is also in 1NF: atomic values, no repeating groups.)