2

I have the relation R(ABCDEF) and the functional dependencies F{AC->B, BD->F, F->CE}

I have to find all the candidate keys for the relation(Armstrong axioms).

I did this:

A->A, B->B, C->C, D->D, E->E, F->F

From F->CE => F->C and F->E

And then:
 1. BD->F
 2. F->E
 3. BD->E
 4. BD->EF
 5. BD->BD
 6. BD->BDEF
 7. BD->F
 8. F->CEF
 9. BD->CEF     => BD->BCDEF

Now I am trying to get A on the right hand side of BD->BCDEF so BD can become a candidate key.

It would be great if someone could help.

EDIT:

 1. ABD->ABCDEF
 2. ACD->BD
 3. ACD->ABD    => AC->B and ACD->ABCDEF => BD->ABCDEF
user2128702
  • 2,059
  • 2
  • 29
  • 74
  • So, you've already decided that BD is a candidate key, and you're trying to figure out how to prove that? FWIW, that's not how it works, and BD isn't actually a candidate key in R. – Mike Sherrill 'Cat Recall' Jul 10 '14 at 15:33
  • I am not trying to prove it! I have already done it using the Armstrong axioms. I have used Transitivity, Augmentation, Reflexitivitity, Union, Decomposition and Pseudo Transitivity. I am looking for other candidate keys! Why do you thinkg BD is not a candidate key? – user2128702 Jul 10 '14 at 16:24
  • BD is not a candidate key, because BD can't determine A. – Mike Sherrill 'Cat Recall' Jul 10 '14 at 16:32
  • @MikeSherrill'CatRecall' Wow, I made an edit of my question but it didn't get updated! That is weird. I am going to edit it now! Sorry for the mislead. – user2128702 Jul 10 '14 at 16:57

2 Answers2

1

The last step in your (edited) logic is

AC->B and ACD->ABCDEF, therefore BD->ABCDEF

It looks like you've replaced AC with B on the left-hand side. You seem to be thinking in arithmetical terms, not in terms of Armstrong's rules of inference. There isn't a rule of inference that says "if AC->B, then wherever AC appears, you can replace AC with B". (Sometimes it looks like that's what happens, but it's not.) AC and B aren't equal, and they're not equivalent.

Imagine that people's names are unique. Then "name" would determine "height", and "name" would determine "weight". But you can't replace name with height; you can't say that "height" determines "weight". The terms aren't equal, and they're not equivalent.

BD is not a candidate key, but ABD is. (There are others.)

Mike Sherrill 'Cat Recall'
  • 91,602
  • 17
  • 122
  • 185
0

Rules of Thumb:

An Attribute appearing only on the left hand side in your FDs is in all keys.
An Attribute not appearing in any of your FDs is in all keys.
An Attribute only appearing on the right hand side in your FDs is not in any key.

A candidate key is the left hand side of a derived FD on which all attributes depend.

Example:

R(ABCDE), (A->C, AB->D, D->B)

E does not appear in any FDs. E is in all Keys. A appears only on the left hand side. A is in all keys. C appears only on the right hand side. C is not in any keys.

Keys will include the attributes:

AE

Find dependencies with every possible key from AE:

A->C
A->AC    (X->XY axiom)
E->E
AE->ACE  (from previous 2 FDs)

Not all attributes are on the right, therefore AE is not a key, only part of all keys.

Start combining AE with BCD and see what comes out:

ADE->ABCDE   (as D->B, and by X->XY axiom D->BD. This is a key, by last rule of thumb)
ACE->ACE
ABE->ABCDE (AE->ACE, B->BD from axioms, this is a key)
ABCE->ABCDE, ABDE->ABCDE (superkeys of ABE, so ignore)
ACDE->ABDCE (superkey of ADE)

Assuming I've done this correctly, Then ABE and ADE are keys.

rask004
  • 552
  • 5
  • 15