For every non-trivial X → A
3NF may accept a dependency whose determinant is not a super key when its RHS belongs to a candidate key.
CodeBhavyaMove beyond 3NF to BCNF, 4NF and 5NF while testing whether decomposed relations reconstruct the original information and preserve its rules.
BCNF removes the prime-attribute exception allowed by 3NF.
3NF may accept a dependency whose determinant is not a super key when its RHS belongs to a candidate key.
No prime-attribute exception exists. Every meaningful determinant must uniquely identify a tuple.
{student, course} → instructorinstructor → courseCandidate keys are {student, course} and {student, instructor}, so every attribute is prime. The FD instructor → course passes 3NF because course is prime, but violates BCNF because instructor is not a super key.
Select a dependency to compare its determinant closure with the complete schema.
TEACHING(student, course, instructor)INSTRUCTOR_COURSE(instructor, course)STUDENT_INSTRUCTOR(student, instructor)After decomposition, the natural join must create neither missing tuples nor spurious tuples.
(R₁ ∩ R₂) → R₁ or (R₁ ∩ R₂) → R₂ in F⁺Joining the projections returns exactly R.
LossyThe join can invent spurious combinations.
The intersection is {A}. Because A → AB, the intersection determines all of R₁. Therefore, the decomposition is lossless.
| A | B | C |
|---|---|---|
| a1 | b1 | c1 |
| a2 | b1 | c2 |
| A | B | C |
|---|---|---|
| a1 | b1 | c1 |
| a1 | b1 | c2 |
| a2 | b1 | c1 |
| a2 | b1 | c2 |
Here the common attribute B determines neither AB nor BC under F = {A → B}. The highlighted tuples were not in the original relation.
Projected dependencies on the decomposed relations should collectively imply the original FD set.
R₁(A,B) and R₂(B,C)A → B can be checked in R₁. B → C can be checked in R₂. Every original FD is locally enforceable.
R₁(A,B) and R₂(A,C)A → B is available in R₁, but B → C is contained in neither relation. Checking it requires joining R₁ and R₂.
No spurious or missing tuples after reconstruction.
Rules can be checked without reconstructing the original relation.
An MVD X ↠ Y says that, for each X, the set of Y values is independent of the remaining attributes.
Chess, Music
LanguagesEnglish, Telugu
| student | hobby | language |
|---|---|---|
| 101 | Chess | English |
| 101 | Chess | Telugu |
| 101 | Music | English |
| 101 | Music | Telugu |
student ↠ hobbystudent ↠ languageOne student has several hobbies, so student → hobby is false. The double arrow expresses a set-valued, independent relationship.
For every non-trivial MVD X ↠ Y, X must be a super key.
STUDENT_HOBBY_LANGUAGESTUDENT_HOBBY(student, hobby)STUDENT_LANGUAGE(student, language)The four combination rows become two hobby rows plus two language rows. Adding a hobby no longer requires repeating every language.
5NF, also called project-join normal form, concerns non-trivial join dependencies not implied by candidate keys.
Suppose the business rule states that a triple is valid whenever its three compatible pairs exist:
SP(supplier, part)SJ(supplier, project)PJ(part, project)Then SPJ can be reconstructed from the join of those three projections. Storing every triple repeats pairwise facts.
Every non-trivial join dependency must be implied by candidate keys.
5NF is uncommon in routine applications. Apply it only when the business semantics genuinely guarantee the join dependency; arbitrary decomposition can invent tuples.| Form | Main dependency/design issue removed | Key question |
|---|---|---|
| 1NF | Repeating groups and non-atomic values | Is each cell atomic? |
| 2NF | Partial functional dependency | Does a non-prime fact need the whole key? |
| 3NF | Transitive non-key determination | Does a non-key fact determine another? |
| BCNF | Any non-super-key FD determinant | Is every determinant a super key? |
| 4NF | Independent non-key MVD | Are independent multi-valued facts mixed? |
| 5NF | Non-key join dependency | Can pairwise facts safely reconstruct triples? |
Compare losslessness, dependency preservation and target normal form as separate results.
Mark this level when you can test BCNF, prove a binary decomposition lossless, check dependency preservation and explain 4NF.
Saved in this browser only.