0% found this document useful (0 votes)
78 views

3.query Proccessing System

This document discusses the query processing system and JDBC. The query processing system involves 4 steps: query tokenization, query processing, query optimization, and query execution. Query tokenization divides the SQL query into tokens. Query processing constructs a query tree from the tokens. Query optimization reduces execution time and optimizes memory usage. Query execution runs the optimized query tree. JDBC allows Java applications to interact with databases by providing an API. JDBC uses drivers to convert between Java database logic and query language representations so the database engine can execute queries.

Uploaded by

Rashmi Paniya
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
78 views

3.query Proccessing System

This document discusses the query processing system and JDBC. The query processing system involves 4 steps: query tokenization, query processing, query optimization, and query execution. Query tokenization divides the SQL query into tokens. Query processing constructs a query tree from the tokens. Query optimization reduces execution time and optimizes memory usage. Query execution runs the optimized query tree. JDBC allows Java applications to interact with databases by providing an API. JDBC uses drivers to convert between Java database logic and query language representations so the database engine can execute queries.

Uploaded by

Rashmi Paniya
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

JAVA Means DURGASOFT

1
nd
DURGASOFT, # 202,2 Floor,HUDAMaitrivanam,Ameerpet, Hyderabad - 500038,  040 – 64 51 27 86,
80 96 96 96 96, 9246212143 | www.durgasoft.com
JAVA Means DURGASOFT

Query Proccessing System


1)Query Tokenization

2)Query Processing

3)Query Optimization

4)Query Execution

Query Processing System:

When we submit an SQL Query to the Database then Database Engine will Perform the following
Steps.

Step1:
Query Tokenization:

This Phase will take SQL Query as an Input,divided into no.of tokens andGenerate Stream of
tokens as an output.

Step2:
Query Processing:

This phase will take Stream of tokens as an Input,constructs Query Tree with the Tokens,if Query
Tree Success then no Syntax error is available in the provided SQL Query.If Query Tree is not
Success then there are some syntax errors in the provided SQL Query.

2
nd
DURGASOFT, # 202,2 Floor,HUDAMaitrivanam,Ameerpet, Hyderabad - 500038,  040 – 64 51 27 86,
80 96 96 96 96, 9246212143 | www.durgasoft.com
JAVA Means DURGASOFT

Step3:
Query Optimization:

The main purpose of Query Optimization phase is to perform optimization on Query Tree in
order to reduce execution time and to optimize memory utilization.

Step4:

3
nd
DURGASOFT, # 202,2 Floor,HUDAMaitrivanam,Ameerpet, Hyderabad - 500038,  040 – 64 51 27 86,
80 96 96 96 96, 9246212143 | www.durgasoft.com
JAVA Means DURGASOFT

Query Execution:
This phase will take optimized Query Tree as an input and execute the Query by using
interpreters.

JDBC(Java DataBase Connectivity):

-->The process of interacting with the database from Java Applications is called as JDBC.

-->JDBC is an API,which will provide very good predefined library to connect with database from
JAVAApplications in order to perform the basic database operations:

-->In case of JDBC Applications we will define the database logic and Java application and we will
send a Java represented database logic to Database Engine.But database engine is unable to
execute the Java represented database logic,it should required the database logic in Query
Language Representations.

-->In the above context, to execute JDBC applications we should require a conversion
mechanism to convert the database logic from Java representations to Query language
representations and fromQuery language representations to Java representations.

-->In the above situation the required conversion mechanisms are available in the form
of a software called as "Driver".

4
nd
DURGASOFT, # 202,2 Floor,HUDAMaitrivanam,Ameerpet, Hyderabad - 500038,  040 – 64 51 27 86,
80 96 96 96 96, 9246212143 | www.durgasoft.com
JAVA Means DURGASOFT

5
nd
DURGASOFT, # 202,2 Floor,HUDAMaitrivanam,Ameerpet, Hyderabad - 500038,  040 – 64 51 27 86,
80 96 96 96 96, 9246212143 | www.durgasoft.com
JAVA Means DURGASOFT

6
nd
DURGASOFT, # 202,2 Floor,HUDAMaitrivanam,Ameerpet, Hyderabad - 500038,  040 – 64 51 27 86,
80 96 96 96 96, 9246212143 | www.durgasoft.com

You might also like