문제

I have a R= {A,B,C,D,E,F,G,H,I,J,K} F={ABGH->IJKF,JIGH->ABF, A->CDE} I need to find all minimal candidate keys of R, and How to normalize R to BCNF

I got the following answers so far: ABGH, GHJIK and AGHIJK.

But I was check my answer from this site :checked site

I don't know why 'K' is not part of the answer and I am not sure if my answers were correct. Thanks!

도움이 되었습니까?

해결책

There are two candidate keys of R: {ABGH} and {GHIJ}.

{GHJIK} is not a candidate key, but if it were, then {AGHIJK} would not be a minimal key.

The attribute K isn't part of the two candidate keys, because the closure of {ABGH} contains K, and the closure of {GHIJ} contains K. For example, for {ABGH} . . .

ABGH->ABGH (trivial)
ABGH->IJKF (given), therefore
ABGH->ABGHIJKF
A->CDE (given), therefore
ABGH->ABCDEGHIJKF, or in alpha order
ABGH->ABCDEFGHIJK

다른 팁

BCNF decomposition will be R1 (ACDE) nd R2(ABFGHIJK) because in R (A--> CDE) is partial dependency. So we decompose it in R1 where A is ck and R2 where ABGH and GHIJ are candidate keys.

Any no. of attributes added to candidate key forms a super key. We can also thus say that candidate key is the minimal super key. Here ABGH and GHIJ can determine all other attributes of the relation so they become candidate keys hence GHIJK becomes a super key (due to addition of K) and not a candidate key and on similar principles AGHIJK (due to addition of A and K) also becomes a super key as it has GHIJ which is a candidate key.

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