0% found this document useful (0 votes)
42 views11 pages

Understanding Boyce-Codd Normal Form

This document discusses Boyce-Codd Normal Form (BCNF), which is an extension of third normal form (3NF) that further reduces data redundancy. It defines two rules for a table to be in BCNF: 1) it must be in 3NF, and 2) for any dependency A → B, the determinant A must be a superkey, not just a candidate or partial key. An example student-professor table is provided to show how it violates BCNF by having a non-prime attribute (subject) determine another (professor). To satisfy BCNF, the table would be decomposed into separate student and professor tables.

Uploaded by

mehreen arshad
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
42 views11 pages

Understanding Boyce-Codd Normal Form

This document discusses Boyce-Codd Normal Form (BCNF), which is an extension of third normal form (3NF) that further reduces data redundancy. It defines two rules for a table to be in BCNF: 1) it must be in 3NF, and 2) for any dependency A → B, the determinant A must be a superkey, not just a candidate or partial key. An example student-professor table is provided to show how it violates BCNF by having a non-prime attribute (subject) determine another (professor). To satisfy BCNF, the table would be decomposed into separate student and professor tables.

Uploaded by

mehreen arshad
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd

“Boyce-Codd OR 3.

5 Normal Form”
Group Members
Mehreen Arshad/003
Atika Aziz/020
Muhammad Abu Bakar/004
Ayesha Cheema/008
Boyce-code NF

Boyce-Codd Normal Form or BCNF is an extension to the third normal


forn, and is also known as 3.5 Normal Form.
Rules for BCNF

Rules for BCNF


 For a table to satisfy the Boyce-Codd Normal Form, it should satisfy
the following two conditions:
 It should be in the Third Normal Form.
 And, for any dependency A → B, A should be a super key.
 The second point sounds a bit tricky, right? In simple words, it
means, that for a dependency A → B, A cannot be a non-prime
attribute, if B is a prime attribute.
For Example:

Student-id subject professor

101 Java P.Java


101 C++ P.Cpp
102 Java P.Java2
103 C# P.Chash
104 Java P.Java
 we have also added some sample data to the table.
In the table above:
 One student can enrol for multiple subjects. For example, student
with student_id 101, has opted for subjects - Java & C++
 For each subject, a professor is assigned to the student.
 And, there can be multiple professors teaching one subject like we
have for Java.
What do you think should be the Primary Key?

In the table above student_id, subject together form the primary key,


because using student_id and subject, we can find all the columns of
the table.
 One more important point to note here is, one professor teaches only
one subject, but one subject may have two different professors.
 Hence, there is a dependency between subject and professor here,
where subject depends on the professor name.
How To Satisfy BCNF

 To make this relation(table) satisfy BCNF, we will decompose this


table into two tables, student table and professor table.
 Below we have the structure for both the tables.
Student Table

student_id p_id
101 1
101 2
and so on...
Professor Table

p_id professor subject


1 P.Java Java
2 P.Cpp C++
and so on...
THANK YOU

You might also like