SlideShare a Scribd company logo
CONCEPTS OF QUERY PROCESSING
OVERVIEW OF KEY CONCEPTS IN QUERY EXECUTION AND OPTIMIZATION
INTRODUCTIONTO QUERY PROCESSING
• Query processing involves the steps and techniques used to translate a high-level query,
typically written in a declarative query language like SQL, into a series of operations that
can be executed by the database management system (DBMS) to retrieve the desired
data.
• Query processing plays a crucial role in database management systems (DBMS) for
several reasons like Efficiency, Performance Optimization, Scalability, Security,
Predictability etc.
• Steps involved in the query processing are Parsing,Translation, Optimization and
Execution.
CONVERTING SQL QUERIES INTO RELATIONAL ALGEBRA
• Converting high-level SQL queries into low-level relational algebra expressions involves
several steps, each transforming the query into a more structured and executable form.
• The steps of the process are Parsing,Translation, Logical Query Plan (Relational Algebra),
Optimization, Execution Plan Generation and Execution.
• These steps ensure that a high-level SQL query is systematically converted into low-level
relational algebra, optimized for performance, and executed efficiently by the DBMS.
RELATIONAL ALGEBRA OPERATORS
• Relational algebra is a theoretical foundation for manipulating relational databases, and it
comprises a set of operators that take one or two relations as input and produce a new
relation as output. Here’s an overview of the basic relational algebra operators: Selection
( )
σ , Projection (π), Union ( ), Difference ( ), Cartesian Product (×), Join ( ),
∪ − ⨝
Intersection ( ), Rename (
∩ )
ρ , Division (÷).
• These operators form the backbone of relational database query languages and enable
complex data retrieval and manipulation operations. Understanding these operators is
essential for working with relational databases effectively.
BASIC ALGORITHMS FOR EXECUTING QUERY OPERATIONS
• Executing query operations in a database involves various algorithms designed to
efficiently process and retrieve data. Here we are going to know some of the basic
algorithms used for executing query operations: Selection Algorithms, Projection
Algorithms, Join Algorithms,Aggregation Algorithms, Set Operations Algorithms and
Cartesian Product Algorithm.
• The key algorithms for the fundamental operations of selection, projection, and join in
relational databases: Selection Algorithms - Linear Search, Binary Search and Index-Based
Selection; Projection Algorithms - Tuple-by-Tuple and Sort-Based Projection; Join
Algorithms - Nested-Loop Join, Block Nested-Loop Join, Index Nested-Loop Join and
Merge Join and Hash Join.
QUERY TREES AND QUERY GRAPHS
• Query trees are tree-like structures that represent the sequence of operations needed to execute
a query in a relational database.They visually illustrate the order in which various relational algebra
operations are applied.
• Characteristics - Nodes: Each node represents a relational algebra operation (e.g., selection,
projection, join).Leaves:The leaf nodes represent base relations (tables). Edges: Edges indicate the
flow of data from one operation to the next.
• Query graphs are graphical representations used in query optimization to visualize the
relationships between different parts of a query.They show the flow of data between various query
operations and can help in understanding how different operations interact.
• Characteristics - Nodes: Each node represents a relation (table) or intermediate result. Edges:
Edges represent the operations (e.g., joins, selections) that connect these relations.
HEURISTIC OPTIMIZATION OF QUERY TREE
• Heuristic optimization in the context of database systems refers to the use of rule-based
techniques to improve the performance of query processing. Rather than finding the
absolutely optimal execution plan, heuristic optimization aims to find a good enough plan
quickly by applying a set of predefined rules or heuristics.
• Here are some common heuristics used in query optimization: Pushing Selections,
Combining Cartesian Products and Joins, Projection Pushdown, Join Reordering,
Aggregation and Grouping Early, Using Indexes and Eliminating Redundant Operations.
FUNCTIONAL DEPENDENCIES
• Functional dependencies are a fundamental concept in the context of relational
databases.They describe relationships between attributes in a relation (table), indicating
that one attribute (or a set of attributes) uniquely determines another attribute (or a set
of attributes).
• A functional dependency, denoted as , exists between two sets of attributes
𝑋→𝑌 𝑋
and in a relation if and only if, for any two tuples 1 and 2 in , whenever
𝑌 𝑅 𝑡 𝑡 𝑅
1[ ]= 2[ ], it must also hold that 1[ ]= 2[ ].In other words, if two tuples have
𝑡 𝑋 𝑡 𝑋 𝑡 𝑌 𝑡 𝑌
the same values for attributes in , they must also have the same values for attributes in
𝑋
.
𝑌
NORMAL FORMS
• Database normalization is the process of organizing the attributes and tables of a
relational database to minimize redundancy and dependency. It involves dividing large
tables into smaller, related tables and defining relationships between them to enhance
data integrity and reduce redundancy.
• Normalization involves organizing a database's attributes and tables to minimize
redundancy and dependency.The process is carried out in stages, each corresponding to
a specific normal form. Here's a brief overview of the common normal forms: First
Normal Form (1NF), Second Normal Form (2NF),Third Normal Form (3NF) and Boyce-
Codd Normal Form (BCNF).
CONCLUSION
• Optimization is a critical aspect of query processing in database management systems
(DBMS) for several reasons. Here's why optimization holds such immense importance in
ensuring query efficiency: Performance Improvement, Scalability, Cost Reduction, Improved
User Experience, Data Integrity and Accuracy and Energy Efficiency.
• Optimization is indispensable in query processing because it directly impacts performance,
scalability, cost, user experience, data integrity, and energy efficiency. By transforming queries
into the most efficient execution plans, optimization ensures that databases operate
effectively and sustainably, delivering faster and more reliable results.In a world where data
volumes are constantly growing, and user expectations are higher than ever, query
optimization is the key to maintaining efficient, responsive, and cost-effective database
systems.
THANKYOU
Presented by (MCA 1-D) Presented to
Aaradhya Dixit Dr. Komal Ma’am
Abhishek Joshi ADBMS
Sagar K 1st
Semester
Lovenesh Sharma
Sakshi Dadheech
Mudit Jha

