Evaluation of Relational Algebra Expressions

The easy way to evaluate an expression is to simply evaluate one operation at a time. A disadvantage of this approach is the need to construct temporary relations. There are two approaches to evaluate several operations simultaneously i.e, pipelining and materialization.   

1. PIPELINING

This is an effective method to improve query evaluation efficiency by removing the number of temporary files that are produced. We execute this method bt combining several relational operations into a pipeline of operations, in which the result of on operations is passed along to the next operation in the pipeline.
Creating a pipeline of operations can provide two benefits:
1. It eliminates the cost of reading and writing temporary relations, reducing the cost of the query evaluation.
2. It can start generating results quickly if the root operator of a query language evaluation plan is combined in a pipeline with its inputs.

1. MATERIALIZATION

In this method, the given expression evaluates one relational operation at a time. Also, each operation is evaluated in an appropriate sequence or order. After evaluating all the operations, the outputs are materialized in a temporary relation for their subsequent uses. It leads the materialization method to a disadvantage. The disadvantage is that it needs to construct those temporary relations for materializing the results of the evaluated operations, respectively. These temporary relations are written on the disks unless they are small in size.

Post a Comment

0 Comments