0% found this document useful (0 votes)
396 views2 pages

Decomposition in Database

The document discusses decomposition in database management systems. Decomposition breaks a relation into multiple relations to normalize it. This removes redundancy, inconsistencies, and anomalies. There are two types of decomposition: horizontal and vertical. For decomposition to be lossless, it must satisfy lossless join decomposition and dependency preservation properties. Lossless join decomposition ensures the sub-relations can be joined back to recover the original relation without information loss. Dependency preservation means decomposing in a way that maintains all dependencies present in the original relation.

Uploaded by

Ayush Aggarwal
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
396 views2 pages

Decomposition in Database

The document discusses decomposition in database management systems. Decomposition breaks a relation into multiple relations to normalize it. This removes redundancy, inconsistencies, and anomalies. There are two types of decomposition: horizontal and vertical. For decomposition to be lossless, it must satisfy lossless join decomposition and dependency preservation properties. Lossless join decomposition ensures the sub-relations can be joined back to recover the original relation without information loss. Dependency preservation means decomposing in a way that maintains all dependencies present in the original relation.

Uploaded by

Ayush Aggarwal
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

Decomposition in DBMS

Decomposition in Database Management System is to break a relation into


multiple relations to bring it into an appropriate normal form. It helps to
remove redundancy, inconsistencies, and anomalies from a database. The
decomposition of a relation R in a relational schema is the process of replacing the
original relation R with two or more relations in a relational schema. Each of these
relations contains a subset of the attributes of R and together they include all
attributes of R.
Introduction

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:

Rules for Decomposition

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. Lossless Join Decomposition.


2. Dependency Preserving.

Lossless Join Decomposition

A lossless Join decomposition ensures two things:

• No information is lost while decomposing from the original relation.


• If we join back the sub decomposed relations, the same relation that was decomposed is
obtained.
We can follow certain rules to ensure that the decomposition is a lossless join
decomposition Let’s say we have a relation R and we decomposed it into R1 and R2, then the
rules 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.

Lossless vs Lossy Decomposition

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.

You might also like