Database Reference
In-Depth Information
SELECT *
FROM CUSTOMER
WHERE CUSTOMER_ZONE = 'North' and
CUST_BALANCE > 10000
You submit the query for execution and printing of the customer list for the VP.
What happens in the DBMS when your query is presented to it for execution? The
database engine coordinates the services of the query processor to go through
different steps and produce the results for the query. Figure 2-10 shows the steps of
the query execution.
Note the processing of the query through the following key steps:
Database engine initiates the execution.
Data dictionary determines the data elements needed.
Security module checks data access authorizations.
Query processor verifies language syntax.
Query optimizer subcomponent examines the query and creates an optimal
execution plan.
Query processor works with the database engine to execute the optimal plan.
Database engine interfaces with the operating system to retrieve the requested
data.
Query processor presents the data.
When you write and submit a query for execution, the query component takes
over and produces the result set. Apart from using direct queries, you also request
information through other means. You may use a form or screen to initiate the data
request. Data retrieval may also be through applications. The query processor com-
ponent is involved when you make data requests through other such methods.
Initiate query execution
Determine data elements
Customer
Data
DATABASE
ENGINE
Verify security authorization
QUERY PROCESSOR
DATA
REPOSITORY
Verify query language syntax
Query Optimizer
Security Module
Prepare execution plan
Structure of
Customer data
I/O Module
Execute query plan
Security Authori-
zations
DBMS
Retrieve requested data
DATA
DICTIONARY
Present query result
Figure 2-10
Query processor: query execution.
Search WWH ::




Custom Search