More Related Content

Similar to Concepts of Query Processing in ADBMS.pptx (20)

PPTX
complete_DBMS_vtu_engineering presentation
ssuser8594b8
 
PPTX
Mastering-SQL-Your-Guide-to-Database-Development.pptx
Tpoint Tech || Online Education
 
PPTX
Query processing
Dr. C.V. Suresh Babu
 
PPTX
Week 2 - Database System Development Lifecycle-old.pptx
NurulIzrin
 
PDF
DBMS_in_5_hours__2__lyst1728638013316-invert.pdf
magadhcyberworld
 
PPTX
Data warehouse physical design
Er. Nawaraj Bhandari
 
PPT
Query Decomposition and data localization
Hafiz faiz
 
PDF
Elimination of data redundancy before persisting into dbms using svm classifi...
nalini manogaran
 
PPTX
Data warehouse 17 dimensional data model
Vaibhav Khanna
 
PPTX
Query processing and Optimization in Database
Yordanos Zewge
 
PPTX
Indexing Data in data Warehouse presentation.pptx
PratapDas26
 
PPTX
Advanced structure query language, Data science
nivetha10042003
 
PDF
Chapter 2.pdf WND FWKJFW KSD;KFLWHFB ASNK
alemunuruhak9
 
PPTX
Data warehouse
sudhir Pawar
 
PPTX
lec 4 Data warehouse course Advanced database.pptx
ssuserfa0e73
 
PPTX
Database management system (part 1)
KavithaA19
 
PPTX
The Database Management System DBMS.pptx
csehod38
 
PPT
Management information system database management
Online
 
DOC
Power Management in Micro grid Using Hybrid Energy Storage System
ijcnes
 
PPTX
Distributed DBMS - Unit 6 - Query Processing
Gyanmanjari Institute Of Technology
 
