SlideShare a Scribd company logo
5
Most read
6
Most read
7
Most read
DECOMPOSITION
DATABASE MANAGEMENT
Module-I
Suggested books:
1. Database System Concepts Henry F. Korth and Silberschatz Abraham, Mc.Graw Hill.
2. Fundamentals of Database Systems”, Ramez Elmasri, Shamkant B.Navathe, Addison
Wesley
Agenda
• Decomposition
• Dependency Preservation
• Lossless and Lossy decomposition
• Examples
DECOMPOSITION
Definition :The decomposition of a schema R=A1…An is its replacement by
a collection DR = {R1 , R2 , …, Rm} of subsets of R such that R = R1Ս R2 Ս
… Ս Rm
Example : Assume the schema R=ABCD. The following are possible
decompositions of R.
R1 = {AB, CD}
R2 = {AB, ACD}
R3 = {A, BCD}
R4 = {AB, BC, CD, AD}
Decomposition are of two types:
• Lossless decomposition
• Lossy decomposition
Dependency Preservation in
Decomposition
Lossless Decomposition
Example: Consider a relation R(A,B,C,D) having the FD(s),
F={ABC,BC D). The relation is decomposed into two relation:
R1(A,B,C) and R2(B,C,D). Prove that the decomposition is lossless
decomposition.
Solution:
Step 1: Create initial table, entering bij values in each cell.
i-means row index and j-means
column index
Lossless Decomposition
Step 2: For each attribute mentioned in each partition Ri introduce aj on
column j
Step 3:Apply FDs to unify aj,bij symbols..
Using ABC we cannot consider because, R2 consist of b21 for A.
But using BCD we discover {a2,a3} {b14,a4}, hence b14 can be
replaced by a4.
As the first row now has aj values in each cell. Stop!
Decomposition R1 and R2 are lossless.
Decomposed Relation:
R1(A,B,C) and
R2(B,C,D).
Lossy Decomposition
Example: Consider a relation R(A,B,C,D) having the FD(s),
F={BC,D A). The relation is decomposed into two relation:
R1(B,C) and R2(A,D). Prove that the decomposition is lossy
decomposition.
Solution:
Step 1: Create initial table, entering bij values in each cell.
Step 2: For each attribute mentioned in each partition Ri introduce aj on column j
Step 3:Apply FDs to unify aj,bij symbols..
Using BC we cannot consider because, R2 consist of b22 for B. We
also cannot use DA because R1 consist of b14 for D.
** LHS must have similar value of aj then only RHS can be changed.
We cannot derive a full row with aj values- decomposition is lossy.
i-means row index and j-means
column index
Sample Example- Try it
1. R = (A, B, C, D, E). We decompose it into R1 = (A, B, C), R2 = (A, D, E).
The set of functional dependencies is: A → BC, CD → E, B → D, E → A.
Show that this decomposition is a lossless-join decomposition.
2. Consider a schema R(A,B,C,D) and functional dependencies A->B and
C->D. Then the decomposition of R into R1(A,B) and R2(C,D). Check
whether the decomposition is lossless or lossy.
3. Consider a relational schema R with attributes A, B, C, D, E and the set
of functional dependencies A → CD, B → CE, E → B. Decomposed
relations are R1 = (A, B, E), R2 = (A, C, D). Check whether the
decomposition is lossless or lossy.
THANK YOU

More Related Content

PPTX
Assemblers
PPSX
Functional dependency
PPTX
Sorting Algorithms
PDF
Database design & Normalization (1NF, 2NF, 3NF)
PPT
Infix prefix postfix
PPTX
Data structure - Graph
PPT
Advanced sql
PPTX
Binary Search Tree
Assemblers
Functional dependency
Sorting Algorithms
Database design & Normalization (1NF, 2NF, 3NF)
Infix prefix postfix
Data structure - Graph
Advanced sql
Binary Search Tree

What's hot (20)

