Transcript for:
Boyce-Codd Normal Form (BCNF) Overview

hello friends and welcome to stay tonight's YouTube channel this video is a continuation to our normalization video series so do watch the videos for 1st 2nd and 3rd normal forms before this one in this video we will learn about boyce-codd normal form which is popularly known as bcnf or 3.5 normal form because it is an upgraded version of third normal form let's have a quick recap of the second and the third normal forms for it able to be in the second normal form there should be no partial dependency which means for a functional dependency a derives B where a is a prime attribute and B is a non-prime attribute if a is a part of the candidate key then B would be dependent on a part of the primary key rather than depending on the entire candidate key this is partial dependency to learn about the concept in details watch our video for the second normal form for a table to be in the third normal form it should be in the second normal form and there should be no transitive dependency which means for a functional dependency a derives B if a is non prime and B is also non prime then this is known as transitive dependency and to learn about this in detail along with a simple example you watch our video for the third normal form now comes bcnf for a table to be in b c and f it must satisfy two conditions the table should be in the third normal form and for any dependency a derives be a should be a super key or in simple words we can say a cannot be non-prime attribute with B being a prime attribute until now we have seen non prime attributes depend upon prime attributes or part of it like in partial dependency or some other non prime attributes like in transitive dependency but what if a non-prime attribute starts deriving a prime attribute bcnf doesn't allow this behavior so let's take an example and try to understand this type of dependency so we have a college enrollment table here where we save student ID subject opted by the student and name of the professor assigned for that particular student for a particular subject let's add some data to our table as you can see now one student can enroll for multiple subjects and for each subject or professor is assigned to the student one important point to note here is that there can be multiple professors teaching one subject like we have for Java P Java and P Java two in this table the student ID and subject together form the primary key because we can use student ID and subject together to find all the other table columns well in our case that is just one another column also as one professor teaches only one subject we can use the professor column to find the subject name as well now this table is in first normal form as all the values are atomic columns have different or unique names and the data saved in each column belongs to the same domain this table also satisfies second normal form as there is no partial dependency and the third normal form as well because there is no transitive dependency to but if you look closely professor can lead us to subject and subject is a part of candidate key or primary key hence it is a prime attribute while professor is a non-prime attribute hence we have a dependency here where subject is dependent on professor but professor is not a super key so the table doesn't satisfy bcnf now let's see how we can convert this table into bcnf obviously we will have to break the table but how this is what we can do now we have two tables one with student ID and professor ID and a separate table for professor with professor ID professor name and subject name this will convert a table into B C and F [Applause] we hope you enjoyed learning about B C and F in this video and the videos for the fourth and the fifth normal form are coming very soon if you liked this video give it a thumbs up you can share your doubts with us in the comment section below and we'll try to answer all your questions and do not forget to subscribe to the site night channel see you soon