Identify a relational algebra tree

Assignment Help Database Management System
Reference no: EM13336573

Consider the following relational schema and SQL query. The schema captures information about employees, departments, and company finances (organized on a per department basis).

Emp (eid:integer, did:integer, sal:integer, hobby:char(20))

Dept (did:integer, dname:char(20), floor:integer, phone:char(10))

Finance (did:integer, budget:real, sales:real, expenses:real)4

Consider the following query:

SELECT D.dname, F.budget

FROM Emp E, Dept D, Finance F

WHERE E.did = D.did AND D.did = F.did AND D.floor = 1

AND E.sal ≥ 59000 AND E.hobby = ‘yodeling'

1. Identify a relational algebra tree (or a relational algebra expression if you prefer) that reflects the order of operations a decent query optimizer would choose.

2. List the join orders (i.e., orders in which pairs of relations can be joined to compute the query result) that a relational query optimizer will consider. (Assume that the optimizer follows the heuristic of never considering plans that require the computation of crossproducts.) Explain briefly how you arrived at your list.

3. Suppose that the following additional information is available: Unclustered B+ tree indexes exist on Emp.did, Emp.sal, Dept.floor,Dept.did, and Finance.did. The system's statistics indicate that employee salaries range from 10,000 to 60,000, employees enjoy 200 different hobbies, and the company owns two floors in the building. There are a total of 50,000 employees and 5,000 departments (each with corresponding financial information) in the database. The DBMS used by the company has just one join method available, index nested loops.

a. For each of the query's base relations (Emp, Dept, and Finance) estimate the number of tuples that would be initially selected from that relation if all of the nonjoin predicates on that relation were applied to it before any join processing begins.

b. Given your answer to the preceding question, which of the join orders considered by the optimizer has the lowest estimated cost?

 

Reference no: EM13336573

Questions Cloud

Modify the syntax of a programming language : Sometimes it is necessary to modify the syntax of a programming language. This is done by changing the CFG that the language uses. What changes would have to be made to ac's CFG (Figure) to implement the following changes?
Briefly explain the aries recovery algorithm : Briefly explain the ARIES recovery algorithm, including the main phases, main principles and key ideas behind the algorithm such as WAL protocol and checkpointing etc.
How many revolutions does the drum make during the fall : You are the technical consultant for an action-adventure film in which a stunt calls for the hero to drop off a 23.7-m tall building and land on the ground safely at a final vertical speed of 3.85 m/s. How many revolutions does the drum make during..
Compiler design problem : This is done by changing the CFG that the language uses and what changes would have to be made to ac's CFG
Identify a relational algebra tree : Identify a relational algebra tree (or a relational algebra expression if you prefer) that reflects the order of operations a decent query optimizer would choose.
Compute the magnitude of the magnetic flux through the loop : A solenoid with 1200 turns per meter has a diameter of 9.00 cm. A current I = 2.57 A flows in the clockwise direction, Find the magnitude of the magnetic flux through the loop
What is the cost of joining r and s using a sort-merge join : What is the cost of joining R and S using a page-oriented simple nested loops join? What is the minimum number of buffer pages required for this cost to remain unchanged?
What is the total i/o cost for sorting this file : How many sorted subfiles will there be after the initial pass of the sort, and how long will each subfile be?
What is the carts final velocity : A 100 N force has a horizontal component of 60 N and a vertical component of 80 N. What is the cart's final velocity

Reviews

Write a Review

Database Management System Questions & Answers

  Knowledge and data warehousing

Design a dimensional model for analysing Purchases for Adventure Works Cycles and implement it as cubes using SQL Server Analysis Services. The AdventureWorks OLTP sample database is the data source for you BI analysis.

  Design a database schema

Design a Database schema

  Entity-relationship diagram

Create an entity-relationship diagram and design accompanying table layout using sound relational modeling practices and concepts.

  Implement a database of courses and students for a school

Implement a database of courses and students for a school.

  Prepare the e-r diagram for the movie database

Energy in the home, personal energy use and home energy efficiency and Efficient use of ‘waste' heat and renewable heat sources

  Design relation schemas for the entire database

Design relation schemas for the entire database.

  Prepare the relational schema for database

Prepare the relational schema for database

  Data modeling and normalization

Data Modeling and Normalization

  Use cases perform a requirements analysis for the case study

Use Cases Perform a requirements analysis for the Case Study

  Knowledge and data warehousing

Knowledge and Data Warehousing

  Stack and queue data structure

Identify and explain the differences between a stack and a queue data structure

  Practice on topic of normalization

Practice on topic of Normalization

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