Unit-5 1
Unit-5 1
Use of Decompositions
As an example, consider:
Workers(ssn, name, lot, did, since)
It states that
Domain of an attribute must include only atomic
(simple, indivisible) values
The value of any attribute in a tuple must be a single
value
Example1: Consider the DEPARTMENT relation schema
shown in Figure 5.1
SSN ENAME
Fig 5.11
DB(Patno , appNo,time,doctor)
R1(Patno , PatName)
Consider the determinants:
Patno PatName
Patno is present in DB, but not PatName, so not relevant
So DB is not in BCNF
BCNF: rewrite to
DB(Patno , time ,doctor)
R1(Patno , PatName)
R2(time , appNo)
Now BCNF is satisfied
Lossless-Join Decomposition
Example:
Consider the Hourly_Emps relation again. It has attributes
SNLRWH, and the FD R W causes a violation of 3NF
We dealt with this violation by decomposing the relation
into SNLRH and RW