Query Processing

COMP9315 21T1 ♢ Query Processing ♢ [0/6]
❖ Query Processing


[Diagram:Pics/qproc/dbmsarch.png]

COMP9315 21T1 ♢ Query Processing ♢ [1/6]
❖ Query Processing (cont)

A query in SQL:

A query evaluator/processor :
Some DBMSs can save query plans for later re-use.
COMP9315 21T1 ♢ Query Processing ♢ [2/6]
❖ Query Processing (cont)

Internals of the query evaluation "black-box":

[Diagram:Pics/qproc/qproc0.png]

COMP9315 21T1 ♢ Query Processing ♢ [3/6]
❖ Query Processing (cont)

DBMSs provide several "flavours" of each RA operation.

For example:

Similarly, π  and  have versions to match specific query types.

COMP9315 21T1 ♢ Query Processing ♢ [4/6]
❖ Query Processing (cont)

We call these specialised version of RA operations RelOps.

One major task of the query processor:

Requires the query translator/optimiser to consider RelOps are realised at execution time
COMP9315 21T1 ♢ Query Processing ♢ [5/6]
❖ Terminology Variations

Relational algebra expression of SQL query

Execution plan as collection of RelOps Representation of RA operators and expressions
COMP9315 21T1 ♢ Query Processing ♢ [6/6]


Produced: 5 Apr 2021