Categories: DBMS

Boyce–Codd Normal Form

What is BCNF?

The Boyce-Codd Normal Form also referred to as the 3.5 Normal Form, is an extension of the third normal form. In relational database design, the Boyce-Codd Normal Form (BCNF) is a stricter normal form than the third normal form (3NF).

Rules for BCNF:

Boyce-Codd Normal Form (BCNF) rules are as follows:

  • Every determinant (candidate key) of a relation must be a superkey of that relation.
  • Every functional dependency in the relation that isn’t trivial needs to have a determinant that could be the key.
  • Data in the relation shouldn’t be redundant in any way.

In other words, if and only if there are no non-trivial functional dependencies between attributes where the determinant is not a candidate key, a relation is in BCNF.

Example:

Let’s use the following instance to demonstrate the Boyce-Codd Normal Form (BCNF):

Assume that relation R has the following functional dependencies and that R has the attributes A, B, C, and D.

A → B
B → C
C → D

In this relation, the candidate keys are {A}, {B}, {C}, and {A, B, C}. We can see that A → B violates the BCNF rules because A is not a superkey of the relation, and B depends on a non-superkey attribute A. Therefore, R is not in BCNF.

We must break this relation down into smaller relations in order to incorporate it into BCNF. We can do this by creating two new relations: R1 with attributes A and B, and R2 with attributes B, C, and D. Because there is no data redundancy and every determinant is a candidate key, the resulting relations are in BCNF.

The decomposed relations are as follows:

R1(A, B)
A → B

R2(B, C, D)
B → C
C → D

Note: the original relation R can be reconstructed by joining R1 and R2 using the common attribute B.

Note: also read about Third Normal Form(3NF)

Follow Me

Please follow me to read my latest post on programming and technology if you like my post.

https://www.instagram.com/coderz.py/

https://www.facebook.com/coderz.py

Share
Published by
Rabecca Fatima

Recent Posts

What is object oriented design patterns

A design pattern is a reusable solution to a commonly occurring problem in software design. They…

4 months ago

Factory Method Design Pattern in OODP

Factory Method is a creational design pattern that deals with the object creation. It separates…

4 months ago

Find Intersection of Two Singly Linked Lists

You are given two singly linked lists that intersect at some node. Your task is…

10 months ago

Minimum Cost to Paint Houses with K Colors

A builder plans to construct N houses in a row, where each house can be…

10 months ago

Longest Absolute Path in File System Representation

Find the length of the longest absolute path to a file within the abstracted file…

11 months ago

Efficient Order Log Storage

You manage an e-commerce website and need to keep track of the last N order…

11 months ago