문제

I do not understand Boyce-Codd Normal Form. I looked at my textbook but I do not understand it. Let's say relation R = (A,B,C,D,E) and F={A->C, D->CB, AC->E}. How do you determine if R is in BCNF? Need help. Thanks!

도움이 되었습니까?

해결책

To determine if a relation is BCNF we examine it's functional dependencies.

It is in BCNF if for each FD X→Y, we either have

  • X→Y is a trivial functional dependency (Y ⊆ X)
  • X is a superkey for schema R.

The FDs are A→C, D→CB, AC→E. Let's start with the first FD A→C.

A→C is not trivial because C ∉ A. A→A is trivial dependency for instance.

Now is A→C a superkey? To check that we compute the closure of left hand side of the FD, in this case A. The closure is all elements logically implied by A. [A]+ = A ∪ C ∪ E = ACE or so we have A→ACE.

ACE is not a superkey, because it does contain all attributes of the relation.

So the relation is not in BCNF, because A→C is neither trivial or a superkey.

There are other violations of BCNF too. [D]+ = BCD which is not a superkey or trivial. [AC]+ = ACE which is not a superkey or trivial.

Hope this helps! I think everything is correct but I'm studying for finals right now and trying to learn a lot of this material as well.

다른 팁

Informally, you first identify all the candidate keys. Then you look at the arrows in the functional dependencies.

If every arrow is an arrow out of a candidate key, it's in BCNF.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top