SlideShare a Scribd company logo
3
Most read
4
Most read
6
Most read
PHASES OF DISTRIBUTED
QUERY PROCESSING -I
PRESENTATION MEMBERS
-ANU ISSAC
-CRYSTAL CUTHINHO
-LEON D’SOUZA
-NEVIL D’SOUZA
-ANDREA FURTADO
• SQL , Parsing , The SQL query determines what data is to be found, but does not define the method by
which the data manager searches the database.
• Indexing, hashing, Views , ...
Phases of distributed query processing
OBJECTIVES OF QUERY PROCESSING
• First and main objective of query Processing, "To convert high level language(SQL) to low level
language(Relational Algebra)".
• In distributed systems, the query written on single machine but are actually executed on different local
database. as the local database provides the data to execute the query.
• A query can be processed using various techniques, such that the technique should be efficient to
execute the query in distributed environment.
• To minimize the overall cost of execution.(I/O cost + CPU cost +Communication cost).
• to minimize the time required to execute the query.(I/O time + CPU time +Communication time).
• This phase brings query into normalized form in order of easier processing of query.
• its specifically focus on the where clause of query.
2. ANALYSIS
• Lexical & Syntactical analysis
• Verification of relations & attributes
• Conflict between operations
• Checks if result is possible
2. ANALYSIS
SEMANTIC ANALYSIS :
1) Connection Graph:
aka Query Graph
2. ANALYSIS
SEMANTIC ANALYSIS :
2) Join Graph:
-Subgraph of connection graph
-Only join operations considered
3. SIMPLIFICATION
• Detects redundant predicates
• Transforms queries – makes them simple & efficient
• Not at the cost of semantic correctness
• Checks for factors responsible for redundancy
QUERY RESTRUCTURING
1. Rewrites Query into equivalent Relational Algebra
2. Makes use of a Query Tree or Operator Tree
• Leaf node for every relation in the query
• Non-leaf node for intermediate relation we can generate
• Root node for the result of a query
3.Sequence of operation is from Leaf towards the Root
4.Transformation Rules are applied .
EXAMPLE
• Q) Find the names of employees other than Raj who worked on CAD/CAM project for either one or two
years.
• Query:
SELECT Ename
FROM PROJ, ASG, EMP
WHERE ASG.ENO=EMP.ENO
AND ASG.PNO=PROJ.PNO
AND ENAME ≠ “Raj”
AND PROJ.PNAME=“CAD/CAM”
AND (DUR=12 OR DUR=24);
ΠENAME (P)
σDUR=12 ORDUR=24(S)
σPNAME=“CAD/CAM”(S)
σENAME≠“RAJ”(S)
Pno(J) ENO
PROJ
ASG
EMP
RESTRUCTURING
FRAGMENTATION:
• Forming relational algebraic queries to be used on fragmented relations.
• Generation of fragmented query is done by replacing the global relations with
fragmented relation in the query tree of distributed query.
• The generic tree still has some scope for reconstruction and simplification.
• Generic tree is used to generate a simpler and optimized query by using
reduction technique.
• Type of fragmentation determines the reduction technique to be used.
REDUCTION FOR HORIZONTAL FRAGMENTATION:
• Reduction of generic tree is done using either selection operation
or join operation.
• Selection operation: Produces an intermediate relation that
remains empty if there is contradiction between selection
predicate and definition of the fragment.
• Join operation: Detects useless join operation by commuting joins
with union operation.
EXAMPLE
• Consider the schemas:
EMP(ENO, ENAME, TITLE) , ASG(ENO, PNO, RESP, DUR)
• Consider the following query and fragmentation: Query: SELECT *
FROM EMP, ASG WHERE EMP.ENO=ASG.ENO
• Horizontal fragmentation:
∗ EMP1 = σENO ≤ “ E3”(EMP) ASG1 = σENO ≤ ” E3”(ASG)
EMP2 = σ “ E3””<ENO<” E6”(EMP) ASG2 = σENO> ” E3”(ASG) –
EMP3 = σENO> ” E6”(EMP)
USING SELECTION OPERATION
• Consider the query: SELECT * FROM EMP WHERE ENO=”E5”
• Here the leaf node that corresponds to Employee relation in the generic tree
can be replaced by reconstruction rule.
• The selection predicate has a contradiction with the definition of EMP1 and
EMP3 fragment and produces empty result.
Phases of distributed query processing
Department(deptno,dname,location)
• DEPT1= σ deptno<=10(Department)
• DEPT2= σ deptno>10(Department)
• Assume that the fragmention of employee relation is derived from department
• EMPi=Employee deptno DEPTi i=1,2
Select * from Employee,Department where depno>10 and Employee.deptno=Department.deptno.
Employee.deptno=Department.deptno
deptno>10
U
U
DEPT2
EMP1 EMP2
EMP2
Employee.deptno=Department.deptno
DEPT2DEPT1
Phases of distributed query processing

More Related Content

What's hot (20)

PPTX
Distributed DBMS - Unit 6 - Query Processing
Gyanmanjari Institute Of Technology
 
PDF
Dbms 3: 3 Schema Architecture
Amiya9439793168
 
PPS
Data models
Anuj Modi
 
PPTX
multi dimensional data model
moni sindhu
 
PPT
Ddbms1
pranjal_das
 
PPT
Distributed Database Management System
Hardik Patil
 
PPTX
All data models in dbms
Naresh Kumar
 
PPTX
object oriented methodologies
Amith Tiwari
 
PPTX
Introduction to distributed database
Sonia Panesar
 
PPTX
Distributed database
ReachLocal Services India
 
PPTX
Query processing and optimization (updated)
Ravinder Kamboj
 
PPTX
Data abstraction in DBMS
Papan Sarkar
 
PPTX
Multidimensional data models
774474
 
PPTX
Distributed DBMS - Unit 1 - Introduction
Gyanmanjari Institute Of Technology
 
PPTX
data abstraction in DBMS
BHARATH KUMAR
 
PPTX
Database abstraction
RituBhargava7
 
PPT
Normalisation - 2nd normal form
college
 
PPTX
Nosql-Module 1 PPT.pptx
Radhika R
 
PPTX
Lec 7 query processing
Md. Mashiur Rahman
 
PPTX
Data science.chapter-1,2,3
varshakumar21
 
Distributed DBMS - Unit 6 - Query Processing
Gyanmanjari Institute Of Technology
 
Dbms 3: 3 Schema Architecture
Amiya9439793168
 
Data models
Anuj Modi
 
multi dimensional data model
moni sindhu
 
Ddbms1
pranjal_das
 
Distributed Database Management System
Hardik Patil
 
All data models in dbms
Naresh Kumar
 
object oriented methodologies
Amith Tiwari
 
Introduction to distributed database
Sonia Panesar
 
Distributed database
ReachLocal Services India
 
Query processing and optimization (updated)
Ravinder Kamboj
 
Data abstraction in DBMS
Papan Sarkar
 
Multidimensional data models
774474
 
Distributed DBMS - Unit 1 - Introduction
Gyanmanjari Institute Of Technology
 
data abstraction in DBMS
BHARATH KUMAR
 
Database abstraction
RituBhargava7
 
Normalisation - 2nd normal form
college
 
Nosql-Module 1 PPT.pptx
Radhika R
 
Lec 7 query processing
Md. Mashiur Rahman
 
Data science.chapter-1,2,3
varshakumar21
 

Similar to Phases of distributed query processing (20)

PPTX
Query processing and Optimization in Database
Yordanos Zewge
 
PPT
Chapter15
gourab87
 
PPTX
LECTURE_06_DATABASE PROCESSING & OPTIMAZATION.pptx
AthosBeatus
 
PPTX
PPT-UEU-Database-Objek-Terdistribusi-Pertemuan-8.pptx
neju3
 
PDF
Parallelizing Pruning-based Graph Structural Clustering
煜林 车
 
PPTX
Lecture 5.pptx
Shafii8
 
