Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> comp.databases.theory -> Re: Normal Forms and BCNF
From: "Kasp" <kasp_at_epatra.com>
> Hi,
> I am a little confused with Normal Forms and BCNF.
> I have some relations and I am trying to determine it's normal form. I
> also need to decompose it to BCNF forms...Any help would be
> appreciated.
>
> Here are some of the relations:
> 1. R(A, B, C, D) where A -> B
> B -> C, D
Since A->B and B->CD we have:
A->CD and A->BCD (hint: Armstrong's rules)
Conclusion: A is a candidate key (A is also the only candidate key). Relation R IS NOT in BCNF because of the functional dependence B->CD (B is not a candidate key). Relation R IS NOT in 3NF because of the functional dependence B->CD (neither B is a candidate key nor CD is a subset of a candidate key). Relation IS in 2NF because no non-key attribute depends on a part of a candidate key.
I hope you are familiar with the algorithm for normalizing into BCNF. Since functional dependence B->CD violates the condition for relation to be in BCNF we decompose relation R into:
R1(B, C, D) KK={B}
R'=(A, B)=R2 KK={A}
R1 is in BCNF, R2 too. So, the final answer is:
R1(B, C, D) KK={B}
R2(A, B) KK={A}
Note that we can reconstruct original relation R by joining relations R1 and R2 on R1.B = R2.B
> 2. R(A, B, C, D) where A,B -> C
> B -> D
> 3. R(A, B, C, D, E) where B,C-> E
> A, B, C -> D
> 4. R(A, B, C, D) where A -> B
> C,D -> A
> 5. R(A, B, C, D, E, F) where A -> C, D
> B -> E
> 6. R(A, B, C, D, E) where A -> B, C, D
> C -> D
> B -> E
> TIA.
Best wishes,
Damjan S. Vujnovic
University of Belgrade
School of Electrical Engineering
Department of Computer Engineering & Informatics
Belgrade, Yugoslavia
http://rti7020.etf.bg.ac.yu/~damjan/ Received on Wed Nov 13 2002 - 22:43:29 CST