Thursday, 14 April 2022

Checking additional functional dependencies

A functional dependency (FD) is a relationship between two attributes, typically between the PK and other non-key attributes within a table. For any relation R, attribute Y is functionally dependent on attribute X (usually the PK), if for every valid instance of X, that value of X uniquely determines the value of Y. This relationship is indicated by the representation below :

X ———–> Y

The left side of the above FD diagram is called the determinant, and the right side is the dependent

For a given relation there exit some additional FD's apart from given one. Such FD's are determined with some procedure. Consider the following example

Problem: Check all additional FD's for the relation R(AB) with FD = { A->B, B->A}


If an FD  X-->B, then in place of X we can write A,B,AB, Ф 

Now find the closures of  A,B,AB, Ф 

A+={ A,B}; two attributes in A+ then 2^2 = 4 FD's

B+={ B,A} ; 2^2= 4 FD's

AB+ ={A,B}; 2^2 = 4

and one additional FD  Ф ->Ф 

Total number of FD's are = 4+4+4+1= 13

Since two FD's are already given (  A->B, B->A), then additional FD's are = 13-2 = 11

and invalid FD's are 

Ф ->A

Ф ->B

Ф ->AB


Post a Comment

Note: only a member of this blog may post a comment.

Find Us On Facebook

Computer Basics


C Programming


Java Tutorial


Data Structures


MS Office


Database Management