Question: Q 1 [ 5 0 % ] Consider two relations r ( A , B ) and s ( C , D ) . Relation
Q Consider two relations rAB and sCD Relation r has tuples, and s has
tuples. tuples of r fit in one block, tuples of s fit in one block. Assume that the
system has a memory of M blocks.
a Estimate the minimum cost in number of block accesses of the equijoin with
rBsC using the following algorithms:
a nestedloops join,
b block nestedloops join,
c mergejoin assume that relations r and s are initially sorted
d hashjoin assume no overflow occurs and no recursive partitioning occurs.
b Assume that the block size is bytes. Suppose there are Btree indexes on
both rB and sC Neither of these two Btree indexes is primary index. For each block in the
two Btree indexes, bytes space is reserved for block header information eg isleaf
flag and number of entries Except one sibling access pointer, only key values and recordids
are stored in leaf nodes. Both key values, rB and sC are bytes long. A recordid and a
blockid each occupies bytes. Please estimate the minimum cost in number of block
accesses of running the index nested loops equijoin algorithm with rB sCAssume that
the join result contains N tuples.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