complete_DBMS_vtu_engineering presentation
ssuser8594b8
 
Mastering-SQL-Your-Guide-to-Database-Development.pptx
Tpoint Tech || Online Education
 
Query processing
Dr. C.V. Suresh Babu
 
Week 2 - Database System Development Lifecycle-old.pptx
NurulIzrin
 
DBMS_in_5_hours__2__lyst1728638013316-invert.pdf
magadhcyberworld
 
Data warehouse physical design
Er. Nawaraj Bhandari
 
Query Decomposition and data localization
Hafiz faiz
 
Elimination of data redundancy before persisting into dbms using svm classifi...
nalini manogaran
 
Data warehouse 17 dimensional data model
Vaibhav Khanna
 
Query processing and Optimization in Database
Yordanos Zewge
 
Indexing Data in data Warehouse presentation.pptx
PratapDas26
 
Advanced structure query language, Data science
nivetha10042003
 
Chapter 2.pdf WND FWKJFW KSD;KFLWHFB ASNK
alemunuruhak9
 
Data warehouse
sudhir Pawar
 
lec 4 Data warehouse course Advanced database.pptx
ssuserfa0e73
 
Database management system (part 1)
KavithaA19
 
The Database Management System DBMS.pptx
csehod38
 
Management information system database management
Online
 
Power Management in Micro grid Using Hybrid Energy Storage System
ijcnes
 
Distributed DBMS - Unit 6 - Query Processing
Gyanmanjari Institute Of Technology
 

Recently uploaded (20)

PPTX
ASSIGNMENT_1[1][1][1][1][1] (1) variables.pptx
kr2589474
 
PDF
Balancing Resource Capacity and Workloads with OnePlan – Avoid Overloading Te...
OnePlan Solutions
 
PDF
MiniTool Power Data Recovery Crack New Pre Activated Version Latest 2025
imang66g
 
PDF
How to Download and Install ADT (ABAP Development Tools) for Eclipse IDE | SA...
SAP Vista, an A L T Z E N Company
 
PDF
advancepresentationskillshdhdhhdhdhdhhfhf
jasmenrojas249
 
PDF
Infrastructure planning and resilience - Keith Hastings.pptx.pdf
Safe Software
 
PPTX
slidesgo-unlocking-the-code-the-dynamic-dance-of-variables-and-constants-2024...
kr2589474
 
PDF
How Agentic AI Networks are Revolutionizing Collaborative AI Ecosystems in 2025
ronakdubey419
 
PDF
AWS_Agentic_AI_in_Indian_BFSI_A_Strategic_Blueprint_for_Customer.pdf
siddharthnetsavvies
 
PPTX
GALILEO CRS SYSTEM | GALILEO TRAVEL SOFTWARE
philipnathen82
 
PDF
WatchTraderHub - Watch Dealer software with inventory management and multi-ch...
WatchDealer Pavel
 
PDF
Troubleshooting Virtual Threads in Java!
Tier1 app
 
PPT
Activate_Methodology_Summary presentatio
annapureddyn
 
PDF
Protecting the Digital World Cyber Securit
dnthakkar16
 
PDF
On Software Engineers' Productivity - Beyond Misleading Metrics
Romén Rodríguez-Gil
 
PDF
ChatPharo: an Open Architecture for Understanding How to Talk Live to LLMs
ESUG
 
PDF
SAP GUI Installation Guide for Windows | Step-by-Step Setup for SAP Access
SAP Vista, an A L T Z E N Company
 
PDF
Why Are More Businesses Choosing Partners Over Freelancers for Salesforce.pdf
Cymetrix Software
 
PDF
Generating Union types w/ Static Analysis
K. Matthew Dupree
 
PDF
Download iTop VPN Free 6.1.0.5882 Crack Full Activated Pre Latest 2025
imang66g
 
ASSIGNMENT_1[1][1][1][1][1] (1) variables.pptx
kr2589474
 
Balancing Resource Capacity and Workloads with OnePlan – Avoid Overloading Te...
OnePlan Solutions
 
