Ask a Question

What do you mean by functional dependency?

on 2012-05-31 06:31:11   by subrata   on Information Technology  2 answers

Dipankar

on 2012-05-31 09:30:00  

http://en.wikipedia.org/wiki/Functional_dependency

Dipankar

on 2012-05-31 09:30:00  

we say y=f(x) is a function, implies for any value of x there is a definite single value of y. We use the notation x-->y, saying x determines y or y is determined by x. This states that, for any value of x there exists only a single definite value of y, this is known as Single Valued Dependency. Functional Dependencies define Constraints on the set of legal relations. A functional dependency A-->B holds, if and only if, you can answer a question like `What is the value of B for any given value of A`, valid in the range and domain of R. for example, RollNo-->Name is a functional dependency, since there is a definite name for any roll number. If there would exist two or more names with a single rollNo, then that would not have been a valid functional dependency. this means, if we make a projection on the attributes RollNo and Name, then the determinant RollNo must be unique. taking another example, Name-->Marks, since there may exist two or more candidates of the same name and who have scored different marks, in such case you will not be able to definitely answer a question like the above, thus that is not a functional dependency. Now, you have to observe the relational instance(extension of R) and find out which of the FD are valid and which are not. A functional dependency is trivial if it is satisfied by all instances of a relation, this implies that if A --> B where B is a subset of A; Trivial FD are like Name-->Name, which always holds, since you can always answer the question `What is the name of the person whose name is X`, trivial FD are of low importance. This was just an informal explanation of FD, and I hope your textbooks will help further, which is the basis of understanding database normalization.