-- Apr 29 In-Class Exercise Thread
Semi-joins:
Machine with R computes the values of C and sends it to machine with S, sends {c1, c2, c3, c4}
Machine with S computes join of S with these values and sends it to machine with R, sends{ {c2, d1}, {c2, d3} }
Machine with R uses these values to compute S natural join R, final answer is { {a2, b2, c2, d1}, {a2, b2, c2, d3} }
Send all of S:
Machine with S sends { {c2, d1}, {c5, d2}, {c2, c3}, {c6, d4} } to machine with R
Machine with R computes R natural join S which gives { {a2, b2, c2, d1}, {a2, b2, c2, d3} }
In this case, both methods send the same amount of data (8 pieces)
Semi-joins:
Machine with R computes the values of C and sends it to machine with S, sends {c1, c2, c3, c4}
Machine with S computes join of S with these values and sends it to machine with R, sends{ {c2, d1}, {c2, d3} }
Machine with R uses these values to compute S natural join R, final answer is { {a2, b2, c2, d1}, {a2, b2, c2, d3} }
Send all of S:
Machine with S sends { {c2, d1}, {c5, d2}, {c2, c3}, {c6, d4} } to machine with R
Machine with R computes R natural join S which gives { {a2, b2, c2, d1}, {a2, b2, c2, d3} }
In this case, both methods send the same amount of data (8 pieces)