1

I have a set of functional dependencies:

V = {ABCDEF} F = {AB → CD,ABDE → F,BC → A,C → DF}

Candidate keys are: {ABE, BCE} Canonical cover is: {AB→ C, BC→ A, C→ DF} [This is what I think, might be wrong]

However, as you can see an attribute of candidate key, E, is not in my canonical cover and as far as I know candidate keys should be same in the canonical cover. If you consider Augmentation rule from Armstrong calculus we can say it is correct but I am confused. Does attribute E have to be represented in the canonical cover?

2 Answers2

1

You say:

as far as I know candidate keys should be same in the canonical cover

This is not true. On the contrary, if an attribute does not belong to any right part of the functional dependencies of a canonical cover, it must be present in any candidate key (this is because it cannot be derived from any other subset of attributes, so, since a candidate key must determines all the attributes, it should be present in any key). Your canonical cover and candidate keys are correct.

Note that if an attribute does not belong to any functional dependency (both in the left and right part), as E in your example, this is a special case of above (it does not belong the a right part side), and must be present in any candidate key.

Finally, note that this can be considered a “symptom” of something wrong in the relation and in fact the schema is not in 3NF or BCNF.

Renzo
  • 26,848
  • 5
  • 49
  • 61
  • In this case, candidate keys in the canonical cover are: {BA, BC} ? –  Jun 16 '18 at 07:07
  • AB and BC are candidate keys of the relation ABCDF, if this is what you mean. There no such thing as a candidate key of a set of functional dependencies. – Renzo Jun 16 '18 at 07:11
  • @SenaAydin The canonical covers in such exercises are covers for the non-trivial FDs. Each attribute not in the non-trivial FDs still (trivially) determines itself. That is why the CKs determine all attributes but some of their attributes aren't in the canonical cover FDs. – philipxy Jun 16 '18 at 12:30
0

Well, when I try to do Bernnstein synthesis from this relation (ABCDEF) I have to use basis: {AB→C,BC→A,C→DF} I need to add candidate keys since no candidate key exist when we form a relation from functional dependencies : R1(ABC) and R2(CDF) and I was wondering if we need to add E here since our basis doesn't contain E and we consider basis when we do synthesis. That's why I was little confused. But, I think we need to add E since we are doing a synthesis from original R(ABCDEF) so it should be R1(ABC), R(CDF) and R3( ABCE). R3 contains all candidate keys.