Decomposition in DBMS

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.

Why Do We Need Decomposition?

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

📊 Example (Before Decomposition)

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.

✨ After Decomposition

Now data is separated properly and redundancy is removed.

Types of Decomposition

🔗 Lossless Decomposition

Lossless decomposition ensures that no data is lost when we join the tables again.

💡 Simple Meaning

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

Dependency preserving means all functional dependencies should still be maintained after decomposition.

💡 Simple Meaning

We should not lose any relationship between attributes after splitting tables.

"Relations safe rehne chahiye, warna logic toot jayega."

Final Summary

Decomposition is a key step in normalization and database design.