# Functional Dependency (FDs)

It is an association between two attributes of the same table (relation).

X→Y states that if two tuples agree on the values in attribute 'X' they must also agree on value in attribute 'Y'.

If it can take only one value for a given value of attribute upon which it is functionally dependent.

(i)

Functional Dependency X→Y is trivial if and only if Y⊆X. (Here, Y is a subset of X).

Example :- AB→B (It means AB is X and B is Y)

(ii)

If there is at-least one attribute in R.H.S that is not past of the L.H.S.

(AB is L.H.S and B is R.H.S)

(iii)

Given R and Functional Dependency X→Y, then Y is fully functional dependent on X if there is no Z, where Z is proper subset of X such that Z→Y.

(iv)

Given a relation R with Functional Dependency F defined on the attributes of R and K as a candidate key. if X is a proper subset of K and if Functional Dependency X→A, then A is said to be partially dependent on K.

(v)

X→Y , Y→A , then A is transitively dependent on X.

(i)

if X ⊇ Y, then X→Y

AB→B

(ii)

if X→Y, then

XZ→YZ

(iii)

if X→Y, and Y→Z, then

X→Z

(iv)

if X→Y and X→Z, then

X→YZ

(v)

if X→YZ, then

X→Y

X→Z

F D is the set of all FDs that can be determined using the given set of functional dependency (F).

Total No. of Possible FDs in R (n attributes)

= 2 to the power 2n

X→Y states that if two tuples agree on the values in attribute 'X' they must also agree on value in attribute 'Y'.

If it can take only one value for a given value of attribute upon which it is functionally dependent.

**Classification of Functional Dependency :-**(i)

**Trivial Functional Dependency :-**Functional Dependency X→Y is trivial if and only if Y⊆X. (Here, Y is a subset of X).

Example :- AB→B (It means AB is X and B is Y)

(ii)

**Non-Trivial Functional Dependency :-**If there is at-least one attribute in R.H.S that is not past of the L.H.S.

(AB is L.H.S and B is R.H.S)

(iii)

**Fully Functional Dependency :-**Given R and Functional Dependency X→Y, then Y is fully functional dependent on X if there is no Z, where Z is proper subset of X such that Z→Y.

(iv)

**Partial Dependency :-**Given a relation R with Functional Dependency F defined on the attributes of R and K as a candidate key. if X is a proper subset of K and if Functional Dependency X→A, then A is said to be partially dependent on K.

(v)

**Transitive Dependency :-**X→Y , Y→A , then A is transitively dependent on X.

**Inference Rules / Closure Properties / Armstrong's Axioms**(i)

**Reflexivity:-**if X ⊇ Y, then X→Y

AB→B

(ii)

**Augmentation:-**if X→Y, then

XZ→YZ

(iii)

**Transitivity:-**if X→Y, and Y→Z, then

X→Z

(iv)

**Union:-**if X→Y and X→Z, then

X→YZ

(v)

**Decomposition:-**if X→YZ, then

X→Y

X→Z

**Closure Set of Functional Dependency's:-**F D is the set of all FDs that can be determined using the given set of functional dependency (F).

Total No. of Possible FDs in R (n attributes)

= 2 to the power 2n

## No comments