A-level Computer Science revision · Exchanging data

Normalisation

The idea

Normalisation organises data to remove redundancy and inconsistency. First normal form: no repeating groups, atomic values. Second normal form: in 1NF and no partial dependencies (every non-key field depends on the whole key). Third normal form: in 2NF and no transitive dependencies (non-key fields depend only on the key).

  1. 1NF: atomic fields, no repeating groups.
  2. 2NF: remove partial dependencies on part of a composite key.
  3. 3NF: remove non-key fields that depend on other non-key fields.

Watch out A table in 1NF whose keys are all single fields is automatically in 2NF.

See it worked

Worked example

An Order table has key OrderID and fields CustomerID and CustomerName; CustomerID determines CustomerName. Why is it not in 3NF?

  1. CustomerName depends on CustomerID, not on OrderID.
  2. That is a transitive dependency.
  3. Move CustomerName to a Customer table.

Answer CustomerName depends on CustomerID: a transitive dependency

Your turn

Question 11 mark

Which normal form removes repeating groups?

Choose one
Question 21 mark

What is a benefit of normalisation?

Choose one
Question 32 marks

Explain a partial dependency.

Write your answer, then see a model answer
  1. Define it.
  2. Link to 2NF.

Answer A non-key field depends on only part of a composite primary key rather than the whole key, which breaks second normal form.

A-level Computer Science Pro, OCR H446

A-level Computer Science Pro

£119 once

Price rises to £199 on 1 January. Save £80 by joining before then.

At least 12 months of access

By paying you agree to our Terms and get access straight away, which ends your 14-day cancellation right.

No VAT is charged.

Independent practice for OCR A-level Computer Science (H446), not endorsed by OCR.

Privacy · Terms