Boyce-Codd Normal Form

Interactive BCNF decomposition

Master advanced normalization with visual decomposition algorithms and real-time analysis

Interactive BCNF Analyzer

Design relations and analyze BCNF violations with automatic decomposition pbT.

Original Relation
StudentCourse BCNF Violation
StudentID CourseID StudentName Instructor InstructorOffice
101 CS101 John Smith Dr. Brown Room 201
102 CS102 Sarah Johnson Dr. Wilson Room 305
101 CS102 John Smith Dr. Wilson Room 305
Functional Dependencies
StudentID → StudentName BCNF Violation
Instructor → InstructorOffice BCNF Violation
StudentID, CourseID → Instructor Valid

BCNF decomposition Algorithm

Interactive Algorithm Demo

Watch the BCNF decomposition algorithm in action with step-by-step visualization.

3x
1 Initialize: Start with the original relation R and set of functional dependencies F
2 Check BCNF: For each FD X → Y in F, verify if X is a superkey
3 Find Violation: If X → Y violates BCNF (X is not a superkey), select it for decomposition
4 unp: Split R into R1(X ∪ Y) and R2(R - Y + X)
5 Recurse: Apply the algorithm recursively to R1 and R2
6 Complete: Stop when all relations are in BCNF

decomposition Tree

Perform a decomposition to see the tree visualization

Practice Scenarios

Choose a scenario to practice BCNF decomposition:

BCNF decomposition Quiz

What is the main requirement for a relation to be in BCNF?
  • A) For every FD X → Y, X must be a superkey
  • B) All attributes must be atomic
  • C) No partial dependencies exist
  • D) No transitive dependencies exist

decomposition Progress

1 Analyze Original
2 Identify Violations
3 unp Relations
4 Verify BCNF
5 Test Properties

BCNF Rules

For every functional dependency X → Y:
• X must be a superkey, OR
• Y ⊆ X (trivial dependency)
If X → Y violates BCNF:
• R1 = X ∪ Y
• R2 = R - Y + X
• Apply recursively
BCNF decomposition guarantees:
• Lossless join property
• May not preserve dependencies
• Use chase test to verify

Relation Statistics

5
Attributes
3
Tuples
2
Violations
1
Relations

Quick Actions