in Databases
1,421 views
6 votes
6 votes

Consider a relation $R\left ( A,B,C,D,E \right )$ and functional dependencies are 

$F=\left \{ AC\rightarrow B,C\rightarrow D,A\rightarrow E,C\rightarrow B \right \}$

Relation $R$ is decomposed into  $R_{1}\left ( A,B,C \right )$ and $R_{2}\left ( C,D \right )$

Then Is it a lossless decomposition?


I am getting doubt, how it can be not lossless decomposition?

in Databases
by
1.4k views

1 comment

It cannot be lossless because all the attributes are not present in this decomposition.
1
1

5 Answers

4 votes
4 votes
To check lossless decomposition using FD set it should satisfy all the below conditions:

1. Attribute(R1) ⋃ Attribute(R2) = Attribute(R)

2. Attribute(R1) ⋂ Attribute(R2) ≠ ∅

3. Attribute(R1) ⋂ Attribute(R2) = Attribute(R1)

                                or
Attribute(R1) ⋂ Attribute(R2) = Attribute(R2)


According to first condition,

            Attribute(R1) ⋃ Attribute(R2) = (A,B.C) ⋃ (C,D) = (A,B,C,D) ≠ R(A.B.C.D.E)

First condition fails so this is lossy decomposition.
1 vote
1 vote
It is a lossless decomposition as Candidate keys are A and C and all the given dependencies are present in the relation R.

4 Comments

All attributes are not in both relations,thats why this is lossy.
2
2
Is'nt relation R1 should decompose into R1 (A,B,C,E) ?
0
0

@Shubham Kumar 7 yes then it will be lossless if R1 relation is same as given by you

0
0
0 votes
0 votes
The new Relations R1 and R2 must preserve the Attributes of the original relation. Hence, the decomposition is lossy.

To check whether a given decomposition is lossy:

1. Check whether Attributes are preserved(all attributes must occur at least once in any of the decomposed relations.

2. The common attribute(s) between two relations must be a Candidate Key in one of the relations.
0 votes
0 votes
it is not a lossless decomposition.