Relational Decomposition in DBMS
Relational decomposition is an important concept in database design and normalization. It involves breaking a large relation or table into smaller, well-structured relations to reduce redundancy, eliminate anomalies, and improve data consistency.
In this tutorial, we will learn what relational decomposition is, its types, lossless and lossy decomposition, dependency preservation, advantages, and practical examples.
Table of Contents

What is Decomposition in DBMS?
In a relational database, decomposition is the process of dividing a relation into two or more smaller relations while preserving the important information contained in the original relation.
Decomposition is commonly performed when a relation contains unnecessary redundancy or violates the principles of database normalization. A poorly designed table can result in problems such as:
- Data redundancy
- Update anomalies
- Insertion anomalies
- Deletion anomalies
- Data inconsistency
By decomposing the relation into smaller tables, we can organize data more efficiently and make the database easier to maintain.
A good decomposition should ideally satisfy two important properties:
- Lossless Join: The original relation can be reconstructed without generating incorrect or additional tuples.
- Dependency Preservation: The important functional dependencies can still be enforced after decomposition.
Complete Advance AI Topics: Click Here
SQL Tutorial: Click Here
Why is Relational Decomposition Important?
Relational decomposition plays a major role in database normalization. It helps separate unrelated information and reduces the amount of repeated data stored in a database.
The major benefits include:
- Reduces data redundancy.
- Improves data consistency.
- Eliminates insertion, deletion, and update anomalies.
- Makes database maintenance easier.
- Improves the overall organization of data.
- Supports higher normal forms such as 2NF, 3NF, and BCNF.
However, decomposition must be performed carefully. If the original relation cannot be correctly reconstructed from the decomposed relations, the decomposition may result in information loss or spurious tuples.
Types of Relational Decomposition
Two important properties used to evaluate relational decomposition are lossless join decomposition and dependency preserving decomposition.
1. Lossless Join Decomposition
A decomposition is called lossless or non-additive when the original relation can be reconstructed exactly by taking the natural join of the decomposed relations.
In simple terms, no information is lost and no incorrect additional tuples are introduced after joining the decomposed tables.
Example of Lossless Decomposition
Consider the following relation:
EMPLOYEE_DEPARTMENT
| EMP_ID | EMP_NAME | EMP_AGE | EMP_CITY | DEPT_ID | DEPT_NAME |
|---|---|---|---|---|---|
| 22 | Denim | 28 | Mumbai | 827 | Sales |
| 33 | Alina | 25 | Delhi | 438 | Marketing |
| 46 | Stephan | 30 | Bangalore | 869 | Finance |
| 52 | Katherine | 36 | Mumbai | 575 | Production |
| 60 | Jack | 40 | Noida | 678 | Testing |
We can decompose this relation into two smaller relations.
EMPLOYEE
| EMP_ID | EMP_NAME | EMP_AGE | EMP_CITY |
|---|---|---|---|
| 22 | Denim | 28 | Mumbai |
| 33 | Alina | 25 | Delhi |
| 46 | Stephan | 30 | Bangalore |
| 52 | Katherine | 36 | Mumbai |
| 60 | Jack | 40 | Noida |
DEPARTMENT
| EMP_ID | DEPT_ID | DEPT_NAME |
|---|---|---|
| 22 | 827 | Sales |
| 33 | 438 | Marketing |
| 46 | 869 | Finance |
| 52 | 575 | Production |
| 60 | 678 | Testing |
The common attribute between the two relations is EMP_ID. When we perform a natural join using this attribute, the original EMPLOYEE_DEPARTMENT relation can be reconstructed.
Therefore, this decomposition is a lossless join decomposition.
2. Dependency Preserving Decomposition
A decomposition is called dependency preserving when the functional dependencies of the original relation can still be enforced by checking the individual decomposed relations.
This property is important because we should not need to join multiple tables every time we want to verify whether a functional dependency is satisfied.
Example
Consider a relation:
R(A, B, C, D)
Suppose the functional dependency is:
A → BC
Now decompose the relation into:
R1(A, B, C)R2(A, D)
The dependency A → BC exists entirely within R1. Therefore, it can be enforced directly on R1.
Hence, this decomposition is dependency preserving with respect to the given functional dependency.
Lossless vs. Lossy Decomposition
The difference between lossless and lossy decomposition is important when designing relational databases.
| Feature | Lossless Decomposition | Lossy Decomposition |
|---|---|---|
| Meaning | The original relation can be reconstructed exactly. | The original relation cannot be reconstructed correctly. |
| Natural Join | Produces exactly the original tuples. | May produce additional or spurious tuples. |
| Information | No information is lost. | Information may be lost or become ambiguous. |
| Database Design | Preferred in database normalization. | Generally avoided. |
Lossless Join Condition
For a binary decomposition of a relation R into R1 and R2, the decomposition is lossless with respect to a set of functional dependencies F when the common attributes determine all attributes of at least one of the decomposed relations.
In other words, if:
R1 ∩ R2 → R1
or:
R1 ∩ R2 → R2
can be derived from the functional dependencies, then the decomposition is lossless.
This condition is commonly used to test whether a binary decomposition is lossless.
Example of Lossless Decomposition
Consider the relation:
Student(ID, Name, Class)
with the following data:
| ID | Name | Class |
|---|---|---|
| 101 | Anshul Sharma | BCA |
| 102 | Babita Kumari | MCA |
| 103 | Chirag Thakur | BCA |
| 104 | Dheeraj Kumar | MCA |
| 105 | Rahul Maini | BCA |
Suppose we decompose it into:
Student1(ID, Name)Student2(Name, Class)
The common attribute is Name.
If Name uniquely identifies the corresponding class in the original relation, then joining Student1 and Student2 on Name can reconstruct the original relation without generating spurious tuples.
Therefore, under that dependency assumption, the decomposition is lossless.
Important: A decomposition should not be declared lossless merely because the tables appear to contain the same information. The lossless property depends on the functional dependencies that hold on the relation.
Advantages of Relational Decomposition
Relational decomposition provides several advantages in database design:
- Reduces Redundancy: Repeated data can be separated into appropriate relations.
- Improves Consistency: Changes can be made in one appropriate location instead of multiple repeated records.
- Reduces Anomalies: Proper decomposition helps eliminate insertion, deletion, and update anomalies.
- Improves Organization: Related information is stored in logically separate tables.
- Easier Maintenance: Smaller relations are generally easier to manage and modify.
- Supports Normalization: Decomposition is an important technique for achieving higher normal forms.
Key Properties of Relational Decomposition
A good relational decomposition should consider the following properties:
- Attribute Preservation: All attributes of the original relation should be represented in the decomposed relations.
- Lossless Join: The original relation should be recoverable without generating incorrect tuples.
- Dependency Preservation: Important functional dependencies should remain enforceable after decomposition.
- Reduced Redundancy: Repeated storage of the same information should be minimized.
- Improved Data Integrity: The resulting relations should maintain the consistency and correctness of the data.
Frequently Asked Questions (FAQs)
YT:- DecodeIT
1. What is relational decomposition in DBMS?
Relational decomposition is the process of dividing a large relation into two or more smaller relations to reduce redundancy, eliminate anomalies, and improve database organization.
2. What is lossless decomposition?
A lossless decomposition is one in which the original relation can be reconstructed exactly by joining the decomposed relations. It does not introduce spurious tuples.
3. What is dependency preserving decomposition?
A dependency preserving decomposition allows the functional dependencies of the original relation to be enforced using the decomposed relations without requiring the original relation to be reconstructed.
4. What is lossy decomposition?
A lossy decomposition is a decomposition where joining the decomposed relations may produce incorrect or additional tuples, making it impossible to accurately reconstruct the original relation.
5. Why is decomposition used in database normalization?
Decomposition is used to reduce redundancy and eliminate insertion, deletion, and update anomalies while organizing data into well-structured relations.
6. What are the two important properties of decomposition?
The two major properties are lossless join and dependency preservation. A good decomposition should ideally satisfy both.
Conclusion
Relational decomposition is a fundamental technique in DBMS and database normalization. It involves breaking a large relation into smaller relations to reduce redundancy, improve consistency, and eliminate common database anomalies.
The two most important concepts associated with decomposition are lossless join and dependency preservation. A properly designed decomposition should allow the original data to be reconstructed accurately while preserving the important functional dependencies.
Understanding relational decomposition is essential for students, database developers, and anyone learning database design because it forms the foundation for creating efficient, consistent, and maintainable relational databases.
Keywords
Relational Decomposition, decomposition in DBMS, lossless decomposition, lossy decomposition, dependency preserving decomposition, lossless join, functional dependency, database normalization, relational database, DBMS, database design, normalization in DBMS