Estimation of I/Os  Cost for Join Algorithm

$9.00$4.00548 reads

Question

Consider the join R 1R:a=S:b S of relations R and S with the following information.

R has 10,000 tuples and a blocking factor of 10.

S has 2,000 tuples and a blocking factor of 10.

S.b is the primary key of S.

Both R and S are stored in simple heap files and neither relation has any index.

Up to 52 buffer frames available.

For each of the three join algorithms: (a) Blocked nested-loop join, (b) Sort-merge join, and

(c) Hash join, answer the following questions. Unless stated otherwise, the join cost should

be the number of page I/Os excluding the cost for writing the join result.

(a) Estimate the I/O cost and the number of buffer frames that is needed to obtain that cost.

(b) What is the best cost of the join algorithm if additional buffer is available? How many

buffer frames are required to obtain that cost?

(c) How many blocks does the join result contain?

(d) If R:a is a foreign key referencing S:b, how would the answers to the previous questions

change?

Summary

This question belongs to computer science and discusses about join cost for three algorithms.

Word count: NA

 

Add to Cart