0

I Have this R(A,B,C,D,E) which have FD's : A->B, CD->E, E->A, B->D for this question I am required to find the minimal keys for R. To which I think I have this calculated as CA, CB, CD or CE (all optional).

second part of this question: R(A,B,C,D) with FD's : A->B, B->C, C->D, D->A For this part I am required to list all candidate keys but I cannot seem to find how to do this that differs from my first method of the 3 columns. (Unless the three column method does not work for minimal keys?

Thanks

JBarnes
  • 3
  • 1
  • 2

1 Answers1

1

In general a (candidate) key is a set of attributes that determines all the attributes of the relation, and it is called “a minimal set” (of attributes with this property), in the sense that you cannot eliminate any attribute from it without losing the property of being a key. This is in contrast with a superkey, which determines all the attributes of the relation, but can have more attributes then those strictly necessary. So, there is no formal definition of “minimal key”: if you have a set of attributes, then it can be a (candidate) key, or a superkey, or a non key.

In the first example you have correctly identified the keys, which are CA, CB, CD or CE. In the second example, all the attributes are keys (i.e. A, B, C, and D). In both examples, there is no difference in the methods that can be used to find the keys.

Renzo
  • 26,848
  • 5
  • 49
  • 61