BCNF – Boyce Codd Normal Form
Let R be the relational schema, R is in BCNF only if :
- R should be in 3NF.
- Every Functional Dependency will have a Superkey on the LHS or all determinants are the superkeys.
Example :
Consider the following relationship
R(ABCD) having following functional dependencies
| F = {A → BCD, BC → AD, D → B} |
| Candidate Keys are :
(A)+ = {ABCD}
(BC)+ = {BCAD}
(DC)+ = {DCBA} |
| Functional Dependency |
Is FD in BCNF or not ? |
Reason ? |
| A → BCD |
Yes |
A is a super key |
| BC → AD |
Yes |
BC is also a super key |
| D → A |
No |
D is not super key, it is part of key |
Solution : Decomposition in BCNF
The relation
R(ABCD) is decomposed into two relations
R1 and
R2 such that :
R1(A,D,C) R2(D,B)
The above two relations
R1 and
R2
- Lossless Join
- BCNF Decomposition
- But Not Dependency Preserving
Redundancy in BCNF
0% redundancy, Because of Single Valued Functional Dependency.
Some Notes Regarding BCNF
- There is sometimes more than one BCNF decomposition of a given schema.
- Some of the BCNF decompositions may also yield dependency preservation, while others may not.
Difference between 3NF and BCNF –
| S.NO |
3NF |
BCNF |
| 1. |
It concentrates on Primary Key |
It concentrates on Candidate Key. |
| 2. |
Redundancy is high as compared to BCNF |
0% redundancy |
| 3. |
It may preserve all the dependencies |
It may not preserve the dependencies. |
| 4. |
A dependency X → Y is allowed in 3NF if X is a super key or Y is a part of some key. |
A dependency X → Y is allowed if X is a super key |
]]>