Decomposition in Database
Decomposition in Database
If a relation is not properly decomposed, then it may lead to other problems like information
loss, etc. There are two types of decomposition as shown below:
Whenever we decompose a relation, there are certain properties that must be satisfied to ensure
no information is lost while decomposing the relations. These properties are:
1. The union of attributes of both the sub relations R1 and R2 must contain all the attributes
of original relation R.
R1 ∪ R2 = R
2. The intersection of attributes of both the sub relations R1 and R2 must not be null, i.e.,
there should be some attributes that are present in both R1 and R2.
R1 ∩ R2 ≠ ∅
3. The intersection of attributes of both the sub relations R1 and R2 must be the superkey of
R1 or R2, or both R1 and R2.
R1 ∩ R2 = Super key of R1 or R2
Dependency Preserving
The second property of lossless decomposition is dependency preservation which says that
after decomposing a relation R into R1 and R2, all dependencies of the original relation R
must be present either in R1 or R2 or they must be derivable using the combination of
functional dependencies present in R1 and R2.
In a lossy decomposition, one or more of these conditions would fail and we will not be able
to recover Complete information as present in the original relation.