Logo
Published on

Boyce-Codd Normal Form (BCNF) in DBMS – Definition, Examples, and Conversion

Boyce-Codd Normal Form (BCNF) in DBMS – Definition, Examples, and Conversion

Boyce-Codd Normal Form (BCNF) is a stricter version of the Third Normal Form (3NF) used in relational database design. It addresses certain anomalies that 3NF cannot eliminate by requiring that every determinant in a table be a superkey.

🧠 What is BCNF?

A table is in BCNF if:

  • It is already in 3NF
  • For every functional dependency X → Y, the determinant X is a superkey

This ensures that all non-trivial dependencies are based only on unique identifiers, eliminating more subtle forms of redundancy.

🧪 Example: Student_Course_Instructor Table

Student_IDCourse_IDInstructor
101C101Dr. Brown
102C101Dr. Brown
103C102Dr. Smith
104C103Dr. Lee

⚠️ Functional Dependencies

  • Student_ID, Course_ID → Instructor (composite key uniquely identifies the instructor for a student-course pairing)
  • Course_ID → Instructor (each course is taught by only one instructor)

The problem lies in Course_ID → Instructor: 👉 Course_ID is not a superkey in this table, which violates BCNF.

🔧 Converting to BCNF

We must decompose the table into two smaller tables where every determinant is a superkey.

✅ Step 1: Create the Course_Instructor Table

Course_IDInstructor
C101Dr. Brown
C102Dr. Smith
C103Dr. Lee
  • Course_ID is now the primary key and a superkey.

✅ Step 2: Create the Student_Course Table

Student_IDCourse_ID
101C101
102C101
103C102
104C103
  • Composite key {Student_ID, Course_ID} is a superkey in this table.

✅ Result After Applying BCNF

Both resulting tables now satisfy BCNF:

  • Every determinant is a superkey
  • Functional dependencies are cleanly separated
  • Redundancy is removed
  • Data integrity is improved

💡 Why BCNF Matters

BenefitDescription
📦 Redundancy-FreeRemoves repeated values that 3NF might miss
🔐 Better IntegrityPrevents anomalies caused by improper dependencies
⚙️ Efficient DesignMakes schema cleaner, faster to query, and easier to maintain

📌 Summary

FeatureDescription
Normal FormBoyce-Codd Normal Form (BCNF)
RequirementsTable in 3NF, and every determinant must be a superkey
FixDecompose into tables where each dependency uses a superkey
PurposeHandle edge cases not covered by 3NF and prevent advanced anomalies