Third Normal Form (3NF) Explained: Worked Decomposition and Exam Traps
Build a reliable 3NF method from candidate-key closure to a lossless, dependency-preserving decomposition, then see exactly why 3NF can fall short of BCNF.
KnowledgeGate Team
Exam prep & CS education

Memorising “remove transitive dependencies” is not enough when a question gives you a relation, functional dependencies and several possible keys. You need a mechanical route from closures to the formal 3NF test, followed by a decomposition whose original rows can be joined back. The central idea is simple: store each non-key fact with the key that directly determines it, while remembering that the prime-attribute exception is where 3NF stops short of BCNF.
What Third Normal Form fixes, and what it does not mean
Normalisation gives each fact a controlled determinant, reducing update, insertion and deletion anomalies. In the usual ladder, 1NF requires atomic values, 2NF removes partial dependencies, and 3NF handles what remains. This is useful shorthand, not the formal definition. DBMS Normalization from 1NF to BCNF: One Complete Worked Example follows one functional-dependency set through the entire ladder. Third Normal Form specifically tests each non-trivial dependency against the superkey-or-prime rule.
Consider ENROLMENT_RAW(StudentID, CourseID, StudentName, CourseName, InstructorID, InstructorName, Grade) with these rows:
StudentID | CourseID | StudentName | CourseName | InstructorID | InstructorName | Grade |
|---|---|---|---|---|---|---|
S101 | C10 | Asha | DBMS | I07 | Dr Rao | A |
S102 | C10 | Ravi | DBMS | I07 | Dr Rao | B+ |
S101 | C20 | Asha | OS | I11 | Dr Sen | A- |
Changing Dr Rao for S101 conflicts with I07's other name. (I15, Dr Bose) cannot be stored independently. Deleting the C20 row erases OS and its instructor. 3NF neither means “three tables” nor guarantees faster queries.
The exact 3NF test
Use a canonical cover with one attribute on each right-hand side. For every non-trivial functional dependency X -> A, the relation is in 3NF if at least one condition holds:
Xis a superkey.Ais a prime attribute.
A dependency is non-trivial when A is not already in X. A prime attribute belongs to at least one candidate key, not merely the selected primary key.
First compute candidate keys by closure, then mark every prime attribute. Split combined right sides, such as CourseID -> CourseName, InstructorID, ignore trivial dependencies, and test each remaining determinant and right-hand attribute against the two branches above.
Only after that should you use the classroom shortcut: once a schema has cleared 2NF, a non-prime attribute depending on a non-superkey usually exposes a transitive dependency and a 3NF violation. The shortcut cannot explain the prime-attribute exception.
Worked example, part one: find the key and reach 2NF
For ENROLMENT_RAW, use exactly these dependencies:
StudentID -> StudentNameCourseID -> CourseNameCourseID -> InstructorIDInstructorID -> InstructorName{StudentID, CourseID} -> Grade
StudentID and CourseID never appear on a right-hand side, so every key must contain both. Start {StudentID, CourseID}+ with {StudentID, CourseID}. Add StudentName through StudentID. Add CourseName and InstructorID through CourseID. InstructorID then adds InstructorName, while the pair adds Grade. The closure is all seven attributes.
Minimality is also clear. Without StudentID, no dependency can recover StudentID or StudentName. Without CourseID, none can recover CourseID, CourseName or InstructorID. Therefore {StudentID, CourseID} is the only candidate key, and StudentID and CourseID are the only prime attributes.
The sample values are atomic, so the displayed relation is in 1NF. It is not in 2NF because StudentID -> StudentName and CourseID -> CourseName, InstructorID make non-prime attributes depend on proper parts of the composite key. Decompose it into STUDENT(StudentID, StudentName), COURSE_2NF(CourseID, CourseName, InstructorID, InstructorName) and ENROLMENT(StudentID, CourseID, Grade). COURSE_2NF has a single-attribute key, which prevents partial dependency but does not automatically give 3NF. Second Normal Form (2NF) in DBMS: Worked Decomposition and Exam Traps derives the full partial-dependency test and populated split. Its COURSE relation then faces a different check: the single-attribute key prevents partial dependency, but InstructorID -> InstructorName still fails 3NF.

Worked example, part two: remove the 3NF violation
Now test COURSE_2NF(CourseID, CourseName, InstructorID, InstructorName). Its candidate key is CourseID. CourseID -> CourseName passes because CourseID is a key. CourseID -> InstructorID passes for the same reason. InstructorID -> InstructorName fails because InstructorID is not a superkey and InstructorName is non-prime. The offending path is CourseID -> InstructorID -> InstructorName.
Split only at that violation. Create COURSE(CourseID, CourseName, InstructorID) and INSTRUCTOR(InstructorID, InstructorName), while retaining STUDENT and ENROLMENT:
Relation | Rows |
|---|---|
STUDENT |
|
COURSE |
|
INSTRUCTOR |
|
ENROLMENT |
|
In STUDENT, StudentID determines StudentName. In COURSE, CourseID determines CourseName and InstructorID. In INSTRUCTOR, InstructorID determines InstructorName. In ENROLMENT, {StudentID, CourseID} determines Grade. Every determinant is a key of its relation, so all four relations meet 3NF and, for the stated dependencies, BCNF too.

