AI InterviewSearch…Search problems, topics, or pages…Ctrl KGet started
Harddbmsnormalisationbcnf

~165s

The gap between 3NF and BCNF

A relation R(A, B, C) has the functional dependencies AB → C and C → B. What is the highest normal form R satisfies?

Show the answer and the worked solution

Correct answer: B.

3NF but not BCNF

Worked solution

  1. Taking closures, (AB)+ is A, B, C and (AC)+ is A, C and then B through C → B, so both AB and AC are candidate keys.
  2. In C → B the determinant C is not a superkey, so BCNF is violated.
  3. 3NF permits such a dependency provided the attribute on the right is prime, and B belongs to the candidate key AB.
  4. So the relation is in 3NF but not BCNF.

Answer: 3NF but not BCNF.

The idea

The only difference between 3NF and BCNF is 3NF's escape clause for prime attributes on the right-hand side. This tiny relation is the textbook example that lives in that gap.

Shortcut. AB → C with C → B is the textbook gap: C is not a superkey, so BCNF fails, but B is prime, so 3NF holds.

Common trap. "2NF but not 3NF" reads C → B as a transitive dependency, missing that B belongs to the candidate key AB and so is exempt.

The gap between 3NF and BCNF — Aptitude Question

The gap between 3NF and BCNF: A relation R(A, B, C) has the functional dependencies AB → C and C → B. Answer and worked solution on CodeKairo.

Question

A relation R(A, B, C) has the functional dependencies AB → C and C → B. What is the highest normal form R satisfies?

Options

  1. 2NF but not 3NF
  2. 3NF but not BCNF
  3. BCNF but not 4NF
  4. It is not even in 1NF
Show the answer and the worked solution

Correct answer: B. 3NF but not BCNF

Worked solution

  1. Taking closures, (AB)+ is A, B, C and (AC)+ is A, C and then B through C → B, so both AB and AC are candidate keys.
  2. In C → B the determinant C is not a superkey, so BCNF is violated.
  3. 3NF permits such a dependency provided the attribute on the right is prime, and B belongs to the candidate key AB.
  4. So the relation is in 3NF but not BCNF.

Answer: 3NF but not BCNF.

The idea

The only difference between 3NF and BCNF is 3NF's escape clause for prime attributes on the right-hand side. This tiny relation is the textbook example that lives in that gap.

Shortcut. AB → C with C → B is the textbook gap: C is not a superkey, so BCNF fails, but B is prime, so 3NF holds.

Common trap. "2NF but not 3NF" reads C → B as a transitive dependency, missing that B belongs to the candidate key AB and so is exempt.

All OS, DBMS & Networks questions · placement mock tests