502 views
0 0 votes

Let R(A, B, C, D) be a relational schema with the following functional dependencies:
 

{ A --> B, B --> C, C --> D, D --> B }
 

The decomposition of R into (A, B), (B, C) and (B, D):

(A) gives a lossless join, and is dependency preserving

(B) gives a lossless join, but is not dependency preserving

(C) does not give a lossless join, but is dependency preserving

(D) does not give a lossless join and is not dependency preserving
 


In this question, given decomposition is Lossless, But i have confusion about Dependency Preserving or Not.

Here, according to me C -> D is lost because, there is no any decomposed releation has 'C' and 'D' both.

But, i searched about it and asked others also, they are saying that C -> D is also preserved.

Can anyone from you help me??

2 Answers

Best answer
3 3 votes


A --> B, B --> C, and D --> B are preserved directly, while C -- >D is preserved indirectly using C --> B and B --> D; hence the decomposition is dependency preserving.
 



• selected by
0 0 votes

Step 1: Join R1(A, B) and R2(B, C)

Is B a key for R1 or R2?

Look at the FDs: We have B-->C . This means B is a key for R2.

 

 

Result: This first join is Lossless. We now have a combined intermediate table R12(A, B, C).

Step 2: Join the result R12(A, B, C) with R3(B, D)

Common Attribute: {B} (Since B is in R12 and also in R3).

Is B a key for R12 or R3?
Look at the FDs again: We have B-->C and C-->D By transitivity (B-->C--D), we know Because B-->D , B is a key for R3.

Result: This second join is also Lossless.

Why it works in simple lines:

  • A and B are linked by B.
  • B and C are linked by B.
  • B and D are linked by B.
Position:
Show:

Related questions

1 1 vote
3 answers 3 answers
7.6k
7.6k views
Purple asked Jan 24, 2016
7,641 views
Consider a relation R= {M, N, O,P, Q, R, S, T} with the following set of dependencies:MN QM RQN RR STNext consider the following set of decompositions for the relatio...
1 1 vote
1 answers 1 answer
1.7k
1.7k views
1 1 vote
2 2 answers
1.1k
1.1k views
Balaji Jegan asked Jul 9, 2018
1,144 views
Consider R(B->D, C->B, D->A)Consider the following 2 decompositions : R1(ABC) and R2(CD).Whether this is a lossless decomposition?Whether this is a lossless decomposition...
6 6 votes
2 answers 2 answers
3.6k
3.6k views
Balaji Jegan asked Sep 26, 2018
3,560 views
Consider R(A,B,C,D,E)with the FD Set F(A->B, A->C, DE->C, DE->B, C->D)Consider this decomposition : R1(A,B,C), R2(B,C,D,E) and R3(A,E)Then, the decompositions isLossless ...