Question: This sets of questions test the understanding of basic database search operators. Consider a join R.A=S.B. We ignore the cost of output the result,
This sets of questions test the understanding of basic database search operators. Consider a join R.A=S.B. We ignore the cost of output the result, and measure the cost with the number of I/Os. Given the information about relations to be joined below: Relation S contains 20,000 tuples and has 10 tuples per block. Relation R contains 100,000 tuples and has 10 tuples per block. Attribute B is the primary key of S. In total, 52 blocks are available in memory. Assume neither relation has any index. a. (15) Describe a block nested join algorithm, Give the cost of joining R and S with a block nested loops join. b. (15) Describe a sort-merge join algorithm. Give the cost of joining R and S with a sort-merge join. c. (15) Describe a hash-join algorithm. Give the cost of joining R and S with a hash join.
Step by Step Solution
3.37 Rating (153 Votes )
There are 3 Steps involved in it
a SortMerge Join Algorithm The SortMerge Join algorithm is a common algorithm used to join two relations Here is how the SortMerge Join algorithm work... View full answer
Get step-by-step solutions from verified subject matter experts
