开发者

Is this a Candidate Key?

This not homework! It is on a study guide as practice and i'm lost. Any help much appreciated, not looking for just answer but how to get to it.

Thanks

Schema R = {A,B,C,D,E,G}

Functional Dependencies = {A->B, AB->E, A->E, G->E}

(1) Compute (AC)+

(2) Find a candidate开发者_如何转开发 key


Candidate keys are sets of elements in the schema such that:

(1) Every element of the schema not in the key, depends on elements in the key.

(2) If one or more elements are removed from the key, the remaining elements no longer satisfy (1).

One method of finding candidate keys is to start with the whole schema, and then remove elements that aren't necessary.

So in this case, you'd start with the entire schema ({A,B,C,D,E,G}). Since E depends on G, we can remove E from our key and (1) still holds.

So now our key is {A,B,C,D,G}. We repeat the process of removing unnecessary elements until we can't remove any more, at which point we would have a candidate key.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