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.   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)
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

Bcnf

  • 2.
    Disclaimer:This presentation isprepared 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
  • 3.
    Boyce code normalform(BCNF) Jithin Mathew jitmat@gmail.com
  • 4.
    Boyce code normalform • 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 usuallyinvolves 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 databasecommunity 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
  • 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 toconvert 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 wehave five columns in a table. Primary Key
  • 13.
    • but columnC 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 convertthis 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 table2will 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 thefollowing non-BCNF table: The candidate keys of the table are: • {Person, Shop Type} • {Person, Nearest Shop}
  • 17.
    Why it isnot 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.
  • 18.
    How to convertitn into BCNF?
  • 19.
  • 20.
    • After normalization Candidatekeys are {person, shop} and{shop},respectively.
  • 21.