Friday 15 April 2022

Equivalence of two sets of functional dependencies

Two or more than two sets of FD's are called  equivalence if the right hand side of one FD can be determined using the second FD set, similarly the right hand side of the second FD set can be determined using the first FD set.

Given a relation with different FD sets for that relation, we have to find out whether one FD set is subset of other or both are equal.

How to find relationship between two FD's

Let FD1 and FD2 are two FD sets for a relation R. Then

1. If all FD of FD1 can be derived from FD's present in FD2, we can say that FD2 is subset of FD1

2. If all FD of FD2 can be derived from FD's present in FD1, we can say that FD1 is subset of FD2

3. If both above two conditions hold then FD1=FD2

Example:  Consider two relational schemas F(ACDEH) and G(ACDEH) with functional dependencies F={ A->C, AC->D, E->AD, E->H} and G={ A->CD,E->AH}. Which of the following is true?

1. F is equivalent to G

2. F is not equivalent to G

3. We can't compare F with G

4. None of these.

Solution:

i) checking if F is subset of G:

To find this calculate Closure of left side attribute in G Using FDs in F

 A->CD

A+={A,C,D}

E->AH

E+={A,H,D,C}

 Therefore F is subset of G ----------------(1)

ii) checking if G is subset of F:

 To find this calculate Closure of left side attribute in F Using FDs in G

A->C

A+={A,C,D} 

AC->D

AC+={A,C,D}

E->AD

E+={E,A,H,C,D}

E->H

E+={E,A,H,C,D}

Therefore G is subset of F ----------------(2)

From (1) and (2) we can say that F is equivalent to G. So option B is correct


 

0 comments :

Post a Comment

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

Machine Learning

More

Advertisement

Java Tutorial

More

UGC NET CS TUTORIAL

MFCS
COA
PL-CG
DBMS
OPERATING SYSTEM
SOFTWARE ENG
DSA
TOC-CD
ARTIFICIAL INT

C Programming

More

Python Tutorial

More

Data Structures

More

computer Organization

More
Top