DBMS · core
Normalisation: 1NF to BCNF
Normalisation removes repeated data so that updates, inserts and deletes do not cause errors.
Explain it out loud
Explain it out loud to an AI interviewer that follows up, and see where your answer is thin.
Practise by voiceThe notes
What you must know
- A table with repeated data has anomalies. Update anomaly: one fact must change in many rows and one is missed. Insert anomaly: you cannot add a fact without another. Delete anomaly: deleting one row loses another fact.
- Functional dependency X -> Y: if two rows have the same X, they have the same Y. Example: roll_no -> student_name; course_code -> teacher.
- 1NF: one value in each cell, no repeating groups.
- 2NF: 1NF plus no partial dependency, where a column depends on only part of a composite key.
- 3NF: 2NF plus no transitive dependency (non-key column depends on another non-key column, such as teacher -> teacher_phone).
- BCNF: for every non-trivial dependency X -> A, X must be a super key. 3NF allows X -> A when A is part of a candidate key; BCNF does not.
- Example: (student, subject) -> teacher and teacher -> subject. Keys are (student, subject) and (student, teacher). The table is in 3NF but not in BCNF. Fix: teacher_subject(teacher, subject) and student_teacher(student, teacher).
- Find the candidate keys first. Do not split every column into its own table. Normalisation may make some queries need joins, so it does not always make them faster.
The red pen
Common traps: mistake → fix
Mistake: BCNF means no transitive dependency
Fix: that is 3NF; BCNF needs every determinant to be a super key.
Mistake: Normalisation always makes queries faster
Fix: it reduces repeated data and may add joins.
Mistake: Split every column into its own table
Fix: that is over-normalising.
Easy to hard
Questions interviewers ask, easy to hard
- What is normalisation and why is it needed?
- Normalise a marks sheet with roll_no, name, course_code, course_name, teacher and marks.
- Give an example of a table in 3NF but not in BCNF.
- What are the update, insert and delete anomalies?
Explain it out loud
Explain it out loud to an AI interviewer that follows up, and see where your answer is thin.
Practise by voiceYour first interview is free
Sign up and start with a 15-minute interview with the full report, and an English conversation. No card needed.