0 · Recall Warm-up
Answer from memory first. Answers are in the Answer Vault at the bottom.
- State the 3NF condition. from Lesson 4.4.3
- When is a decomposition dependency preserving? from Lesson 4.3.2
- Name the three anomalies. from Lesson 4.1.1
1 · The Hook
A college assigns tutors: each tutor teaches one subject, and each student has one tutor per subject. TUTORING(student, subject, tutor) with student subject → tutor and tutor → subject. It is in 3NF (subject is prime), yet "Prof. Rao teaches DBMS" repeats for each of her students. Boyce–Codd normal form removes that last redundancy, at a price: one FD can no longer be checked inside one table.
2 · Predict First
In TUTORING with keys (student, subject) and (student, tutor), is tutor → subject a BCNF violation? What happens to student subject → tutor if we split into (tutor, subject) and (student, tutor)?
Make a guess in your head. The answer opens Section 3.
3 · Core Concept
Predict First — the answer
Yes: tutor is not a superkey. After the split, the pieces are lossless (common tutor → subject), but student subject → tutor cannot be checked: student and subject are in different tables. BCNF cost us dependency preservation.
Boyce–Codd normal form (BCNF)
R is in BCNF if for every non-trivial FD X → A that holds on R, X is a superkey of R. No "or A is prime" escape.
BCNF vs 3NF
- BCNF ⊂ 3NF. A 3NF relation fails BCNF exactly when some FD X → A has X not a superkey but A prime.
- This can only happen when the relation has several overlapping composite candidate keys. If R has a single candidate key, or only non-overlapping keys, 3NF and BCNF coincide for practical purposes.
- Any relation with two attributes is in BCNF.
The trade-off
| Property | 3NF | BCNF |
|---|---|---|
| Lossless decomposition always possible | ✔ | ✔ |
| Dependency-preserving decomposition always possible | ✔ | ✘ (not always) |
| Redundancy due to FDs | some may remain | none |
Practice: aim for BCNF; if the only BCNF decompositions lose dependencies you need, stop at 3NF.
Example where BCNF loses a dependency
R(A, B, C), F = {AB → C, C → B}. Keys AB, AC. 3NF (B is prime) but not BCNF (C → B, C not a superkey). The BCNF split {AC, CB} is lossless but does not preserve AB → C (Lesson 4.3.2). No BCNF decomposition of R preserves AB → C.
Checking BCNF
For every FD in F (or minimal cover): is its left side a superkey (closure = R)? One "no" with a non-trivial FD → not BCNF. (When checking a piece after decomposition, use FDs projected from F⁺ onto the piece.)
4 · Visual
TUTORING(student, subject, tutor)
FDs: student subject -> tutor tutor -> subject
keys: (student, subject), (student, tutor)
tutor -> subject: tutor not a superkey, subject prime => 3NF yes, BCNF no
split: TS(tutor, subject) ST(student, tutor) lossless (tutor -> subject)
student subject -> tutor spans both tables -> NOT preserved
5 · Worked Examples
Example 1 Easy
R(A, B) with F = {A → B, B → A}. Highest normal form?
Solution
BCNF: every relation with two attributes is in BCNF (both left sides are keys here anyway).
Example 2 Medium
R(A, B, C, D) with F = {A → BCD, B → A}. BCNF?
Solution
Keys A, B. A → BCD: superkey; B → A: superkey. BCNF.
Example 3 GATE
R(A, B, C, D) with F = {AB → C, C → D, D → A}. Highest normal form, and why not higher?
Solution
Keys AB, BC, BD; all attributes prime → 3NF. Not BCNF: C → D (C⁺ = CDA, not R).
6 · GATE Traps
- BCNF: left side must be a superkey for every non-trivial FD; prime right sides do not help.
- Every two-attribute relation is in BCNF.
- BCNF decomposition is always possible losslessly, but not always dependency preserving; 3NF always both.
- 3NF-but-not-BCNF needs overlapping composite candidate keys.
7 · Memory Hook
"BCNF: every determinant is a (super)key." And the price tag: "BCNF is always lossless, sometimes forgetful."
8 · Connect the Dots
Lesson 4.4.3 gave 3NF; this lesson removed its escape clause to get BCNF and named the trade-off. Next: a drill lesson applying all four forms to many relations quickly: "highest normal form".
9 · Self-Test
GATE format. Try every question before opening the vault.
Q1 · MCQ · 1 mark(s) — BCNF
R(A, B, C) with F = {A → B, B → C, C → A}. Highest normal form?
- (A) 2NF
- (B) 3NF
- (C) BCNF
- (D) 1NF
Q2 · MCQ · 1 mark(s) — Two attributes
Any relation with exactly two attributes is:
- (A) in BCNF
- (B) in 3NF but possibly not BCNF
- (C) possibly not in 2NF
- (D) never in BCNF
Q3 · MCQ · 2 mark(s) — Trade-off
Which is always achievable for any relation?
- (A) A lossless, dependency-preserving BCNF decomposition
- (B) A dependency-preserving 4NF decomposition
- (C) A lossless, dependency-preserving 3NF decomposition
- (D) A lossy BCNF decomposition only
Q4 · MSQ · 2 mark(s) — BCNF
Which relations are in BCNF?
- (A) R(A, B, C), F = {AB → C, C → A}
- (B) R(A, B, C), F = {A → BC}
- (C) R(A, B), F = {A → B}
- (D) R(A, B, C, D), F = {AB → C, C → D}
Q5 · MCQ · 2 mark(s) — Gap
A relation is in 3NF but not in BCNF. Which must be true?
- (A) Some FD X → A has X not a superkey and A prime
- (B) It has only one candidate key, which is a single attribute
- (C) It has a partial dependency
- (D) It has a transitive dependency on a non-prime attribute
10 · Rule Card
- BCNF: every non-trivial X → A has X a superkey.
- BCNF ⊂ 3NF; the gap = FDs with non-superkey X and prime A (needs overlapping composite keys).
- Two-attribute relations are always BCNF.
- 3NF: lossless + preserving always possible. BCNF: lossless always, preserving not always.
11 · Concept Ledger
Unlocked in this lesson. From here on, these terms may be used.
Boyce–Codd normal form (BCNF)3NF vs BCNF gapBCNF dependency-preservation trade-off
12 · Answer Vault
Reveal answers when you’re ready
Recall Warm-up
- For every non-trivial X → A: X is a superkey or A is prime.
- When the FDs projected onto the pieces imply all of F.
- Update, insertion, deletion.
Self-Test
Q1 Answer: (C) · 1 mark(s)
Keys A, B, C: every left side is a key.
- (A) is wrong: Higher.
- (B) is wrong: Higher.
- (D) is wrong: Higher.
Re-read: Lesson 4.4.4 — BCNF; 3NF vs BCNF trade-off
Q2 Answer: (A) · 1 mark(s)
Every non-trivial FD is A → B or B → A, whose left side is then a key.
- (B) is wrong: It is BCNF.
- (C) is wrong: It is BCNF.
- (D) is wrong: It is BCNF.
Re-read: Lesson 4.4.4 — BCNF; 3NF vs BCNF trade-off
Q3 Answer: (C) · 2 mark(s)
3NF synthesis guarantees both.
- (A) is wrong: Not always.
- (B) is wrong: Not guaranteed.
- (D) is wrong: Lossless BCNF is always possible.
Re-read: Lesson 4.4.4 — BCNF; 3NF vs BCNF trade-off
Q4 Answer: (B) (C) · 2 mark(s)
A: C → A, C not a superkey. D: C → D, C not a superkey.
- (A) is wrong: Not BCNF (3NF).
- (D) is wrong: Not even 3NF.
Re-read: Lesson 4.4.4 — BCNF; 3NF vs BCNF trade-off
Q5 Answer: (A) · 2 mark(s)
That is exactly the 3NF escape clause.
- (B) is wrong: Then 3NF = BCNF.
- (C) is wrong: Would break 2NF.
- (D) is wrong: Would break 3NF.
Re-read: Lesson 4.4.4 — BCNF; 3NF vs BCNF trade-off