Edit:should be lossless but dependency not preserved (AB->C)

@Ashwin Kulkarni when you do C+={C,D,E,A}you will have two tables BC and ACDE

and after if EA,DE,CD so i think AB-C is getting lost???

The Gateway to Computer Science Excellence

+1 vote

0

Edit:should be lossless but dependency not preserved (AB->C)

@Ashwin Kulkarni when you do C+={C,D,E,A}you will have two tables BC and ACDE

and after if EA,DE,CD so i think AB-C is getting lost???

+1

Here keys are AB, BC, BD, BE

hence relations C - > D, D->E, E->A forms partial dependencies.

Hence to remove Partial dependencies and convert to BCNF we need to make these as seperate relations so that LHS is superkey.

Hence ABC : AB->C (AB is superkey)

CD : C-> D(C is superkey)

DE : D->E (D is superkey)

EA : E->A (E is superkey)

hence all relations obey BCNF law. and dependencies are preserved.

Now to say it is lossless or not, Common attribute between two relations is should be a key on either ot both sides.

Relations ABC , CD (C is common attribute and a key in CD)

Relations CD, DE (D is common attribute and a key in DE)

Relations DE, EA (E is common attribute and a key in EA)

hence lossless decomposition

hence relations C - > D, D->E, E->A forms partial dependencies.

Hence to remove Partial dependencies and convert to BCNF we need to make these as seperate relations so that LHS is superkey.

Hence ABC : AB->C (AB is superkey)

CD : C-> D(C is superkey)

DE : D->E (D is superkey)

EA : E->A (E is superkey)

hence all relations obey BCNF law. and dependencies are preserved.

Now to say it is lossless or not, Common attribute between two relations is should be a key on either ot both sides.

Relations ABC , CD (C is common attribute and a key in CD)

Relations CD, DE (D is common attribute and a key in DE)

Relations DE, EA (E is common attribute and a key in EA)

hence lossless decomposition

+1 vote

Here Candidate keys are (AB, BC, BD, BE) and As you can see Relation {A, B, C, D, E} is already in 3NF but **NOT in BCNF **because of Functional dependencies { C -> D, D->E, E->A} So We need to take the closure

Now

We need to take the decomposition of the relation **R (ABCDE)** into

**R (ABCDE)**

**R _{1}(CDEA) R_{2}**

C -> D {As you can see here A attribute not present So we are not taking AB->C}

D -> E

E -> A

* Here C.K.= {C}*

So further decomposition in **(CD) and (DEA), but**

Again you find (DEA) have problem So gain decomposition

relation **(DEA) into (DE) and (EA)**

Finally What we get

** R (ABCDE)**

**R _{1}(CDEA) R_{2}**

** R _{11}(CD) R_{12}(DEA)**

** R _{121}(DE) R_{122}(EA)**

** {C=>D} {D=>E} {E=>A} **

**But Here you can see that {AB=>C} is not present that mean Dependency not preserving, But we can somehow manage to achieve Dependency preserving by Adding attribute "A" ( this would not be always possible for every case, but here somehow possible) here Finally, we achieve {BCNF, LL, DP } **

- All categories
- General Aptitude 1.9k
- Engineering Mathematics 7.5k
- Digital Logic 2.9k
- Programming and DS 4.9k
- Algorithms 4.4k
- Theory of Computation 6.2k
- Compiler Design 2.1k
- Databases 4.1k
- CO and Architecture 3.4k
- Computer Networks 4.2k
- Non GATE 1.4k
- Others 1.4k
- Admissions 595
- Exam Queries 573
- Tier 1 Placement Questions 23
- Job Queries 72
- Projects 18

50,737 questions

57,388 answers

198,575 comments

105,412 users