Search code examples
databasefunctional-dependenciesdatabase-theory

Find all minimal candidate keys of R


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!


Solution

  • 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