S, (3) C in U is a foreign key to T, (4) these relations do not contain size (i.e., the number of rows) of each relation is as follows: TR = 4000, rs = 3000, rT = 2000, rU = 1000. ssume that all attributes of the relations are of the same length and we joining X e {R, S, T,U} and Y E {R, S,T,U} can be expressed as: k(ry ·cx +rY CY)

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question
Problem 6. (10 points) Consider four relations R(A, Z), S(B, A), T(C, B) and U(D, C) (the
primary keys are underlined). Assume that (1) A in S is a foreign key to R, (2) B in T is a foreign
key to S, (3) C in U is a foreign key to T, (4) these relations do not contain any null value, and
(5) the size (i.e., the number of rows) of each relation is as follows:
rR = 4000, rs = 3000, rT = 2000, ru = 1000.
Also, assume that all attributes of the relations are of the same length and we use hash join, so the
cost of joining X € {R, S, T,U} and Y E {R, S,T,U} can be expressed as:
k(rx cx +ry ·cy)
where k is a constant, rx and cx denote the number of rows and the number of columns of X,
respectively, and ry and cy denote the number of rows and the number of columns of Y (we ignore
the cost of producing the output relation).
Under the above assumptions, find the lowest cost plan for computing R É SAT MU using
dynamic programming and left-deep join trees. You need to complete the following table while
finding the best plans (e.g., in the form of ((O X D) M 0) M O in the last line) and associated costs.
Subquery
Size
Cost
BestPlan
RMS
3000
14000k = (4000 2+ 3000· 2)k]| RMS
RMT
RMU
SAT
SMU
TXU
RASMT
RMSMU
RMTWU
SATWU
RASATMU
Transcribed Image Text:Problem 6. (10 points) Consider four relations R(A, Z), S(B, A), T(C, B) and U(D, C) (the primary keys are underlined). Assume that (1) A in S is a foreign key to R, (2) B in T is a foreign key to S, (3) C in U is a foreign key to T, (4) these relations do not contain any null value, and (5) the size (i.e., the number of rows) of each relation is as follows: rR = 4000, rs = 3000, rT = 2000, ru = 1000. Also, assume that all attributes of the relations are of the same length and we use hash join, so the cost of joining X € {R, S, T,U} and Y E {R, S,T,U} can be expressed as: k(rx cx +ry ·cy) where k is a constant, rx and cx denote the number of rows and the number of columns of X, respectively, and ry and cy denote the number of rows and the number of columns of Y (we ignore the cost of producing the output relation). Under the above assumptions, find the lowest cost plan for computing R É SAT MU using dynamic programming and left-deep join trees. You need to complete the following table while finding the best plans (e.g., in the form of ((O X D) M 0) M O in the last line) and associated costs. Subquery Size Cost BestPlan RMS 3000 14000k = (4000 2+ 3000· 2)k]| RMS RMT RMU SAT SMU TXU RASMT RMSMU RMTWU SATWU RASATMU
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps

Blurred answer
Follow-up Questions
Read through expert solutions to related follow-up questions below.
Follow-up Question

You haven't given me the solution for the last row. Attached is image where the last row is circled that needs to have a solution. 

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:
3000, TT= 4000, ru 2000.
TR = 1000, rs =
Also, assume that all attributes of the relations are of the same length and we use hash join, so the
cost of joining X € {R, S, T, U} and Y € {R, S, T, U} is approximately:
k(rx cx+ry CY)
where k is a constant, rx and cx denote the number of rows and the number of columns of
X, respectively, and ry and cy denote the number of rows and the number of columns of Y.
Finally, assume that the size of a join is always 0.2% of the size of the cross product (i.e., rx=y=
0.002.TX.TY).
Under the above assumptions, find the lowest cost plan for computing R▷ S▷ T▷ U using
dynamic programming and left-deep join trees. You need to complete the following table while
finding the best plans (e.g., in the form of ((O)) in the last line) and associated costs.
Subquery
RAS
RAT
RAU
SAT
SAU
TAU
RAS T
RASAU
RATAU
SATMI
RAS TAU
Size
6000 8000k
Cost
Best Plan
[= (1000-2+ 3000-2)k] RS
Transcribed Image Text: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: 3000, TT= 4000, ru 2000. TR = 1000, rs = Also, assume that all attributes of the relations are of the same length and we use hash join, so the cost of joining X € {R, S, T, U} and Y € {R, S, T, U} is approximately: k(rx cx+ry CY) where k is a constant, rx and cx denote the number of rows and the number of columns of X, respectively, and ry and cy denote the number of rows and the number of columns of Y. Finally, assume that the size of a join is always 0.2% of the size of the cross product (i.e., rx=y= 0.002.TX.TY). Under the above assumptions, find the lowest cost plan for computing R▷ S▷ T▷ U using dynamic programming and left-deep join trees. You need to complete the following table while finding the best plans (e.g., in the form of ((O)) in the last line) and associated costs. Subquery RAS RAT RAU SAT SAU TAU RAS T RASAU RATAU SATMI RAS TAU Size 6000 8000k Cost Best Plan [= (1000-2+ 3000-2)k] RS
Solution
Bartleby Expert
SEE SOLUTION
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY