8.1 Database Concepts – Normalisation to Third Normal Form (3NF)
Learning Objective
Explain, using functional dependencies, why a given set of database tables are, or are not, in Third Normal Form (3NF). In doing so you must be able to:
Identify the limitations of a file‑based approach.
Define the core relational‑DB terminology.
Interpret an Entity‑Relationship (E‑R) diagram and translate it into a relational schema.
Apply the normalisation process (1NF → 2NF → 3NF).
1. Why Relational Databases Replace File‑Based Systems
Redundancy & Inconsistency – The same data may be stored in several independent files. Updating one copy but not the others creates contradictory information.
Update Anomalies – Insertion, deletion or modification of a record often requires changes in multiple files, increasing the chance of errors.
Limited Query Capability – File‑based programs must read whole files sequentially; relational DBMSs provide set‑based queries (SQL) that retrieve exactly the data required.
Data Integrity & Security – Relational DBMSs enforce primary‑key, foreign‑key and other integrity constraints automatically, and they offer fine‑grained access control.
2. Glossary of Core Relational‑Database Terminology
Term
One‑sentence definition
Entity
A real‑world object or concept that can be described by a set of attributes (e.g., a Student).
Attribute
A property of an entity; each attribute has a domain of permissible values (e.g., StudentID).
Tuple
A single row in a relation, representing one instance of an entity.
Relation (Table)
A set of tuples that all have the same attributes.
Domain
The set of all possible values that an attribute may take.
Primary Key (PK)
A minimal set of attributes that uniquely identifies each tuple in a relation.
Foreign Key (FK)
An attribute (or group) that references the primary key of another relation, creating a link between tables.
Candidate Key
Any minimal set of attributes that could serve as a primary key.
Composite Key
A candidate key that consists of two or more attributes.
Super‑key
A set of attributes that uniquely identifies tuples; it may contain extra (non‑essential) attributes.
Prime Attribute
An attribute that is part of at least one candidate key.
Functional Dependency (FD)
For attributes X and Y in a relation R, X → Y means that any two tuples with the same X‑values must also have the same Y‑values.
Transitive Dependency
An FD X → Z where X → Y and Y → Z hold and Y is not a prime attribute.
Referential Integrity
The rule that a foreign‑key value must match an existing primary‑key value in the referenced table (or be NULL).
Index
A data structure that speeds up retrieval of rows based on key values.
3. Normalisation Process Overview
The aim of normalisation is to organise data so that:
Redundancy is minimised.
Update anomalies are eliminated.
Logical data integrity is enforced.
Step‑by‑step Flowchart
First Normal Form (1NF) – Eliminate repeating groups; ensure every attribute contains an atomic (indivisible) value and each record is uniquely identifiable.
Second Normal Form (2NF) – After achieving 1NF, remove partial dependencies: every non‑prime attribute must depend on the *whole* of every candidate key (not just part of a composite key).
Third Normal Form (3NF) – After 2NF, remove transitive dependencies: for every non‑trivial FD X → Y, either X is a super‑key **or** each attribute in Y is a prime attribute.
4. Worked Example – University Course Management
4.1 Entity‑Relationship Diagram
Figure 1 – E‑R diagram for the university scenario. Primary keys are underlined; foreign keys are italicised.
4.2 Relational Schema Derived from the E‑R Diagram
State whether STUDENT_COURSE is in 3NF. Show your reasoning using the checklist.
If it is not in 3NF, decompose the relation step‑by‑step until every resulting table satisfies 3NF. List the final set of tables and their primary keys.
(Use the checklist in Section 5 to guide your solution.)
Your generous donation helps us continue providing free Cambridge IGCSE & A-Level resources,
past papers, syllabus notes, revision questions, and high-quality online tutoring to students across Kenya.