The materialization approach of query evaluation includes (from r

The materialization approach of query evaluation includes (from r
| The materialization approach of query evaluation includes (from root to leaf);

A. π, ∞ , σ

B. π, σ, ∞

C. σ, π, ∞

D. σ, ∞, π

Please scroll down to see the correct answer and solution guide.

Right Answer is: B

SOLUTION

Concept:

SQL query is implemented by a query plan which consider tree of relational operators in which each internal node operates on its children and then can choose different operator implementations.

Explanation:

The materialization approach of query evaluation includes first projection, then selection then final result from root to the leaf.

In query tree, leaf node created for each base relation, non-leaf node created for each intermediate relation produced by relational algebra operation. Root of the tree represents query result.

Example:

We have a two relational schemas : Sailors (sid, sname, rating, age)

Reserves: (sid, bid, day, rname)

Query is:

SELECT sid FROM Sailors NATURAL JOIN Reserves WHERE bid = 100 AND rating > 5

It will be like: πsidbid =1 00 AND rating> 5 (Sailors ∞ Reserves))