MiniTool Power Data Recovery Crack New Pre Activated Version Latest 2025
imang66g
 
How to Download and Install ADT (ABAP Development Tools) for Eclipse IDE | SA...
SAP Vista, an A L T Z E N Company
 
advancepresentationskillshdhdhhdhdhdhhfhf
jasmenrojas249
 
Infrastructure planning and resilience - Keith Hastings.pptx.pdf
Safe Software
 
slidesgo-unlocking-the-code-the-dynamic-dance-of-variables-and-constants-2024...
kr2589474
 
How Agentic AI Networks are Revolutionizing Collaborative AI Ecosystems in 2025
ronakdubey419
 
AWS_Agentic_AI_in_Indian_BFSI_A_Strategic_Blueprint_for_Customer.pdf
siddharthnetsavvies
 
GALILEO CRS SYSTEM | GALILEO TRAVEL SOFTWARE
philipnathen82
 
WatchTraderHub - Watch Dealer software with inventory management and multi-ch...
WatchDealer Pavel
 
Troubleshooting Virtual Threads in Java!
Tier1 app
 
Activate_Methodology_Summary presentatio
annapureddyn
 
Protecting the Digital World Cyber Securit
dnthakkar16
 
On Software Engineers' Productivity - Beyond Misleading Metrics
Romén Rodríguez-Gil
 
ChatPharo: an Open Architecture for Understanding How to Talk Live to LLMs
ESUG
 
SAP GUI Installation Guide for Windows | Step-by-Step Setup for SAP Access
SAP Vista, an A L T Z E N Company
 
Why Are More Businesses Choosing Partners Over Freelancers for Salesforce.pdf
Cymetrix Software
 
Generating Union types w/ Static Analysis
K. Matthew Dupree
 
Download iTop VPN Free 6.1.0.5882 Crack Full Activated Pre Latest 2025
imang66g
 
Ad

