CS4482asg2_suggested_answers

CS4482asg2_suggested_answers - CS4482 Advanced Database...

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

View Full Document Right Arrow Icon
CS4482 Advanced Database Systems Assignment 2 1. [Only one case is shown here. There are other correct cases.] (a) & (b) First partitioning: 1. At each node, the processor P i reads the tuples of each relation that are on its disk D i , and sends each tuple to the appropriate node (block by block) based on hash function h 1 in parallel. The destination nodes write the tuples to the disks (as S i and R i ). Total number of blocks read = (100+200) * 5 = 1500 blocks Total number of block written = (100+200) * 5 = 1500 blocks Total number of block transfers between nodes = (100 +200) * 4/5 * 5 = 1200 blocks. Local hash-join: 2. Each processor P i further divides S i and R i into partitions using another hash function, h 2 and write them to the disk. Total number of blocks read and written = (100+200) * 2 * 5 = 3000 blocks 3. Each processor P i executes the build and probe phases of the hash-join algorithm on R i and S i to produce a partition of the final join result. Total number of blocks read = (100+200)*5=1500 blocks
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 note was uploaded on 01/11/2012 for the course CS CS4482 taught by Professor Drlee during the Winter '11 term at City University of Hong Kong.

Page1 / 3

CS4482asg2_suggested_answers - CS4482 Advanced Database...

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