1

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 ?

ypercubeᵀᴹ
  • 97,895
  • 13
  • 214
  • 305
Darragh
  • 131
  • 6

2 Answers2

2

"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.

philipxy
  • 774
  • 7
  • 18
1

My description of FD is accurate but the question re: super keys

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

The answer is NO. Because FD is not related to tuples / rows, instead relates to attributes, therefore X and Y are subsets of R attributes.

Based on a comment, I will try to make my answer clearer.

For a relation R, FD X->Y, holds true for relation R if and only if whenever two tuples of R have the same value of X, they also have the same value for Y. X and Y are a subset of attributes of R. This does mean X is a superkey, it is possible two tuples exist with the same X value.

Darragh
  • 131
  • 6
  • 3
    "is not related to tuples / rows" is not clear. "relates to attributes" is not clear. Why "therefore" is not clear. What that has to do with answering your question is not clear. – philipxy Jan 22 '17 at 11:41