in Databases
1,187 views
0 votes
0 votes
Tell whether the following decomposition of relations lossless and dependency preserving or not.

1. R(ABCDEFGHIJ)  and FD sets

AB->C,  A->DE, B->F, F->GH, D->IJ

a)  D1"={ DIJ, ACE, FGH, BF, ADC}

b)  D2={ FGH, DIJ, ADEBF, ABC}

2.R(ABCDEG) and FD sets

AB->C, AC->B, AD->E, B->D, BC->A, E->G

a)  D=( ABC, ACDE, ADG)
in Databases
1.2k views

1 Answer

3 votes
3 votes
Best answer

F={AB->C,A->DE,B->F,F->GH,D->IJ}

D1={DIJ,ACE,FGH,BF,ADC}

CANDIDATE KEY FOR 1ST RELATION IS (AB)

THERE IS COMMON ATTRIBUTE OF (AB) FOR ALL DECOMPOSITION RELATIONS

SO IT IS LOSSY JOIN 

dependencies correspanding D1 realtions are

D->IJ,A->E,AC->E,F->GH,B->F,A->D

check D1 covers F are not?

(AB)+ is not derive C

so not dependecy preservation

@)D2={FGH,DIJ,ADEBF,ABC)

IT IS LOSSLESS JOIN DEPENDENCY

dependencies are

D2={F->GH,D->IJ,AB->D,AB->E,AB->F,B->F,A->DE,A->BC}

it satisfies F covers D2 and D2 covers F 

so it is dependency preserving.

3)R(ABCDEG)

F={AB->C,AC->B,AD->E,B->D,BC->A,E->G}

it is lossless join dependency.

D3={AB->C,BC->A,AC->B,AC->D,AC->E,AD->E,AD->G}

check Fcovers D3 are not?

D3 NOT COVERS F because (E)+ not derive G

so not dependecy preservation

selected by

3 Comments

@santosh i guess the soln is correct but i have few doubts

D1 part a

Dependencies which you wrote.. I think AC->E is not reqd.. Its redundant.

D1 part b

Why did u include following Dependencies

AB->E

AB->F

As without thrse two also we are able to proove that they are dependency preserving..

Pl correct me if i m wrong..

Thanks
0
0
How 2.a is lossless, explain plz?!?!
0
0
D2={FGH,DIJ,ADEBF,ABC)

IT IS LOSSLESS and DEPENDENCY PRESERVING

dependencies are

D2={F->GH,D->IJ,AB->D,AB->E,AB->F,B->F,A->DE,A->BC}

b/w ADEBF AND ABC: COMMON ATTRIBUTE IS AB WHICH IS KEY SO WE CAN MERGE THEM

NOW B/W ABCDEF AND DIJ: COMMON IS D WHICH IS KRY OF DIJ SO WE CAN MERGE THESE TWO

NOE B/W ABCDEFIJ AND FGH COMMON IS F

F+ ={F,G,H} WHICH IS KEY OF FGH hence these two can also be merged
0
0