0% found this document useful (0 votes)
4 views1 page

BCNF Conversion in Database Design

This document provides an example of converting a non-BCNF table to BCNF. The original table tracks students, subjects, and teachers but violates BCNF because the subject is dependent on only part of the candidate key (teacher). To resolve this, the table is split into two tables - one with the candidate key (student, teacher) and one with (teacher, subject) - bringing it into BCNF.

Uploaded by

ken lin
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views1 page

BCNF Conversion in Database Design

This document provides an example of converting a non-BCNF table to BCNF. The original table tracks students, subjects, and teachers but violates BCNF because the subject is dependent on only part of the candidate key (teacher). To resolve this, the table is split into two tables - one with the candidate key (student, teacher) and one with (teacher, subject) - bringing it into BCNF.

Uploaded by

ken lin
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Example of converting 3NF table to BCNF

student

subject

teacher

Alice
Alice
Bob
Bob

Math
Physics
Math
Physics

Prof. White
Prof. Green
Prof. White
Prof. Black

Business rules:
- Each student has one teacher
per subject
- Each teacher teaches only one
subject
- each subject can have multiple
teachers
(example from Database Management
Systems, Rajiv Chopra)

student

subject

teacher

There are two candidate keys in this table:


(student, subject) and (student, teacher).
However, in the second case, subject is dependent on PART of the candidate
key only (teacher)
Solution:
split table into (student, teacher) and (teacher, subject) OR
split table into (student, subject, teacher_id), (teacher_id, teacher, subject)

student

teacher

teacher

subject

Alice
Alice
Bob
Bob

Prof. White
Prof. Green
Prof. White
Prof. Black

Prof. White
Prof. Green
Prof. Black

Math
Physics
Physics

You might also like