How does query tree represent relational algebra expression, Database Management System

Assignment Help:

How does a query tree represent a relational algebra expression?  Discuss any three rules for query optimisation, giving example as to when should each rule be applied.   

 Ans: A query tree is a tree structure which refers to a relational algebra expression. It denotes the input relations as leaf nodes of the tree, and denotes the relational algebra operations as internal nodes. An execution of the query tree contains executing an internal node operation while its operands are available and after that replacing that internal node by the relation which results from executing the operation. The execution terminates while the root node is executed and generates the result relation for the query.  For instance, the query tree for the relational algebra expression

  ∏E_No =(σp_No = 'DB2003' (Assigned_To) :

The three rules for query optimization are like this:

  • In a cascade (sequence) of ∏ operations, each one but the last one can be ignored :

   ∏1(∏2(......∏n ( R))) ≡ ∏1(R )

  • If a selection condition c includes just only those attributes A1, A2, .... An in the projection list, the two operations can be commuted :

   ∏A1, A2,......An (σC (R ) ≡ σC  (∏A1, A2, ......An (R ))..... ))

  • A conjunctive selection condition can be split up into a cascade of individual σ operations:

  σC1 AND C2 AND ....AND  Cn  (R ) ≡ σC1C2(....(σCn (R ))....))


Related Discussions:- How does query tree represent relational algebra expression

Explain the benefit of oom, Explain the benefit of OOM. Main benefits o...

Explain the benefit of OOM. Main benefits of object oriented modeling are development of system become fast, quality of the system get improve. It gives freedom of use of alrea

ER diagrams, explain exhaustively the problems associated with ER diagrams....

explain exhaustively the problems associated with ER diagrams. include illustrations in your answer

ER DIAGRAM, draw ER diagram of student entity and course entity where attri...

draw ER diagram of student entity and course entity where attribute of student entity are student roll, student name, student phone and student address and attribute of course enti

What is functional dependency, A Functional dependency is described by ...

A Functional dependency is described by X Y between two groups of attributes Y and X that are subsets of R specifies a constraint on the possible tuple that can make a relation

Forward recovery (redo), Forward Recovery (Redo): In this system the commit...

Forward Recovery (Redo): In this system the committed changes made by a transaction are reapplied to a previous copy of the database.                          In simpler

single products ordered, For Colorado customers calculate the number of si...

For Colorado customers calculate the number of single products ordered. If a product is purchased on multiple orders, it should be counted only single time. The result should conta

Update anomaly-data redundancy, Update Anomaly : This anomaly is occurred d...

Update Anomaly : This anomaly is occurred due to data redundancy. Redundant information makes updates more complex since, for example, varying the name of the instructor of MCS-014

What is a project operation, What is a PROJECT operation? The project o...

What is a PROJECT operation? The project operation is a unary operation that returns its argument relation with particular attributes left out. Projection is shown by pie (π).

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd