Hw5 - CPS216 Data-Intensive Computing Systems Fall 2011 Assignment 5(Written Total points = 100 Due date Friday Oct 21 2011(5.00 PM Submission In

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
CPS216 Data-Intensive Computing Systems - Fall 2011 Assignment 5 (Written) Total points = 100. Due date: Friday, Oct. 21, 2011 (5.00 PM). Submission: In class, or email solutions in pdf or plain text to the TA. You can also drop o± the solutions at the TA’s o²ce. Do not forget to indicate your name on your submission. State all assumptions. For questions where descriptive solutions are required, you will be graded both on the correctness and clarity of your reasoning. Question 1 Points 15 This question is based on the following SQL query over tables R(A,B) and S(A,B). Select R.A, MAX(S.B) From R, S Where R.A = S.A and R.B < 20 Group By R.A Explain how MapReduce can be used most efciently to process this query. That is, explain how many MapReduce jobs are needed, and what the respective Map phase(s), Reduce phase(s), and Combine phase(s) will do. Keep your answer brief and to the point. A couple of sentences are enough to convey the main ideas. Question 2 Points 20 Consider the following SQL query over tables R ( A ), S ( A ), and T ( A ). Note that “Select Distinct” in SQL represents a duplicate-eliminating projection. Select Distinct R.A From R, S, T Where R.A = S.A and R.A = T.A If we have a table with R ( A, B ) tuples {{ 1 , a } , { 1 , b } , { 2 , c } , { 3 , d } , { 4 , e } , { 4 , f }} , then a duplicate- preserving projection on R.A will return { 1 , 1 , 2 , 3 , 4 , 4 } , while a duplicate-eliminating projection on R.A will return { 1 , 2 , 3 , 4 } . Figures 1(a)-(e) show ³ve logical plans. The logical operator π in Figure 1 represents a duplicate- eliminating projection. For example, π R.A represents a duplicate-eliminating projection of attribute
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

This document was uploaded on 01/17/2012.

Page1 / 5

Hw5 - CPS216 Data-Intensive Computing Systems Fall 2011 Assignment 5(Written Total points = 100 Due date Friday Oct 21 2011(5.00 PM Submission In

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online