Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask DBMS Expert


Home >> DBMS

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 ))....))

DBMS, Programming

  • Category:- DBMS
  • Reference No.:- M9542905

Have any Question?


Related Questions in DBMS

Questionsuppose a prolog database exists that gives

Question: Suppose a Prolog database exists that gives information about states and capital cities. Some cities are big, others small. Some states are eastern, others are western. a. Write a query to find all the small ca ...

Data mining assignment -in this assignment you are asked to

Data Mining Assignment - In this assignment you are asked to explore the use of neural networks for classification and numeric prediction. You are also asked to carry out a data mining investigation on a real-world data ...

Question 1 a- consider that you are asked to design an

Question: 1. (a)- Consider that you are asked to design an entity relationship diagram based on the below scenario: A university consists of a number of departments (id, d_name) and each department offers some courses. A ...

Question sql injection is in the top 10 owasp and common

Question : SQL Injection is in the top 10 OWASP and Common Weakness Enumeration. Using MySQL and PHP, show your own very short and simple application that is vulnerable to this attack. Provide another version that mitiga ...

Database design amp development assignment -assignment

Database Design & Development Assignment - Assignment title - Design and Implement a Relational Database for a local Print and Ink Refill Business. Learning Outcome - Use an appropriate design tool to design a relational ...

Solve the following questions using oracle you are not

Solve the following questions using Oracle. You are not allowed to use the syntax of any DBMS other than Oracle. Make sure to upload an electronic copy of your solution to your CSC335 TRACE folder. Name the file hw4.sql. ...

You are in a real estate business renting apartments to

You are in a real estate business renting apartments to customers. Your job is to define an appropriate schema using SQL DDL in MySQL. The relations are Property(Id, Address, NumberOfUnits), Unit(ApartmentNumber, Propert ...

Sql query assignment -for this assignment you are to write

SQL Query Assignment - For this assignment you are to write your answers in a word document. This assignment is in three parts: Part A (reporting queries), Part B (query performance), Part C (query design). For this assi ...

Question talk about the importance of pulling data from

Question : Talk about the importance of pulling data from worksheets into a single sheet also the ways excel could be a solution to a complex challenge. The response must be typed, single spaced, must be in times new rom ...

A taking an unnormalised list describe how you would

(a) Taking an unnormalised list, describe how you would normalise it using the normal forms technique and show how the result of this method is used. (b) You are currently in the process of developing a RDBMS for a natio ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As