REVISION GUIDE · A LEVEL 9618
Normalisation: 1NF, 2NF and 3NF (A Level 9618)
What each normal form means, one worked example taken from unnormalised data all the way to third normal form, and how to write your answer.
1. Why normalise?
Normalisation splits data into linked tables so each fact is stored once. This removes data redundancy and the inconsistencies it causes: if a customer’s town is stored on every order, changing it means updating many rows, and missing one leaves the data contradicting itself.
2. The three normal forms
| Normal form | Rule |
|---|---|
| First normal form (1NF) | No repeating groups of attributes. Every field holds a single (atomic) value, and each table has a primary key. |
| Second normal form (2NF) | In 1NF, and there are no partial dependencies: every non-key attribute depends on the whole of a composite primary key, not just part of it. |
| Third normal form (3NF) | In 2NF, and there are no non-key dependencies: no non-key attribute depends on another non-key attribute. |
3. Worked example: unnormalised data
A shop stores orders like this, with a repeating group of products on each order:
ORDER(OrderID, OrderDate, CustomerID, CustomerName, CustomerTown, (ProductID, ProductName, Price, Quantity))
4. Step to 1NF
Move the repeating group into its own table. Its primary key is the composite key OrderID + ProductID.
ORDER(OrderID, OrderDate, CustomerID, CustomerName, CustomerTown)ORDER_LINE(OrderID, ProductID, ProductName, Price, Quantity)
5. Step to 2NF
In ORDER_LINE, ProductName and Price depend only on ProductID, which is part of the key. That is a partial dependency, so move them to a PRODUCT table. Quantity depends on both the order and the product, so it stays.
ORDER_LINE(OrderID, ProductID, Quantity)PRODUCT(ProductID, ProductName, Price)
6. Step to 3NF
In ORDER, CustomerName and CustomerTown depend on CustomerID, which is not the primary key. That is a non-key dependency, so move them to a CUSTOMER table and keep CustomerID in ORDER as a foreign key.
| Table (3NF) | Primary key | Foreign key |
|---|---|---|
| CUSTOMER(CustomerID, CustomerName, CustomerTown) | CustomerID | none |
| ORDER(OrderID, OrderDate, CustomerID) | OrderID | CustomerID |
| ORDER_LINE(OrderID, ProductID, Quantity) | OrderID + ProductID | OrderID and ProductID |
| PRODUCT(ProductID, ProductName, Price) | ProductID | none |
The relationships are: one customer to many orders, one order to many order lines, and one product to many order lines.
7. Mistakes that cost marks
- Defining 2NF or 3NF without saying the table must already be in the previous normal form.
- Losing the link between tables by not keeping the foreign key, for example dropping CustomerID from ORDER.
- Moving Quantity into PRODUCT. It depends on both the order and the product.
- Not showing primary keys. Underline them, or state them clearly.
- Confusing partial dependencies (2NF) with non-key dependencies (3NF).
8. How to practise
The A Level Databases page has the full Unit 8 notes, slides and video, with self-marking questions on keys, ER diagrams and SQL. Our common SQL mistakes guide covers the query side of the topic.
Frequently asked questions
What is the difference between 2NF and 3NF?
2NF removes partial dependencies, where a non-key attribute depends on only part of a composite key. 3NF removes non-key dependencies, where a non-key attribute depends on another non-key attribute.
Can a table with a single-field primary key fail 2NF?
No. A partial dependency needs a composite key, so a table in 1NF with a single-field primary key is already in 2NF. It can still fail 3NF.
How should I write tables in a normalisation answer?
Write each table as TABLE(attribute, attribute, …) with the primary key underlined or clearly labelled, and show which attributes are foreign keys.
Want help with database questions? In a 1-to-1 lesson we can practise normalisation, ER diagrams and SQL together. Book a free demo →