-1

Consider relation R = (A, B, C, D, E, F) and a set of functional dependencies:

AB --> C

BC --> A

BC --> D

D -->  E

CF --> B

What are all the candidate keys?

Please if anyone can give me the answer and explain how.

philipxy
  • 14,867
  • 6
  • 39
  • 83
  • Check out [this link](http://www.koffeinhaltig.com/fds/ueberdeckung.php?fds=+A+B+-%3E+C%2C+B+C+-%3E+A%2C+B+C+-%3E+D%2C+D+-%3E++E%2C+C+F+-%3E+B&language=en) for the answer – NealB Nov 22 '13 at 20:35

2 Answers2

0

Let me explain how to find candidate keys in a simple manner:

Form a three columns,left,right and middle

In left column,add the attributes which appear only on left hand side of FD

In right column,add attributes which appear only on right hand side of FD

In middle column,add attributes which appear both on right and left hand side of FD

Explanation:

Attributes on left column indicates,every possible candidate keys must include these attributes

and

Attributes on right column indicates candidate keys should not include it

and

Attributes on middle may or may not be included in super keys

In the given example,F is placed in left column and A,B,C,D are placed in right column and E is placed in right column

Then,apply Closure property,

AF+->AF reflexivity rule

BF+->BF reflexivity rule

CF+->ABCDEF

because

CF->CF reflexivity rule

CF->B given

CB->A given

CB->D given

CB->A transitivity rule CB->D and D->A

Thus,CF->ABCDEF and CF is the candidate key

Hope,this helps!

Community
  • 1
  • 1
Lordferrous
  • 678
  • 8
  • 8
-1

I hope this will help you finding the candidate key for this answer .

As per my analysis candidate key for these functional dependencies are :

AB, BC, ABC, ABD, BCD, ABCD

user987339
  • 10,519
  • 8
  • 40
  • 45
prathore
  • 1
  • 1
  • I don't think ABCD is a superkey, it must be the minimal set of keys, ABCD is not minimal – piggyback Apr 26 '14 at 19:06
  • Any attribute that doesn't appear on the right-hand side of any functional dependency must appear in every candidate key. That means every candidate key must contain the attribute "F". *None* of your candidate keys contain the attribute "F". – Mike Sherrill 'Cat Recall' Jul 10 '14 at 18:00