Functional Dependency and Superkey

database-design

As I understand Functional Dependency X -> Y in R, indicates Y can be determined by X and is FD if and only if X maps to one and only one Y.

if this is true then is it true to say X is a superkey?

I believe I have misunderstood functional dependency because I see questions related to determining superkeys keys based on the list of functional dependencies.

Is my above description of FD incorrect ?

Best Answer

"Y can be determined by X" is not clear. "X maps to one and only one Y" is not clear. You are not clearly saying what a FD is or what it means to functionally determine in R.

For attribute sets X & Y, a FD is an expression of the form "X -> Y". For attribute set S and attribute A, "S -> A" is another way of saying "S -> {A}" and "A -> S" is another way of saying "{A} -> S".

"FD 'X -> Y' holds in R" and "X -> Y in R" and "X functionally determines Y in R" are ways of saying "all the tuples with the same subtuple value for the attributes of X have the same subtuple value for the attributes of Y in R".

"X is a superkey of R" is another way of saying "X functionally determines every attribute in R".

Your question seems to be, does X -> Y in R imply that X a is superkey of R. No, it doesn't.