Prove the decomposition is useful
A decomposition needs more than four neat table names. Check the lossless join through the keys used at each split. STUDENT joins through StudentID, COURSE through CourseID, and INSTRUCTOR through InstructorID. Each shared determinant is a key in the relation that owns its descriptive facts. Joining ENROLMENT(S101,C10,A) with the matching STUDENT, COURSE and INSTRUCTOR rows reconstructs (S101,C10,Asha,DBMS,I07,Dr Rao,A) without a missing or spurious row.
Dependency preservation is direct too. StudentID -> StudentName lives in STUDENT, CourseID -> CourseName, InstructorID in COURSE, InstructorID -> InstructorName in INSTRUCTOR, and {StudentID, CourseID} -> Grade in ENROLMENT. No join is needed merely to enforce them.
The anomalies now have specific repairs: I07 has one stored name, (I15, Dr Bose) can be inserted independently, and removing (S101,C20,A-) does not remove C20 or I11. Normalisation does not eliminate every possible integrity problem.
Why 3NF is not BCNF
Boyce-Codd Normal Form (BCNF): Worked Decomposition and GATE Checks derives a two-violation BCNF split and its dependency trade-off. In TEACHING, the prime right-hand side creates the boundary: 3NF accepts Teacher -> Subject, while BCNF rejects its non-superkey determinant. Consider TEACHING(Student, Subject, Teacher) with {Student, Subject} -> Teacher and Teacher -> Subject. Legal rows include (Asha,DBMS,Rao), (Ravi,DBMS,Rao) and (Asha,OS,Sen).
{Student, Subject}+ reaches Teacher, so it reaches all attributes. {Student, Teacher}+ reaches Subject, so it also reaches all attributes. Neither component alone is a key. The candidate keys are {Student, Subject} and {Student, Teacher}, making Student, Subject and Teacher all prime.
Now test Teacher -> Subject. Teacher+ = {Teacher, Subject}, which cannot recover Student, so Teacher is not a superkey. This violates BCNF, which requires every non-trivial determinant to be a superkey. It still passes 3NF because Subject is prime. Separately, {Student, Subject} -> Teacher passes both forms because its determinant is a candidate key.
A BCNF split gives TEACHER_SUBJECT(Teacher, Subject) and STUDENT_TEACHER(Student, Teacher). It is lossless on Teacher, but the original {Student, Subject} -> Teacher is no longer directly enforceable inside one fragment. BCNF does not guarantee dependency preservation.
How questions test 3NF, and the traps that flip an answer
Question forms ask for closures and candidate keys, prime attributes, the highest normal form, a violating FD, a decomposition, losslessness or dependency preservation. These are reasoning patterns, not claims about current marks, frequency or paper structure.
Rapid check: The key of ENROLMENT_RAW is
{StudentID, CourseID}. It starts in 1NF but not 2NF. COURSE_2NF violates 3NF onInstructorID -> InstructorName. The four final relations satisfy BCNF for the stated dependencies. TEACHING is in 3NF but not BCNF because Subject is prime while Teacher is not a superkey.
Watch four traps:
Primary-key attributes are not necessarily the full set of prime attributes.
A single-attribute key guarantees 2NF, not 3NF.
Checking only the declared key can miss another candidate key.
“No transitive dependency” is not a safe replacement for the formal test.
The GATE CS Exam category provides broader navigation for DBMS practice.
The short version and the next deliberate step
Use this algorithm: find every candidate key -> mark all prime attributes -> reduce the FDs -> for each X -> A, ask “X superkey or A prime?” -> decompose only failures -> verify lossless join and dependency preservation.
Redraw the dependency map, reconstruct S101/C10 from the four tables, and explain why Teacher -> Subject passes 3NF but fails BCNF. For a structured route through DBMS and the wider syllabus, use GATE Guidance by Sanchit Sir, with no promised outcome.
Keep learning
Third Normal Form (3NF) MCQs: 12 Solved Questions with Explanations
Solve 12 real 3NF exam MCQs with clear explanations, candidate-key closures, a raw-row decomposition, and the prime-attribute exception that separates 3NF from BCNF.
Second Normal Form (2NF) in DBMS: Worked Decomposition and Exam Traps
Find the composite candidate key, trace partial dependencies, and decompose a populated enrolment relation without losing data.
Boyce-Codd Normal Form (BCNF): Worked Decomposition and GATE Checks
See exactly how a relation can pass 3NF yet fail BCNF. The worked ENROLMENT example covers closures, keys, a lossless split, and the dependency that the split does not preserve.
CNF and GNF for GATE: CFG Simplification and Normal-Form Conversion, Step by Step
Run epsilon, unit and useless-production removal in the right order, convert one full grammar to CNF, and verify the two derivation-count formulas.





