Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Problem 5. (20 points) Assume that we have four relations R(A, B), S(A, C), T(A, D) and U(A, E) and the size (i.e., the number

image text in transcribed
Problem 5. (20 points) Assume that we have four relations R(A, B), S(A, C), T(A, D) and U(A, E) and the size (i.e., the number of rows) of each relation is as follows: TR = 1000, rs = 2000, rT = 4000, ru 3000 Also, assume that all at tributes of the relations are of the same length and we use hash join, so the cost of joining X E R, S,T,U) and Y E R, S. T,U) is approximately: where k is a constant, rx and ex denote the number of rows and the mber of columns of X, respectively, and ry and cy denote the numbe o rows and the number of coluns of Y Finally, assume that the size of a join always 0.1% of the size of the cross product (ie.. rx- 0.001 x ry). Under the above assumptions, find the lowest cost plan for computing RNS MTNU using dynamic programming and left-deep join rees. You need to complete the following table while finding the best plans (e.g., in the form of ((OND) ND) MD in the last line) and associated costs. Size Cost Best Plan SubquerTY RMS 2000 6000k(1000-2+2000.2)RMS RMU SMT SM U TMU RMSNT After solving the aove problems, please state the amount of time spent for this assignment Feel free to add comments or suggestions if any Problem 5. (20 points) Assume that we have four relations R(A, B), S(A, C), T(A, D) and U(A, E) and the size (i.e., the number of rows) of each relation is as follows: TR = 1000, rs = 2000, rT = 4000, ru 3000 Also, assume that all at tributes of the relations are of the same length and we use hash join, so the cost of joining X E R, S,T,U) and Y E R, S. T,U) is approximately: where k is a constant, rx and ex denote the number of rows and the mber of columns of X, respectively, and ry and cy denote the numbe o rows and the number of coluns of Y Finally, assume that the size of a join always 0.1% of the size of the cross product (ie.. rx- 0.001 x ry). Under the above assumptions, find the lowest cost plan for computing RNS MTNU using dynamic programming and left-deep join rees. You need to complete the following table while finding the best plans (e.g., in the form of ((OND) ND) MD in the last line) and associated costs. Size Cost Best Plan SubquerTY RMS 2000 6000k(1000-2+2000.2)RMS RMU SMT SM U TMU RMSNT After solving the aove problems, please state the amount of time spent for this assignment Feel free to add comments or suggestions if any

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: Ramez Elmasri, Sham Navathe

4th Edition

0321122267, 978-0321122261

More Books

Students also viewed these Databases questions