PDF
Daa chapter 1
PPT
Spanning trees
PPTX
Database Concept - Normalization (1NF, 2NF, 3NF)
PPTX
Deque and its applications
PPTX
stack & queue
PDF
Algorithms Lecture 7: Graph Algorithms
PPTX
Access specifiers(modifiers) in java
PPTX
Phone Book project in Data Structure C
PPTX
single linked list
PPTX
Theory of automata and formal language
PPTX
Input-Buffering
PPTX
Automata theory - Push Down Automata (PDA)
PPT
Data Structure and Algorithms Linked List
PPTX
10 Regular VS Non Regular Language.pptx
PPT
Unit 4 external sorting
PDF
Array data structure
PDF
NFA to DFA
PPTX
PPTX
Semaphore
PDF
Convert ER diagram to Relational model and Normalization
Daa chapter 1
Spanning trees
Database Concept - Normalization (1NF, 2NF, 3NF)
Deque and its applications
stack & queue
Algorithms Lecture 7: Graph Algorithms
Access specifiers(modifiers) in java
Phone Book project in Data Structure C
single linked list
Theory of automata and formal language
Input-Buffering
Automata theory - Push Down Automata (PDA)
Data Structure and Algorithms Linked List
10 Regular VS Non Regular Language.pptx
Unit 4 external sorting
Array data structure
NFA to DFA
Semaphore
Convert ER diagram to Relational model and Normalization
Ad

Similar to Decomposition in DBMS- check the lossless and lossy concept (20)

PPT
Lecture 06 relational algebra and calculus
PPT
Introduction to Schema refinement lecture notes.ppt
PPT
PDF
Introduction to database-Normalisation
DOC
Final relation1 m_tech(cse)
DOC
Final relation1 m_tech(cse)
DOC
Final relation1 m_tech(cse)
PDF
L8 design1
PDF
Lecture 3 (4).pdfbbbbbbbbbbbbbbbbbbbvvvvvvvvvvvvvvvvvvvvvvvvv
PDF
Lecture 3 (2).pdf,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
PPT
Relations
PPT
Normalizations
PPTX
slide-week1_Introduction to Relation.pptx
PPTX
Relation and function_xii
PPT
Functional dependency in relational database
PDF
PPT
Module 2 - part i
PDF
Database Management System [DBMS]
Lecture 06 relational algebra and calculus
Introduction to Schema refinement lecture notes.ppt
Introduction to database-Normalisation
Final relation1 m_tech(cse)
Final relation1 m_tech(cse)
Final relation1 m_tech(cse)
L8 design1
Lecture 3 (4).pdfbbbbbbbbbbbbbbbbbbbvvvvvvvvvvvvvvvvvvvvvvvvv
Lecture 3 (2).pdf,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
Relations
Normalizations
slide-week1_Introduction to Relation.pptx
Relation and function_xii
Functional dependency in relational database
Module 2 - part i
Database Management System [DBMS]
Ad

Recently uploaded (20)

PDF
Operating System & Kernel Study Guide-1 - converted.pdf
PPTX
Infosys Presentation by1.Riyan Bagwan 2.Samadhan Naiknavare 3.Gaurav Shinde 4...
PDF
Model Code of Practice - Construction Work - 21102022 .pdf
PPTX
Engineering Ethics, Safety and Environment [Autosaved] (1).pptx
PPTX
FINAL REVIEW FOR COPD DIANOSIS FOR PULMONARY DISEASE.pptx
PPTX
UNIT-1 - COAL BASED THERMAL POWER PLANTS
PPTX
Geodesy 1.pptx...............................................
PDF
keyrequirementskkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
PDF
Well-logging-methods_new................
PDF
Evaluating the Democratization of the Turkish Armed Forces from a Normative P...
PPTX
CYBER-CRIMES AND SECURITY A guide to understanding
PDF
Mohammad Mahdi Farshadian CV - Prospective PhD Student 2026
PPT
Mechanical Engineering MATERIALS Selection
DOCX
573137875-Attendance-Management-System-original
PDF
Enhancing Cyber Defense Against Zero-Day Attacks using Ensemble Neural Networks
PDF
Human-AI Collaboration: Balancing Agentic AI and Autonomy in Hybrid Systems
PPTX
Current and future trends in Computer Vision.pptx
PDF
PPT on Performance Review to get promotions
PDF
R24 SURVEYING LAB MANUAL for civil enggi
PDF
The CXO Playbook 2025 – Future-Ready Strategies for C-Suite Leaders Cerebrai...
Operating System & Kernel Study Guide-1 - converted.pdf
Infosys Presentation by1.Riyan Bagwan 2.Samadhan Naiknavare 3.Gaurav Shinde 4...
Model Code of Practice - Construction Work - 21102022 .pdf
Engineering Ethics, Safety and Environment [Autosaved] (1).pptx
FINAL REVIEW FOR COPD DIANOSIS FOR PULMONARY DISEASE.pptx
UNIT-1 - COAL BASED THERMAL POWER PLANTS
Geodesy 1.pptx...............................................
keyrequirementskkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
Well-logging-methods_new................
Evaluating the Democratization of the Turkish Armed Forces from a Normative P...
CYBER-CRIMES AND SECURITY A guide to understanding
Mohammad Mahdi Farshadian CV - Prospective PhD Student 2026
Mechanical Engineering MATERIALS Selection
573137875-Attendance-Management-System-original
Enhancing Cyber Defense Against Zero-Day Attacks using Ensemble Neural Networks
Human-AI Collaboration: Balancing Agentic AI and Autonomy in Hybrid Systems
Current and future trends in Computer Vision.pptx
PPT on Performance Review to get promotions
R24 SURVEYING LAB MANUAL for civil enggi
The CXO Playbook 2025 – Future-Ready Strategies for C-Suite Leaders Cerebrai...

