2. 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
4. 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 .
5. • 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.
6. • 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. First Normal Form (1NF)
2. Second Normal Form (2NF)
3. Third Normal Form (3NF)
4. Boyce-Codd Normal Form (BCNF or 3.5NF)
5. Fourth Normal Form (4NF)
7. 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
8.
9. 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.
10. 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.
11. 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.
12. • Suppose we have five columns in a table.
Primary Key
13. • 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.
14. • 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
15. • 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.
16. • Consider the following non-BCNF table:
The candidate keys of the table are:
• {Person, Shop Type}
• {Person, Nearest Shop}
17. 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.