Course Hero Logo

B show the resulting tree after deleting key 39 from

Course Hero uses AI to attempt to automatically extract content from documents to surface to you and others so you can study better, e.g., in search results, to enrich docs, and more. This preview shows page 8 - 12 out of 16 pages.

(b) Show the resulting tree after deleting key 39 from theoriginaltree. (4 points)
(c) Show the resulting tree after inserting key 24 into theoriginaltree. (4 points)
8
NetID:Problem 5(12 points)Query ProcessingConsider two relationsR(x, y) andS(x, z) with the following statistics:T(R) = 5,000,B(R) = 500 (each block contains 10 tuples),V(R, x) = 100 (number of distinct values of attributexinR),T(S) = 8,000,B(S) = 1,000 (each block contains 8 tuples),V(S, x) = 200 (number of distinct values of attributexinS),V(S, z) = 50 (number of distinct values of attributezinS) andz<100.Assume the memory buer has 101 blocks (M = 101)(a) Estimate the number of tuples inR./z<50S(3 points)
(b) Briefly describe the algorithm and compute the cost of join using a block nested-loop join. (5points)
9
NetID:(c) Now suppose we want to use sort-based join. Assuming that the number of tuples with thesamexvalue is not large, we can use the more efficient sort-based join approach below:(1) Create sorted sublists of size M, usingxas the sort key, for bothRandS.(2) Bring the first block of each sublist into the memory buer.(3) Repeatedly find the leastx-value, and output the join of all tuples fromRwith all tuplesfromSthat share this commonx-value. If the buer for one of the sublists is exhausted,then replenish it from disk.Please estimate the cost of applying this sort-join onRandS. Also, please state the require-ment on the number of memory blocks M (note: considering the maximum number of blocksK for holding tuples ofRandSwith the samexvalue.) (4 points)
10
NetID:

Upload your study docs or become a

Course Hero member to access this document

Upload your study docs or become a

Course Hero member to access this document

End of preview. Want to read all 16 pages?

Upload your study docs or become a

Course Hero member to access this document

Term
Spring
Professor
Winslett
Tags
Relational model, Query language, NetId

Newly uploaded documents

Show More

Newly uploaded documents

Show More

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture