-1

I am trying to understand how to find minimal keys. The assignment provides me with the following task:

Find 3 minimal keys in relation (each key is a set of attributes).

R (a, b, c, d, e)

a  -> b
bc -> d
de -> a

The answer is:

(a, c, e)
(b, c, e)
(d, c, e)

I do not understand how to get to the answer. I would appreciate any guidance.

philipxy
  • 14,867
  • 6
  • 39
  • 83
Gabriele
  • 737
  • 2
  • 8
  • 20
  • Right now you are just asking for us to rewrite your textbook with a bespoke tutorial & do your (home)work & you have shown no research or other effort. Please see [ask], hits googling 'stackexchange homework' & the voting arrow mouseover texts. Show the steps of your work following your textbook with justification & ask 1 specific question re the first place you are stuck. Moreover, finding CKs is a faq. – philipxy Jan 09 '20 at 12:33
  • "I have these FDs" doesn't make sense. "These are all the FDs that hold"?--Not possible. "These are all the non-trivial FDs that hold"?--Not possible. "These are some FDs that hold"?--Question can't be answered. Find out what a *cover* is & what the exact conditions are to apply a particular definition/rule/algorithm. To determine CKs & NFs we must be given FDs that form a cover. Sometimes a minimal/irreducible cover. And the set of all attributes must given. [See this answer.](https://stackoverflow.com/a/53386492/3404097) – philipxy Jan 09 '20 at 12:36
  • That was the task. "Given the relation and the following functional dependencies that apply to this relation, find the 3 minimal keys of the relation." That is it. I have already solved the assignment as I gave the answer. – Gabriele Jan 09 '20 at 14:27

1 Answers1

0

First of all, this website by Griffith University helped a lot ( they also show step by step BNCF normalization).

Apparently, in this task minimal key is a candidate key.

First step is to find attributes that exist in the relation R but not on the RightHandSide.

(a b c d e) - (b d a) = c e  (Relation R - RHS)

The second step is to find closures of the current candidate key. Closure of {c e} is {c e}. This does not help, therefore we need to include an extra attribute. We start from the (alhabetical) beginning:

Closure of {c e a} = { c e a b d } Found one candidate key! 
Closure of {c e b} = { c e b d a } Found another candidate key!
We skip the c as it is already in the candidate key. 
Closure of {c e d} = { c e d a b } Found the last candidate key! (the task was to find 3)
Gabriele
  • 737
  • 2
  • 8
  • 20
  • This is not a clear & complete presentation. Also, see my comment on the question re needing to be given a cover, not just some FDs that hold. – philipxy Jan 09 '20 at 12:37