Boyce Codd normal form (BCNF)

  • BCNF is the advance version of 3NF. It is stricter than 3NF.
  • A table is in BCNF if every functional dependency X → Y, X is the super key of the table.
  • For BCNF, the table should be in 3NF, and for every FD, LHS is super key.

Example: Let's assume there is a company where employees work in more than one department.

EMPLOYEE table:

EMP_IDEMP_COUNTRYEMP_DEPTDEPT_TYPEEMP_DEPT_NO
264IndiaDesigningD394283
264IndiaTestingD394300
364UKStoresD283232
364UKDevelopingD283549

In the above table Functional dependencies are as follows:

Candidate key: {EMP-ID, EMP-DEPT}

The table is not in BCNF because neither EMP_DEPT nor EMP_ID alone are keys.

To convert the given table into BCNF, we decompose it into three tables:

EMP_COUNTRY table:

EMP_IDEMP_COUNTRY
264India
264India

EMP_DEPT table:

EMP_DEPTDEPT_TYPEEMP_DEPT_NO
DesigningD394283
TestingD394300
StoresD283232
DevelopingD283549

EMP_DEPT_MAPPING table:

EMP_IDEMP_DEPT
D394283
D394300
D283232
D283549

Functional dependencies:

Candidate keys:

For the first table: EMP_ID
For the second table: EMP_DEPT
For the third table: {EMP_ID, EMP_DEPT}

Now, this is in BCNF because left side part of both the functional dependencies is a key.


Next TopicDBMS 4NF




Latest Courses