-1

I'm having trouble grasping the concept of functional dependencies. If for example we have a table:

 A  B  C   D    
|1| 1| 10| 10|
|1| 2| 0| 10|
|1| 3| 0| 10|
|1| 4| 0| 10|
|1| 5| 10| 20|
|1| 6| 0| 20|
|1| 7| 0| 20|
|1| 8| 0| 20|
|1| 9| 0| 20|
|1|10|150| 170|
|2| 1| 10| 10|

The functional dependencies I would assume would be B->D; however B isn't unique. Are there more functional dependencies that I'm missing? And would this imply that B is also a candidate key?

  • Please give the *definitions* you are using for FD & CK. Including the CK of a value vs the CK of a variable. "B isn't unique" is irrelevant. (And it isn't clear until you explain your shorthand "being unique".) What has your *research* suggested about this problem? Why are you "assuming" (by which I guess you mean "wildly guessing") instead of "deducing"? (And if you want feedback about it, explain your reasoning.) – philipxy Apr 29 '17 at 20:52

1 Answers1

0

Functional dependency is related to the mathematical notion of a function. Informally, for any given input, we must be able to determine one and only one output.

You're correct in identifying B->D, though that's not the only FD that's supported. B->C follows the same pattern. You also pointed out that B isn't unique, so B isn't a candidate key. It also doesn't determine the whole relation - specifically, it doesn't determine A. A and B together form a composite candidate key.

reaanb
  • 9,806
  • 2
  • 23
  • 37
  • This answer doesn't give the OP any tools whatsoever for understanding or finding FDs & CKs, even in this example. – philipxy Apr 30 '17 at 02:49