Decomposition In DBMS (original) (raw)

Last Updated : 27 Apr, 2024

Decomposition refers to the division of tables into multiple tables to produce consistency in the data. In this article, we will learn about the Database concept. This article is related to the concept of Decomposition in DBMS. It explains the definition of Decomposition, types of Decomposition in DBMS, and its properties.

What is Decomposition in DBMS?

When we divide a table into multiple tables or divide a relation into multiple relations, then this process is termed Decomposition in DBMS. We perform decomposition in DBMS when we want to process a particular data set. It is performed in a database management system when we need to ensure consistency and remove anomalies and duplicate data present in the database. When we perform decomposition in DBMS, we must try to ensure that no information or data is lost.

Decomposition

Decomposition in DBMS

Types of Decomposition

There are two types of Decomposition:

Types of Decomposition

Types of Decomposition

Lossless Decomposition

The process in which where we can regain the original relation R with the help of joins from the multiple relations formed after decomposition. This process is termed as lossless decomposition. It is used to remove the redundant data from the database while retaining the useful information. The lossless decomposition tries to ensure following things:

Example:

There is a relation called R(A, B, C)

A B C
55 16 27
48 52 89

Now we decompose this relation into two sub relations R1 and R2

R1(A, B)

A B
55 16
48 52

R2(B, C)

B C
16 27
52 89

After performing the Join operation we get the same original relation

A B C
55 16 27
48 52 89

Lossy Decomposition

As the name suggests, lossy decomposition means when we perform join operation on the sub-relations it doesn't result to the same relation which was decomposed. After the join operation, we always found some extraneous tuples. These extra tuples genrates difficulty for the user to identify the original tuples.

Example:

We have a relation R(A, B, C)

A B C
1 2 1
2 5 3
3 3 3

Now , we decompose it into sub-relations R1 and R2

R1(A, B)

A B
1 2
2 5
3 3

R2(B, C)

B C
2 1
5 3
3 3

Now After performing join operation

A B C
1 2 1
2 5 3
2 3 3
3 5 3
3 3 3

Properties of Decomposition

Conclusion

Decomposition is an important term in Database Management system. It refers to the method of splitting the realtions into multiple relation so that database operations are performed efficiently. There are two types of decomposition one is lossless and the other is lossy decomposition. The properties of Decomposition helps us to maintain consistency, reduce redundant data and remove the anomalies.