Concepts of Query Processing in ADBMS.pptx

  • 1. CONCEPTS OF QUERY PROCESSING OVERVIEW OF KEY CONCEPTS IN QUERY EXECUTION AND OPTIMIZATION
  • 2. INTRODUCTIONTO QUERY PROCESSING • Query processing involves the steps and techniques used to translate a high-level query, typically written in a declarative query language like SQL, into a series of operations that can be executed by the database management system (DBMS) to retrieve the desired data. • Query processing plays a crucial role in database management systems (DBMS) for several reasons like Efficiency, Performance Optimization, Scalability, Security, Predictability etc. • Steps involved in the query processing are Parsing,Translation, Optimization and Execution.
  • 3. CONVERTING SQL QUERIES INTO RELATIONAL ALGEBRA • Converting high-level SQL queries into low-level relational algebra expressions involves several steps, each transforming the query into a more structured and executable form. • The steps of the process are Parsing,Translation, Logical Query Plan (Relational Algebra), Optimization, Execution Plan Generation and Execution. • These steps ensure that a high-level SQL query is systematically converted into low-level relational algebra, optimized for performance, and executed efficiently by the DBMS.
  • 4. RELATIONAL ALGEBRA OPERATORS • Relational algebra is a theoretical foundation for manipulating relational databases, and it comprises a set of operators that take one or two relations as input and produce a new relation as output. Here’s an overview of the basic relational algebra operators: Selection ( ) σ , Projection (π), Union ( ), Difference ( ), Cartesian Product (×), Join ( ), ∪ − ⨝ Intersection ( ), Rename ( ∩ ) ρ , Division (÷). • These operators form the backbone of relational database query languages and enable complex data retrieval and manipulation operations. Understanding these operators is essential for working with relational databases effectively.
  • 5. BASIC ALGORITHMS FOR EXECUTING QUERY OPERATIONS • Executing query operations in a database involves various algorithms designed to efficiently process and retrieve data. Here we are going to know some of the basic algorithms used for executing query operations: Selection Algorithms, Projection Algorithms, Join Algorithms,Aggregation Algorithms, Set Operations Algorithms and Cartesian Product Algorithm. • The key algorithms for the fundamental operations of selection, projection, and join in relational databases: Selection Algorithms - Linear Search, Binary Search and Index-Based Selection; Projection Algorithms - Tuple-by-Tuple and Sort-Based Projection; Join Algorithms - Nested-Loop Join, Block Nested-Loop Join, Index Nested-Loop Join and Merge Join and Hash Join.
  • 6. QUERY TREES AND QUERY GRAPHS • Query trees are tree-like structures that represent the sequence of operations needed to execute a query in a relational database.They visually illustrate the order in which various relational algebra operations are applied. • Characteristics - Nodes: Each node represents a relational algebra operation (e.g., selection, projection, join).Leaves:The leaf nodes represent base relations (tables). Edges: Edges indicate the flow of data from one operation to the next. • Query graphs are graphical representations used in query optimization to visualize the relationships between different parts of a query.They show the flow of data between various query operations and can help in understanding how different operations interact. • Characteristics - Nodes: Each node represents a relation (table) or intermediate result. Edges: Edges represent the operations (e.g., joins, selections) that connect these relations.
  • 7. HEURISTIC OPTIMIZATION OF QUERY TREE • Heuristic optimization in the context of database systems refers to the use of rule-based techniques to improve the performance of query processing. Rather than finding the absolutely optimal execution plan, heuristic optimization aims to find a good enough plan quickly by applying a set of predefined rules or heuristics. • Here are some common heuristics used in query optimization: Pushing Selections, Combining Cartesian Products and Joins, Projection Pushdown, Join Reordering, Aggregation and Grouping Early, Using Indexes and Eliminating Redundant Operations.
  • 8. FUNCTIONAL DEPENDENCIES • Functional dependencies are a fundamental concept in the context of relational databases.They describe relationships between attributes in a relation (table), indicating that one attribute (or a set of attributes) uniquely determines another attribute (or a set of attributes). • A functional dependency, denoted as , exists between two sets of attributes 𝑋→𝑌 𝑋 and in a relation if and only if, for any two tuples 1 and 2 in , whenever 𝑌 𝑅 𝑡 𝑡 𝑅 1[ ]= 2[ ], it must also hold that 1[ ]= 2[ ].In other words, if two tuples have 𝑡 𝑋 𝑡 𝑋 𝑡 𝑌 𝑡 𝑌 the same values for attributes in , they must also have the same values for attributes in 𝑋 . 𝑌
  • 9. NORMAL FORMS • Database normalization is the process of organizing the attributes and tables of a relational database to minimize redundancy and dependency. It involves dividing large tables into smaller, related tables and defining relationships between them to enhance data integrity and reduce redundancy. • Normalization involves organizing a database's attributes and tables to minimize redundancy and dependency.The process is carried out in stages, each corresponding to a specific normal form. Here's a brief overview of the common normal forms: First Normal Form (1NF), Second Normal Form (2NF),Third Normal Form (3NF) and Boyce- Codd Normal Form (BCNF).
  • 10. CONCLUSION • Optimization is a critical aspect of query processing in database management systems (DBMS) for several reasons. Here's why optimization holds such immense importance in ensuring query efficiency: Performance Improvement, Scalability, Cost Reduction, Improved User Experience, Data Integrity and Accuracy and Energy Efficiency. • Optimization is indispensable in query processing because it directly impacts performance, scalability, cost, user experience, data integrity, and energy efficiency. By transforming queries into the most efficient execution plans, optimization ensures that databases operate effectively and sustainably, delivering faster and more reliable results.In a world where data volumes are constantly growing, and user expectations are higher than ever, query optimization is the key to maintaining efficient, responsive, and cost-effective database systems.
  • 11. THANKYOU Presented by (MCA 1-D) Presented to Aaradhya Dixit Dr. Komal Ma’am Abhishek Joshi ADBMS Sagar K 1st Semester Lovenesh Sharma Sakshi Dadheech Mudit Jha