What is Lossless Join Decomposition in DBMS?

Learn via video course
FREE
View all courses
DBMS Course - Master the Fundamentals and Advanced Concepts
DBMS Course - Master the Fundamentals and Advanced Concepts
by Srikanth Varma
1000
5
Start Learning
DBMS Course - Master the Fundamentals and Advanced Concepts
DBMS Course - Master the Fundamentals and Advanced Concepts
by Srikanth Varma
1000
5
Start Learning
Topics Covered

When the relational model is not in an appropriate normal form, then the decomposition of a relationship is required. A table is broken into multiple tables which is known as decomposition. It is done to eliminate redundancy and inconsistency. Decomposition is categorized into two types- lossless join decomposition and dependency preserving.

In lossless join decomposition in DBMS, a relation R has to undergo decomposition into relations R1, and R2 and if we perform a natural join on the relations R1 and R2, the relation R which is the original relation is obtained. In short, the original relation can be obtained by using joins on the decomposed relations. Here the original data is preserved and it is ensured that the original data and the data after reconstruction should be the same.

Criteria of Lossless Join Decomposition in DBMS?

For lossless join decomposition, we select a common attribute. Attributes in DBMS are the descriptive properties which describe an entity. The criteria for selecting the same is that it has to be a candidate key or super key in either relation R1, R2, or both. In other words, the lossless join decomposition will take place when a minimum of one of these functional dependencies is in F+ (Functional dependency closure).

In addition, the following conditions must also be satisfied-

  • The union of the sub-relations Relation-1 and Relation-2 should be containing all the attributes that were present in the original relation R which got decomposed.
  • The intersection of sub-relations Relation-1 and Relation-2 is not allowed to be null. It is necessary for the sub-relation to contain a common attribute.

What are the Various Examples of a Lossless Join Decomposition?

Example 1

Consider the following relations- R = (D, E, F)

R1 = (D, E)

R2 = (E, F)

The relation R has 3 attributes D, E, and F. The relation R is decomposed into two relations Relation-1 and Relation-2. Relation-1 and Relation-2 both have two attributes. Both have a common attribute 'E'.

Now, let us draw a table of Relation R with raw data −

Also, it is important to remember that the value present in Column E should be unique. If there is a presence of a duplicate value, it is not possible for lossless join decomposition to take place.

R = (D, E, F)

DEF
781916
397691
782944

It is decomposed as follows-

R1(D, E)

DE
7819
3976
7829

R2(E, F)

EF
1916
7691
2944

Let us check the first condition. It was The union of the sub-relations R1 and R2 must contain all the attributes that are available in the original relation R before decomposition.

So, R1 U R2= R

DEF
781916
397691
782944

The relation obtained above is the same as the original relation R. We can say that it is an example of Lossless-join decomposition.

Learn more:

Conclusion

  • So, in lossless join decomposition in DBMS, a relation R is decomposed into relations R1, R2, and if we perform a natural join on the relations R1 and R2, the relation R which is the original relation is obtained.
  • Here the original data is preserved.
  • It mitigates redundancy.
  • It is also known as non-additive join decomposition.
  • The two main conditions for lossless join decomposition are- The union of the sub-relations R1 and R2 must contain all the attributes that are available in the original relation R before decomposition and the intersection of sub-relations R1 and R2 cannot be null.
  • The sub-relation must contain a common attribute and the common attribute must be unique also.