Decomposition in DBMS- check the lossless and lossy concept

  • 2. Module-I Suggested books: 1. Database System Concepts Henry F. Korth and Silberschatz Abraham, Mc.Graw Hill. 2. Fundamentals of Database Systems”, Ramez Elmasri, Shamkant B.Navathe, Addison Wesley
  • 3. Agenda • Decomposition • Dependency Preservation • Lossless and Lossy decomposition • Examples
  • 4. DECOMPOSITION Definition :The decomposition of a schema R=A1…An is its replacement by a collection DR = {R1 , R2 , …, Rm} of subsets of R such that R = R1Ս R2 Ս … Ս Rm Example : Assume the schema R=ABCD. The following are possible decompositions of R. R1 = {AB, CD} R2 = {AB, ACD} R3 = {A, BCD} R4 = {AB, BC, CD, AD} Decomposition are of two types: • Lossless decomposition • Lossy decomposition
  • 6. Lossless Decomposition Example: Consider a relation R(A,B,C,D) having the FD(s), F={ABC,BC D). The relation is decomposed into two relation: R1(A,B,C) and R2(B,C,D). Prove that the decomposition is lossless decomposition. Solution: Step 1: Create initial table, entering bij values in each cell. i-means row index and j-means column index
  • 7. Lossless Decomposition Step 2: For each attribute mentioned in each partition Ri introduce aj on column j Step 3:Apply FDs to unify aj,bij symbols.. Using ABC we cannot consider because, R2 consist of b21 for A. But using BCD we discover {a2,a3} {b14,a4}, hence b14 can be replaced by a4. As the first row now has aj values in each cell. Stop! Decomposition R1 and R2 are lossless. Decomposed Relation: R1(A,B,C) and R2(B,C,D).
  • 8. Lossy Decomposition Example: Consider a relation R(A,B,C,D) having the FD(s), F={BC,D A). The relation is decomposed into two relation: R1(B,C) and R2(A,D). Prove that the decomposition is lossy decomposition. Solution: Step 1: Create initial table, entering bij values in each cell. Step 2: For each attribute mentioned in each partition Ri introduce aj on column j Step 3:Apply FDs to unify aj,bij symbols.. Using BC we cannot consider because, R2 consist of b22 for B. We also cannot use DA because R1 consist of b14 for D. ** LHS must have similar value of aj then only RHS can be changed. We cannot derive a full row with aj values- decomposition is lossy. i-means row index and j-means column index
  • 9. Sample Example- Try it 1. R = (A, B, C, D, E). We decompose it into R1 = (A, B, C), R2 = (A, D, E). The set of functional dependencies is: A → BC, CD → E, B → D, E → A. Show that this decomposition is a lossless-join decomposition. 2. Consider a schema R(A,B,C,D) and functional dependencies A->B and C->D. Then the decomposition of R into R1(A,B) and R2(C,D). Check whether the decomposition is lossless or lossy. 3. Consider a relational schema R with attributes A, B, C, D, E and the set of functional dependencies A → CD, B → CE, E → B. Decomposed relations are R1 = (A, B, E), R2 = (A, C, D). Check whether the decomposition is lossless or lossy.