Sie sind auf Seite 1von 21

Disclaimer:This presentation is prepared by

trainees of baabtra as a part of mentoring


program. This is not official document of
baabtra Mentoring Partner
Baabtra-Mentoring Partner is the mentoring division of baabte System
Technologies Pvt . Ltd

Boyce code normal


form(BCNF)

Jithin Mathew
jitmat@gmail.com

Boyce code normal form


BCNF is a normal form used in
database normalization.
BCNF was developed in 1974 by
Raymond F. Boyce and Edgar F. Codd
Normalization is the process of
efficiently organizing data in a
database .

Normalization usually involves dividing


large tables into smaller tables and
defining relationships between them.
There are two goals of the
normalization process:
1. Eliminating redundant data.
2. Ensuring data dependencies make sense.

By database normalization we can


reduce the amount of space a database
consumes
Ensure the data is logically stored.

The database community has


developed a series of guidelines for
ensuring that databases are
normalized.
These are referred to as normal
forms. There are five types of normal
forms
1.
2.
3.
4.

First Normal Form (1NF)


Second Normal Form (2NF)
Third Normal Form (3NF)
Boyce-Codd Normal Form (BCNF or
3.5NF)
5. Fourth Normal Form (4NF)

First Normal Form (1NF)


First normal form (1NF) sets the very
basic rules for an organized
database.
Values are atomic: no repeating
group and no composite attributes.
Identifying a primary key

Second Normal Form(2NF)


Second normal form (2NF) further
addresses the concept of removing
duplicative data
Meet all the requirements of the first
normal form.
A prime attribute appears in a
candidate key.
attributes are fully dependent on the
candidate keys.

Third normal form(3NF)

Third normal form (3NF) goes one


large step further
Meet all the requirements of the
second normal form.
Remove columns that are not
dependent upon the primary key.

In order to convert a table to BCNF, we must :

1. Find and remove the overlapping


candidate keys. Place the part of the
candidate key and the attribute it is
functionally dependent on, in a
different table.
2. Group the remaining items into a
table.

Suppose we have five columns in a


table.

Primary Key

but column C can determine the


value of column B.

In other words, the value of Column


B is determined by the Column C
then this table can not be in the
Boyce- Codd Normal Form.

To convert this table into BCNF, we


need to divide into two tables.
The table1 contains the following
columns.

where primary key is the


combination of the column A and B

And table2 will contain the two


columns.

where C will be the primary key.


Thus every table satisfying the 3NF
condition cannot be said to be in
BCNF normal form but a table in
BCNF will always be in 3NF form.

Consider the following non-BCNF


table:

The candidate keys of the table are:


{Person, Shop Type}
{Person, Nearest Shop}

Why it is not BCNF?

The table does not adhere to BCNF


because of the dependency Nearest
shop Shop Type, in which the
determining attribute (Nearest shop )
is neither a candidate key nor a
superset of a candidate key.

How to convert
itn into BCNF?

Normalizing

After normalization

Candidate keys are {person, shop}


and{shop},respectively.

Thank
you

Das könnte Ihnen auch gefallen