Query Optimization & Processing
Query Optimization & Processing
Processing
-Manisha Kapila
Query Optimization &
Processing
Query optimization is a difficult part of the query processing.
-Manisha Kapila
Query optimization provides faster query processing.
-Manisha Kapila
Query Processing includes translations on high level
Queries into low level expressions that can be used at
physical level of file system, query optimization and
actual execution of query to get the actual result.
-Manisha Kapila
-Manisha Kapila
Step 1:Parser and Translator
During parse call, the database performs
the following checks:
-Manisha Kapila
Step 2:Evaluation
Forthis, with addition to the relational
algebra translation, it is required to
annotate the translated relational algebra
expression with the instructions used for
specifying and evaluating each operation.
-Manisha Kapila
Query Evaluation Plan:
In order to fully evaluate a query, the system
needs to construct a query evaluation plan.
-Manisha Kapila
Step 3:Optimization
Although the system is responsible for constructing the
evaluation plan, the user does need not to write their query
efficiently.
-Manisha Kapila
Exhaustive Search Optimization
In these techniques, for a query, all possible query
plans are initially generated and then the best
plan is selected.
-Manisha Kapila
Heuristic Based Optimization
Heuristic based optimization uses rule-based optimization
approaches for query optimization.
Rules:
-Manisha Kapila
Perform all the projection as soon as achievable in the query.
Somewhat like a selection but this method helps in decreasing
the number of columns in the query.
What this means is that select only those sets of tables and/or
views which will result in a relatively lesser number of records
and are extremely necessary in the query. Obviously any query
will execute better when tables with few records are joined.
-Manisha Kapila
Query Tree:
A query tree is a tree data structure
representing a relational algebra expression.
-Manisha Kapila
Query Tree:
-Manisha Kapila
Temporal Databases
A Temporal Database is a database with built-in
support for handling time sensitive data.
-Manisha Kapila
However for many applications, it is important to
maintain the past or historical values and the time at
which the data was updated.
-Manisha Kapila
Temporal Databases store information about
states of the real world across time.
-Manisha Kapila
Examples of Temporal Databases
Healthcare Systems: Doctors need the
patients’ health history for proper diagnosis.
Information like the time a vaccination was given
or the exact time when fever goes high etc.
reservations is important.
Temporal Aspects
Thereare two different aspects of time in
temporal databases.
Static media
Dynamic media
Dimensional media
-Manisha Kapila
Contents of the Multimedia Databases
-Manisha Kapila
Media keyword data: Media keyword data are the keyword
description related to the generation of data. This data is also known as
content descriptive data. Examples of content descriptive data are
place, time, date of recording.
-Manisha Kapila
Types of Multimedia Applications:
-Manisha Kapila
Presentation applications – They involve delivery of multimedia
data subject to temporal constraint. Optimal viewing or listening
requires DBMS to deliver data at certain rate offering the quality of
service above a certain threshold. Here data is processed as it is
delivered. Example: Annotating of video and audio data, real-time
editing analysis.
-Manisha Kapila
Multimedia Database Applications:
Documents and record management: Industries which keep
a lot of documentation and records. Ex: Insurance claim industry.
Education and training: Multimedia sources can be used to
create resources useful in education and training. These are
popular sources of learning in recent days. Ex: Digital libraries.
Real-time monitoring and control: Multimedia presentation
when coupled with active database technology can be an
effective means for controlling and monitoring complex tasks.
Ex: Manufacture control
-Manisha Kapila
Challenges of Multimedia Databases
Multimedia databases contains data in a large type of formats such
as .txt(text), .jpg(images), .mp3(audio) etc. It is difficult to convert
one type of data format to another.
-Manisha Kapila