Professional Documents
Culture Documents
Search
Notes . if y ou
(Course _Code, Rollno, Name, System _Used, Hourly Form (1NF)
hav e any
_Rate, Total_Hours) Third Normal
idea s or any
Here, (Course_Code, RoIIno) ----+ Total_Hours Form (3NF)
r equ est m e @
RoIIno ---> Name I System_Used I Hourly_Rate How To
Goog le+
Handling A
Here, Rollno is a determinant but not candidate key
Deadlocks?
(candidate key is course_code, Rollno) so relation
COURSE_STUDENT is not in BCNF. What Is
Database
In relation STUDENT_SYSTEM_CHARGE
Design
(Rollno, Name, System _Used, Hourly_Rate)
Methodology?
Rollno --> Name I System_Used I Hourly_Rate Different
System_Used --> Hourly_Rate Phases Of
Here, System_Used is also a determinant but it is not Design
unique, so relation Methodology.
ecomputernotes.com/database-system/rdbms/boyce-codd-normal-form 3/9
2/18/14 Boyce-Codd Normal Form (BCNF)
Another Example
ecomputernotes.com/database-system/rdbms/boyce-codd-normal-form 5/9
2/18/14 Boyce-Codd Normal Form (BCNF)
Another Case:
ecomputernotes.com/database-system/rdbms/boyce-codd-normal-form 6/9
2/18/14 Boyce-Codd Normal Form (BCNF)
According to condition 1:
below:
For example, if we wish to delete the information that
Kumar is study Physics, we cannot do so without losing the
information that Prof. Neha teaches Physics.
These difficulties are caused by the fact that teacher is
determinant but not a candidate key.
In order to make it in BCNF, teacher must be candidate
key, so original relation is replaced by two projections ST
(Student, Teacher) and TJ (Teacher, Subject).
All the anomalies which were present in SST, now
removed in these two relations.
Practice Session:
Show that every two-attribute relation is in BCNF. That is,
if r(X, Y) then r(X,Y) is in BCNF.
Solution: Let us consider the following cases:
a) X is the sole key of the relation. In this case, the
nontrivial dependency X---> Y has X as a super key since
X c Y.
b) Y is the sole key of the relation. hi this case, the
nontrivial dependency Y-->X has Y as a super key since Y
c Y.
c) Both X --> Y and Y --> X hold simultaneously. Then
whatever PK we consider for the relation we will have
either X or Y as its determinant. Either one of the two
possible cases has already been considered under (a) or
(b).
Consider the relation Supplier (Supplier-No, Part-No.
Supplier-Name, Supplier-
Control, Price) and assume that only the following FDs hold
for this relation: Supplier-No --->Supplier-Name,
Supplier-No ~ Supplier-Control. What type of data
anomalies does this relation have in its present form?
Transform it to 3NF if not already in that form.
Solution: This relation present insertion anomalies,
deletion anomalies and update anomalies. In this relation
we cannot enter a Supplier-Control until that supplier
supplies a part (insertion anomaly). Notice that this is
ecomputernotes.com/database-system/rdbms/boyce-codd-normal-form 8/9
2/18/14 Boyce-Codd Normal Form (BCNF)
ecomputernotes.com/database-system/rdbms/boyce-codd-normal-form 9/9