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?? Databases dependency-preserving + – Jainil_Shah 502 views answer comment Share Follow Print See all 2 Comments 2 2 Comments reply Shaik Masthan commented Mar 24 reply Follow flag R2(B,C) should have B-> C and C -> B because original FD has C -> D and D-> B. R3(B,D) should have B-> D and D-> B. So, C -> D preserving through C -> B and B -> D. 2 2 replyShare Jainil_Shah commented Mar 24 reply Follow flag Thank you! 0 0 replyShare Please log in or register to add a comment.
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. Kishan_Baghel answered Mar 23 • selected Mar 24 by Shaik Masthan Kishan_Baghel comment Share Follow See 1 comment 1 1 comment reply Jainil_Shah commented Mar 24 reply Follow flag Thank you! I initially thought that for an FD to be preserved, both its LHS and RHS must appear in a single decomposed relation. I didn’t realize that transitivity can also be used to preserve dependencies. 1 1 replyShare Please log in or register to add a comment.
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. VIPIN_CHANDRA answered Mar 24 VIPIN_CHANDRA comment Share Follow See 1 comment 1 1 comment reply Jainil_Shah commented Mar 24 reply Follow flag Thank You! 0 0 replyShare Please log in or register to add a comment.