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

Create a data flow diagram, For your chosen project, you need to identify t...

For your chosen project, you need to identify the current problem that you wish your project to solve.  Produce a Problem Statement.  The Problem Statement should explain the purpo

How can you start mysql server, How can you Start MySQL Server? To star...

How can you Start MySQL Server? To start the mysql program type it is name in the command- line prompt. After starting mysql program just display A welcome letter using the

What is an entity relationship model, What is an entity relationship model?...

What is an entity relationship model? The entity relationship model is a set of basic objects known as entities and relationship between those objects. An entity is a thing or

Difference between left outer join and right outer join, Difference between...

Difference between LEFT OUTER JOIN and RIGHT OUTER JOIN In left outer join tuples from the left-hand-side relation which do not match any tuple in the right-hand-side relation

Explain the operation of the data warehouse, Using a labelled diagram expla...

Using a labelled diagram explain the operation of the Data Warehouse, define the basic architectural components and outline the main functionalities. Briefly explain the role an op

What is predictive modelling, Question : (a) Data mining is one of the...

Question : (a) Data mining is one of the best ways to analyse data and using software method, hidden and unexpected patterns and relationships in sets of data can be extracte

How can you map null values to other values while display, How can you map ...

How can you map NULL values to other values while display? IF( ) , IFNULL( ) keywords are used to do so. They are 'LIMIT' is used for the following kinds of problems: 1) Ans

What is 2nf, What is 2NF? A relation schema R is in 2NF if it is in 1NF...

What is 2NF? A relation schema R is in 2NF if it is in 1NF and every non-prime attribute A in R is fully functionally dependent on primary key.

What is hashing file organization, What is hashing file organization? ...

What is hashing file organization? In the hashing file organization, a hash function is computed on some attribute of every record. The result of the hash function specify in

A file manipulation command that extracts some records, A file manipulation...

A file manipulation command that extracts some of the records from a file is called ? A file manipulation command that extracts some of the records from a file is called SELECT

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