\$\text{CourseCode},\text{Semester} \rightarrow \text{Lecturer}\$ (if lecturer can change each semester)
Normalisation Process
1. First Normal Form (1NF)
The table already stores atomic values; there are no repeating groups. The table is in 1NF.
2. Second Normal Form (2NF)
The composite key is \$\{\text{StudentID},\text{CourseCode},\text{Semester}\}\$. The attribute StudentName depends only on StudentID, and CourseTitle, Lecturer depend only on CourseCode. These partial dependencies are removed.
In the Offering table, Lecturer depends on the combination {CourseCode, Semester}. No transitive dependencies remain, so all tables are in 3NF.
4. Boyce‑Codd Normal Form (BCNF)
Each determinant in every table is a candidate key, satisfying BCNF.
Resulting Normalised Design
The final schema consists of four tables, each with clearly defined primary and foreign keys. This design eliminates redundancy (e.g., student names and course titles are stored once) and ensures data integrity through referential constraints.
Suggested diagram: Entity‑Relationship diagram showing Student, Course, Offering, and Enrollment entities with PK/FK relationships.
Checklist for Exam Questions
Identify all attributes and the candidate key(s).
Write down the functional dependencies that can be justified from the description.
Show the table in 1NF (atomic values).
Apply 2NF – create separate tables for attributes that depend on part of a composite key.
Apply 3NF – remove transitive dependencies.
Confirm BCNF – ensure every determinant is a candidate key.
Label primary keys (PK) and foreign keys (FK) in each resulting table.
Optionally, sketch a simple ER diagram to illustrate relationships.
Common Pitfalls
Forgetting to check for transitive dependencies when moving from 2NF to 3NF.
Assuming a single attribute is always the primary key; composite keys are common in junction tables.
Over‑normalising – creating too many tables can make queries unnecessarily complex.
Missing functional dependencies that arise from business rules (e.g., “a lecturer teaches a specific course in a given semester”).
Practice Question
Given the following un‑normalised table of library loans, normalise it to BCNF and list the primary and foreign keys for each resulting table.
LoanID
MemberID
MemberName
BookISBN
BookTitle
Author
LoanDate
DueDate
L001
M100
John Doe
978-0-123456-47-2
Data Structures
Jane Smith
2024‑09‑01
2024‑09‑15
Use the steps outlined above to produce the final design.