Why redundancy is a problem
Imagine an enrolment table with StudentID, StudentName, GroupCode, TutorName, CourseCode, CourseTitle and Grade. The tutor’s name and the course title are repeated in many rows, and that repetition causes three kinds of anomaly.
An insertion anomaly means you cannot add one fact without inventing others: a new course cannot be recorded until someone enrols on it. An update anomaly means the same data sits in several rows, so changing only some copies makes the database inconsistent: change Mr Mills’s name in one row and group 12A has two tutors. A deletion anomaly means deleting one record loses something else: if the only student taking Physics leaves, the fact that the Physics course exists disappears with her.
Normalisation is the process of organising data into tables that follow the normal forms (1NF, 2NF, 3NF) to reduce redundancy and remove these anomalies.
Functional dependencies
The normal forms are defined with functional dependencies. means that once you know A, B is determined. because each student has exactly one name.
Two kinds of dependency break the normal forms. A partial dependency is a non-key attribute that depends on only part of a composite primary key: with the key (StudentID, CourseCode), is partial. A transitive dependency is a non-key attribute that depends on another non-key attribute, and so only indirectly on the key: .
1NF, 2NF and 3NF
A table is in 1NF when every cell holds a single atomic value, there are no repeating groups (no lists in a cell, no Course1, Course2, Course3 columns) and every row is unique, with a primary key.
It is in 2NF when it is in 1NF and no non-key attribute depends on only part of the primary key. If the key is a single field (and there is no composite candidate key), a table in 1NF is already in 2NF, because there is no part of the key to depend on.
It is in 3NF when it is in 2NF and no non-key attribute depends on another non-key attribute. The usual summary is that every non-key attribute depends on the key (1NF), the whole key (2NF) and nothing but the key (3NF).
Normalising step by step
For the enrolment table: to reach 1NF, give each student-and-course pair its own row and choose the key (StudentID, CourseCode). Then write down every dependency: ; ; ; and .
To reach 2NF, move the partial dependencies out: Student(StudentID, StudentName, GroupCode) and Course(CourseCode, CourseTitle). Only Grade stays in Enrolment, because it needs the whole key. To reach 3NF, remove the transitive dependency from Student by creating TutorGroup(GroupCode, TutorName) and keeping GroupCode in Student as a foreign key.
The column that links two tables stays in both, as the primary key in one and a foreign key in the other. Drop GroupCode from Student and you lose which group each student is in.
When to denormalise
Denormalisation means putting controlled redundancy back on purpose, for example storing CustomerName in an orders table or keeping a calculated TotalAmount column, so that some queries need fewer joins and run faster. The cost is the return of everything normalisation removed: more storage, update anomalies, a risk of inconsistent copies and slower writes. It is worth it in a read-heavy system that is loaded periodically, such as a reporting database, and rarely worth it in a transactional system with many updates. An “evaluate” answer needs a benefit with its mechanism, a drawback with its mechanism and a conclusion that depends on the context.