Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I got relation:

R = { (ABCDEF) , (A B F -> C, B C -> F, F -> A, F -> B, D E -> E, E -> D)}

keys of this relation are:

{BCE}, {EF}

But i dont get it... why? Why not only {EF}.. it got less atributes than {BCE}..

Another example, relation:

R2 = {(ABCDEF), (A -> B C , B -> D , E -> F)}

and the key is:


why only one? Why not:

{AE}, {ABE}

ABE also determines all other atributes, why its not a key?

thanks in advance.

share|improve this question
In the 2nd question, ABCDEF also determines all attributes. Why not that too? – ypercubeᵀᴹ Jan 19 '14 at 17:57
Yea, I know it determines all atributes. And I ask myself the same question. Why not? Thats what i am asking. Maybe its the dumbest question I have ever asked.. but there it is. – Noran Jan 19 '14 at 18:04
Revisit your notes about the definition of a key. See also the Wikipedia page on Superkey where what you call a key (if I understand you correctly) is referred to as a "candidate key" or "minimal superkey". The key word (sorry for the pun) is minimal. – ypercubeᵀᴹ Jan 19 '14 at 18:15
I understand why EF is a key (first example) - its obvious. There are no keys among 1-attribute expressions, and EF is a key among 2-attribute expressions. But why BCE is also a key? How can it be minimal if it has 3 attributes, and EF got 2... 2 < 3. Therefore BCE is not minimal. – Noran Jan 19 '14 at 18:39
Minimal does not mean smallest in size (number of attributes). But smallest when compared as sets. Means it has no subset which is also a superkey. No subset of EF and no subset of BCE is a superkey, so these two are the minimal superkeys. – ypercubeᵀᴹ Jan 19 '14 at 19:08

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.