PPTX
Presentación Oracle Database Migración consideraciones 10g/11g/12c
Ronald Francisco Vargas Quesada
 
PPTX
Query optimization
Zunera Bukhari
 
PDF
CH5_Query Processing and Optimization.pdf
amariyarana
 
PDF
PostgreSQL query planner's internals
Alexey Ermakov
 
PPT
Query Decomposition and data localization
Hafiz faiz
 
PPTX
DB LECTURE 5 QUERY PROCESSING.pptx
grahamoyigo19
 
PPT
Overview of query evaluation
avniS
 
PPT
Distributed query processing for Advance database technology .ppt
janaki raman
 
PPTX
Searching Algorithms
Afaq Mansoor Khan
 
PDF
Query trees
Shefa Idrees
 
PPT
Basic terminologies & asymptotic notations
Rajendran
 
PDF
Query Optimization - Brandon Latronica
"FENG "GEORGE"" YU
 
PPTX
Sql and PL/SQL Best Practices I
Carlos Oliveira
 
PPTX
Natural Language Query to SQL conversion using Machine Learning Approach
Minhazul Arefin
 
Query processing and Optimization in Database
Yordanos Zewge
 
Chapter15
gourab87
 
LECTURE_06_DATABASE PROCESSING & OPTIMAZATION.pptx
AthosBeatus
 
PPT-UEU-Database-Objek-Terdistribusi-Pertemuan-8.pptx
neju3
 
Parallelizing Pruning-based Graph Structural Clustering
煜林 车
 
Lecture 5.pptx
Shafii8
 
Presentación Oracle Database Migración consideraciones 10g/11g/12c
Ronald Francisco Vargas Quesada
 
Query optimization
Zunera Bukhari
 
CH5_Query Processing and Optimization.pdf
amariyarana
 
PostgreSQL query planner's internals
Alexey Ermakov
 
Query Decomposition and data localization
Hafiz faiz
 
DB LECTURE 5 QUERY PROCESSING.pptx
grahamoyigo19
 
Overview of query evaluation
avniS
 
Distributed query processing for Advance database technology .ppt
janaki raman
 
Searching Algorithms
Afaq Mansoor Khan
 
Query trees
Shefa Idrees
 
Basic terminologies & asymptotic notations
Rajendran
 
Query Optimization - Brandon Latronica
"FENG "GEORGE"" YU
 
Sql and PL/SQL Best Practices I
Carlos Oliveira
 
Natural Language Query to SQL conversion using Machine Learning Approach
Minhazul Arefin
 
Ad

More from Nevil Dsouza (7)

PDF
Nevil dsouza Resume 2020
Nevil Dsouza
 
DOCX
Nevil Dsouza's Resume
Nevil Dsouza
 
PPTX
German Movie and Theatre Industry
Nevil Dsouza
 
PPTX
Introduction and Comparison of Microprocessor Chip families
Nevil Dsouza
 
PPTX
Mobile communication systems Introduction
Nevil Dsouza
 
PPTX
Windows Networking Introduction
Nevil Dsouza
 
PDF
REPORT PPT 15-16
Nevil Dsouza
 
Nevil dsouza Resume 2020
Nevil Dsouza
 
Nevil Dsouza's Resume
Nevil Dsouza
 
German Movie and Theatre Industry
Nevil Dsouza
 
Introduction and Comparison of Microprocessor Chip families
Nevil Dsouza
 
Mobile communication systems Introduction
Nevil Dsouza
 
Windows Networking Introduction
Nevil Dsouza
 
REPORT PPT 15-16
Nevil Dsouza
 
Ad

Recently uploaded (20)

PPTX
DATA-COLLECTION METHODS, TYPES AND SOURCES
biggdaad011
 
PDF
apidays Helsinki & North 2025 - API-Powered Journeys: Mobility in an API-Driv...
apidays
 
PPTX
TSM_08_0811111111111111111111111111111111111111111111111
csomonasteriomoscow
 
PPTX
GenAI-Introduction-to-Copilot-for-Bing-March-2025-FOR-HUB.pptx
cleydsonborges1
 
