edited by
51,097 views
140 140 votes

Let $R (A, B, C, D)$ be a relational schema with the following functional dependencies :
$A → B$, $B → C$, $C → D$ and $D → B$. The decomposition of $R$ into $(A, B), (B, C), (B, D)$

  1. gives a lossless join, and is dependency preserving
  2. gives a lossless join, but is not dependency preserving
  3. does not give a lossless join, but is dependency preserving
  4. does not give a lossless join and is not dependency preserving

5 Answers

Best answer
160 160 votes

Option A.

$(A,B)$ $(B,C)$ $-$ common attribute is $B$ and due to $B\to C$, $B$ is a key for $(B,C)$ and hence $ABC$ can be losslessly decomposed into $(A,B)$ and $(B,C)$.

$(A, B, C) (B, D)$, common attribute is $B$ and $B\to D$ is a FD (via $B\to C, C\to D$), and hence, $B$ is a key for $(B, D).$ So, decomposition of $(A, B, C, D)$ into $(A, B, C) (B, D)$ is lossless.

Thus the given decomposition is lossless.

The given decomposition is also dependency preserving as the dependencies $A\to B$ is present in $(A, B), B\to C$ is present in $(B, C), D\to B$ is present in $(B, D)$ and $C\to D$ is indirectly present via $C\to B$ in $(B, C)$ and $B\to D$ in $(B, D).$

http://www.sztaki.hu/~fodroczi/dbs/dep-pres-own.pdf

edited by
125 125 votes

Answer is a i.e. dependancy preserved and lossless decompostion.

4 4 votes

B is a key in all the decomposed relations, hence lossless.

Now, let's see if it is FD preserving or not. We directly get $A→B, B→C  $ and $D→B.$
Can we get $C→D$ back?

In the relation $R(B,C)$ we directly get $B→C$ but from the original FDs we can infer that the FD $C→B$ would also hold here.

Hence, if we take this $C→B$ and fuse it with $B→D$ (also implied) we get $C→D$ back.

So, FD preserving.

 

PS: Don't find the closure of every attribute in the exam, it's heavily time consuming. Just try to derive what's required.

 

Option A.

0 0 votes

BEST ANSWER

R(A, B, C,D)

A----->B

B----->C

C----->D

D----->B

R1(A,B)                         R2(B,C)                           R3(B,D)

A----->B                         B----->C                          D----->B

                                     C----->B                           B----->D

 

Check Lossless Condition

R1         Intersection   R2  =  B  (Which is SK of R2)       So     R1R2(ABC)

R1R2    Intersection   R3  =  B  (Which is SK of R3)

So Lossless Satisfied.

--------------------------------------

Check Dependency preserving

Since in R1, R2 and R3  dependecy given : 

A----->B        B----->C     C----->B         B----->D        D----->B

all Dependency preserved according to original schema given : A----->B  ,      B----->C    , C----->D   According to (C---->B----D)       ,   D----->B

Answer is a (dependancy preserved and lossless decompostion)

                                                            

0 0 votes
The answer is A.

 

Best way to understand is to study about Closure. The way C --> D is preserved is by through  B --> C and D --> B, by concluding that these dependencies give C --> B. When we conclude this, R3(B,D) relation can be also be written as R3(C,D) which itself makes the dependency clear.
Answer:
Position:
Show:

Related questions

40 40 votes
7 answers 7 answers
15.3k
15.3k views
Ishrat Jahan asked Oct 28, 2014
15,277 views
Let $R (A, B, C, D, E, P, G)$ be a relational schema in which the following functional depen­dencies are known to hold: $AB \to CD, DE \to P, C \to E, P \to C$ and $B \to...
70 70 votes
10 answers 10 answers
26.3k
26.3k views
Ishrat Jahan asked Oct 29, 2014
26,298 views
Consider the following relational schema:$\text{Student} (\underline{\text{school-id}, \text{sch-roll-no}}, \text{sname}, \text{saddress})$$\text{School} (\underline{\tex...
68 68 votes
7 answers 7 answers
29.2k
29.2k views
Ishrat Jahan asked Oct 29, 2014
29,160 views
Consider the following relational schema:$\text{Student} (\underline{\text{school-id}, \text{sch-roll-no}}, \text{sname}, \text{saddress})$$\text{School} (\underline{\tex...
65 65 votes
10 answers 10 answers
27.5k
27.5k views
Ishrat Jahan asked Oct 28, 2014
27,460 views
Consider the following three schedules of transactions T1, T2 and T3. [Notation: In the following NYO represents the action Y (R for read, W for write) performed by trans...