Answered step by step
Verified Expert Solution
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!
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
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started