Decomposition is the process of breaking a large table into smaller tables to remove redundancy and avoid anomalies. It helps in designing a clean, efficient, and consistent database system.
In the previous topic, we saw problems like insertion, update, and deletion anomalies. These issues occur because all data is stored in a single table.
Decomposition solves these problems by splitting the table into smaller, meaningful tables.
← Review Anomalies| StudentID | Name | Course | Fee |
|---|---|---|---|
| 101 | Aditya | DBMS | ₹4000 |
| 102 | Anjali | DBMS | ₹4000 |
| 101 | Aditya | DM | ₹3500 |
Here, course details are repeated multiple times, which can lead to anomalies.
Now data is separated properly and redundancy is removed.
Lossless decomposition ensures that no data is lost when we join the tables again.
If we break a table and later join it back, we should get the exact original table.
"Break karo, but data kabhi lose nahi hona chahiye."
Dependency preserving means all functional dependencies should still be maintained after decomposition.
We should not lose any relationship between attributes after splitting tables.
"Relations safe rehne chahiye, warna logic toot jayega."
Decomposition is a key step in normalization and database design.