PDF
What does good look like - CRAP Brighton 8 July 2025
Jan Kierzyk
 
PDF
How to Avoid 7 Costly Mainframe Migration Mistakes
JP Infra Pvt Ltd
 
PPTX
fashion industry boom.pptx an economics project
TGMPandeyji
 
PPTX
加拿大尼亚加拉学院毕业证书{Niagara在读证明信Niagara成绩单修改}复刻
Taqyea
 
PPT
01 presentation finyyyal معهد معايره.ppt
eltohamym057
 
PPTX
This PowerPoint presentation titled "Data Visualization: Turning Data into In...
HemaDivyaKantamaneni
 
PPTX
Usage of Power BI for Pharmaceutical Data analysis.pptx
Anisha Herala
 
PPTX
AI Project Cycle and Ethical Frameworks.pptx
RiddhimaVarshney1
 
PDF
How to Connect Your On-Premises Site to AWS Using Site-to-Site VPN.pdf
Tamanna
 
PPTX
Human-Action-Recognition-Understanding-Behavior.pptx
nreddyjanga
 
PDF
WEF_Future_of_Global_Fintech_Second_Edition_2025.pdf
AproximacionAlFuturo
 
DOCX
AI/ML Applications in Financial domain projects
Rituparna De
 
PDF
R Cookbook - Processing and Manipulating Geological spatial data with R.pdf
OtnielSimopiaref2
 
PDF
Incident Response and Digital Forensics Certificate
VICTOR MAESTRE RAMIREZ
 
PPTX
Slide studies GC- CRC - PC - HNC baru.pptx
LLen8
 
PDF
Context Engineering vs. Prompt Engineering, A Comprehensive Guide.pdf
Tamanna
 
DATA-COLLECTION METHODS, TYPES AND SOURCES
biggdaad011
 
apidays Helsinki & North 2025 - API-Powered Journeys: Mobility in an API-Driv...
apidays
 
TSM_08_0811111111111111111111111111111111111111111111111
csomonasteriomoscow
 
GenAI-Introduction-to-Copilot-for-Bing-March-2025-FOR-HUB.pptx
cleydsonborges1
 
What does good look like - CRAP Brighton 8 July 2025
Jan Kierzyk
 
How to Avoid 7 Costly Mainframe Migration Mistakes
JP Infra Pvt Ltd
 
fashion industry boom.pptx an economics project
TGMPandeyji
 
加拿大尼亚加拉学院毕业证书{Niagara在读证明信Niagara成绩单修改}复刻
Taqyea
 
01 presentation finyyyal معهد معايره.ppt
eltohamym057
 
This PowerPoint presentation titled "Data Visualization: Turning Data into In...
HemaDivyaKantamaneni
 
Usage of Power BI for Pharmaceutical Data analysis.pptx
Anisha Herala
 
AI Project Cycle and Ethical Frameworks.pptx
RiddhimaVarshney1
 
How to Connect Your On-Premises Site to AWS Using Site-to-Site VPN.pdf
Tamanna
 
Human-Action-Recognition-Understanding-Behavior.pptx
nreddyjanga
 
WEF_Future_of_Global_Fintech_Second_Edition_2025.pdf
AproximacionAlFuturo
 
AI/ML Applications in Financial domain projects
Rituparna De
 
R Cookbook - Processing and Manipulating Geological spatial data with R.pdf
OtnielSimopiaref2
 
Incident Response and Digital Forensics Certificate
VICTOR MAESTRE RAMIREZ
 
Slide studies GC- CRC - PC - HNC baru.pptx
LLen8
 
Context Engineering vs. Prompt Engineering, A Comprehensive Guide.pdf
Tamanna
 

