CodeBlanks Logo Icon CodeBlanks

BCNF

Learn Boyce-Codd normal form.

BCNF

BCNF is a stricter form of 3NF. Every dependency must rely on a super key.

-- BCNF: her A → B bağımlılığında A süper anahtardır

BCNF is stricter than 3NF.

BCNF — details

BCNF is rarely violated. It arises with overlapping candidate keys.

In practice most designs stop at 3NF; BCNF only requires an extra split in special tables where several candidate keys overlap.

Practice BCNF

Bring a students table to BCNF: split overlapping candidate keys.

Starter code

query.sql
-- normalize to BCNF
CREATE TABLE

Sample solution

query.sql
CREATE TABLE student_advisor (
  student_id INT,
  advisor_id INT
)

Expected output

Tablo oluşturuldu

Questions and answers

Review the lesson questions together with their answers. To test yourself, solve the lesson interactively.

1 BCNF key

Question
BCNF: every determinant is a ____ of the table
Answer
BCNF: every determinant is a superkey of the table

Explanation: In BCNF every determinant is a superkey.

2 BCNF: match the terms

Term Meaning
BCNF super strict
3NF transitive
super key unique
candidate candidate

3 How strict is BCNF vs 3NF?

  • They are unrelated
  • Less strict
  • Stricter Correct answer
  • The same

Explanation: BCNF is stricter than 3NF.

All lessons in Intermediate