-2

I have a confusion re the question below since according to me maybe its answer is that AD is a candidate key. But it is the primary key so I want to know: Is its candidate key the same as its primary key?

A relation R={A,B,C,D,E,F} is given with following set of functional dependencies

A->B
AD->C
B->F
A->E

What will be its candidate key? Will it be same as its primary key?

philipxy
  • 14,867
  • 6
  • 39
  • 83
Bhavya
  • 53
  • 1
  • 8
  • What is your (academic) reference text? What is a definition you have for "CK"? What procedure are you following to find CKs? What is your work following it? PS PKs are irrelevant to relational theory. We can call one of the CKs "the PK". If your reference talks about PKs other than when it is already known that there is just one CK, get a new reference. Why do think "it is its primary key"? What is a definition you have for "PK"? – philipxy Jul 20 '17 at 19:35

1 Answers1

0

A relation has one or more CKs (candidate keys). (They are the superkeys that don't contain smaller superkeys.) We can call one of the CKs "the" PK (primary key). We then collectively call the other CKs "the" AKs (alternate keys). PKs & AKs are irrelevant to relational theory.

It doesn't make sense to say that a set of columns "is its primary key" unless it is already known or assumed that there is just one CK or that it is a CK and has been chosen as the PK.

PS None of those FDs (functional dependencies) determines A or D so they must be in all CKs. But AD determines all other attributes. So it is a CK & it is the only CK. So if we name a PK then it has to be AD. And if we refer to the PK without explicitly naming AD as the PK then we must mean AD.

philipxy
  • 14,867
  • 6
  • 39
  • 83