Phases of distributed query processing

  • 1. PHASES OF DISTRIBUTED QUERY PROCESSING -I PRESENTATION MEMBERS -ANU ISSAC -CRYSTAL CUTHINHO -LEON D’SOUZA -NEVIL D’SOUZA -ANDREA FURTADO
  • 2. • SQL , Parsing , The SQL query determines what data is to be found, but does not define the method by which the data manager searches the database. • Indexing, hashing, Views , ...
  • 4. OBJECTIVES OF QUERY PROCESSING • First and main objective of query Processing, "To convert high level language(SQL) to low level language(Relational Algebra)". • In distributed systems, the query written on single machine but are actually executed on different local database. as the local database provides the data to execute the query. • A query can be processed using various techniques, such that the technique should be efficient to execute the query in distributed environment. • To minimize the overall cost of execution.(I/O cost + CPU cost +Communication cost). • to minimize the time required to execute the query.(I/O time + CPU time +Communication time). • This phase brings query into normalized form in order of easier processing of query. • its specifically focus on the where clause of query.
  • 5. 2. ANALYSIS • Lexical & Syntactical analysis • Verification of relations & attributes • Conflict between operations • Checks if result is possible
  • 6. 2. ANALYSIS SEMANTIC ANALYSIS : 1) Connection Graph: aka Query Graph
  • 7. 2. ANALYSIS SEMANTIC ANALYSIS : 2) Join Graph: -Subgraph of connection graph -Only join operations considered
  • 8. 3. SIMPLIFICATION • Detects redundant predicates • Transforms queries – makes them simple & efficient • Not at the cost of semantic correctness • Checks for factors responsible for redundancy
  • 9. QUERY RESTRUCTURING 1. Rewrites Query into equivalent Relational Algebra 2. Makes use of a Query Tree or Operator Tree • Leaf node for every relation in the query • Non-leaf node for intermediate relation we can generate • Root node for the result of a query 3.Sequence of operation is from Leaf towards the Root 4.Transformation Rules are applied .
  • 10. EXAMPLE • Q) Find the names of employees other than Raj who worked on CAD/CAM project for either one or two years. • Query: SELECT Ename FROM PROJ, ASG, EMP WHERE ASG.ENO=EMP.ENO AND ASG.PNO=PROJ.PNO AND ENAME ≠ “Raj” AND PROJ.PNAME=“CAD/CAM” AND (DUR=12 OR DUR=24);
  • 13. FRAGMENTATION: • Forming relational algebraic queries to be used on fragmented relations. • Generation of fragmented query is done by replacing the global relations with fragmented relation in the query tree of distributed query. • The generic tree still has some scope for reconstruction and simplification. • Generic tree is used to generate a simpler and optimized query by using reduction technique. • Type of fragmentation determines the reduction technique to be used.
  • 14. REDUCTION FOR HORIZONTAL FRAGMENTATION: • Reduction of generic tree is done using either selection operation or join operation. • Selection operation: Produces an intermediate relation that remains empty if there is contradiction between selection predicate and definition of the fragment. • Join operation: Detects useless join operation by commuting joins with union operation.
  • 15. EXAMPLE • Consider the schemas: EMP(ENO, ENAME, TITLE) , ASG(ENO, PNO, RESP, DUR) • Consider the following query and fragmentation: Query: SELECT * FROM EMP, ASG WHERE EMP.ENO=ASG.ENO • Horizontal fragmentation: ∗ EMP1 = σENO ≤ “ E3”(EMP) ASG1 = σENO ≤ ” E3”(ASG) EMP2 = σ “ E3””<ENO<” E6”(EMP) ASG2 = σENO> ” E3”(ASG) – EMP3 = σENO> ” E6”(EMP)
  • 16. USING SELECTION OPERATION • Consider the query: SELECT * FROM EMP WHERE ENO=”E5” • Here the leaf node that corresponds to Employee relation in the generic tree can be replaced by reconstruction rule. • The selection predicate has a contradiction with the definition of EMP1 and EMP3 fragment and produces empty result.
  • 18. Department(deptno,dname,location) • DEPT1= σ deptno<=10(Department) • DEPT2= σ deptno>10(Department) • Assume that the fragmention of employee relation is derived from department • EMPi=Employee deptno DEPTi i=1,2 Select * from Employee,Department where depno>10 and Employee.deptno=Department.deptno.