edited by
35,217 views
101 votes
101 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
edited by

3 Answers

Best answer
137 votes
137 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
104 votes
104 votes

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

1 votes
1 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.

Answer:

Related questions

47 votes
47 votes
5 answers
2
52 votes
52 votes
5 answers
3
Ishrat Jahan asked Oct 29, 2014
18,039 views
Consider the following relational schema:$\text{Student} (\underline{\text{school-id}, \text{sch-roll-no}}, \text{sname}, \text{saddress})$$\text{School} (\underline{\tex...