Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please do not copy other solutions. Thank you very much in advance! Product(pname, maker, price). Consider the SQL query: SELECT c.cname, c.president FROM Company c,

Please do not copy other solutions. Thank you very much in advance!

image text in transcribed

Product(pname, maker, price). Consider the SQL query: SELECT c.cname, c.president FROM Company c, Product p WHERE (c.cname-p.maker) AND (p.price 100) AND (c.city 'Madison') (a) Draw a logical query plan tree for the above SQL query. This plan tree should join Company and Product, then perform a selection on price and city, then project out cname and president. (b) Consider the logical query plan that you have drawn in Part a. Draw a new logical query plan that pushes selections and projections down as far as possible. Please state also the rules that you have applied (c) Given the following information: T(Company) 2000 records T(Product) - 20000 records B(Company) 200 pages B(Product) -200 pages Product, price) = 2500 V(Product, city) -40 You always used the block-nested loop join. Both relations are clustered M = 100 (pages) Please calculate IO cost for each query plan in (a) and (b)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Fundamentals Of Database Systems

Authors: Sham Navathe,Ramez Elmasri

5th Edition

B01FGJTE0Q, 978-0805317558

More Books

Students also viewed these Databases questions

Question

Explain what the hybrid aggregate plan is and why it is used.

Answered: 1 week ago

Question

Explain the function and purpose of the Job Level Table.

Answered: 1 week ago