What is normalization? Why does a database need to be normalized? Describe 3NF and BCNF with examples.
10 marks
Question source
- Exam year
- 2080 BS / 2024 AD
- Level
- Sub-Inspector (Prabidhik – IT/Computer)
- Paper
- Paper II – Professional and Service Specific Test
- Section
- Section B
Model answer
Normalization is step-wise organization of tables to remove redundancy and anomalies using normal forms (1NF → 2NF → 3NF → BCNF).
Why needed: Without it, one fact repeats many times causing insert/update/delete anomalies. Example unnormalized Issue(StudentID, Name, Book, Author) repeats student name and book author per issue — change an author spelling needs hundreds of edits; delete last issue loses student info.
3NF (Third Normal Form): Table is in 3NF if in 2NF and no transitive dependency (non-key depends only on key, not on another non-key).
Example violation: Employee(EmpID, DeptID, DeptName) — DeptName depends on DeptID, not EmpID. Fix: split into Employee(EmpID, DeptID) + Department(DeptID, DeptName). Now DeptName lives once.
BCNF (Boyce-Codd, stricter 3NF): Every determinant must be a candidate key. 3NF allows a non-key to determine part of key in rare cases; BCNF forbids it.
Example: Course(Teacher, Subject, Room) where one teacher teaches one subject but rooms shared. If Teacher → Subject but Teacher is not a key, 3NF passes yet anomaly remains. BCNF splits into TeacherSubject(Teacher, Subject) + RoomAllot(Teacher, Room).
Practical line: normalize to 3NF/BCNF for integrity, denormalize selectively for report speed.