28 Chapter 11 Indexing and
Hashing
11.9 The textbook description of static hashing assumes that a large contiguous
stretch of disk blocks can be allocated to a static hash table. Suppose you can
only allocate C contiguous blocks. Briefly sketch how to implement the hash
table, if it can be much larger than C blocks. Access to a block should still be
efficient.
. .
.3
11.10 What should you do to make sure that the worst case occupancy of a
B
+
-tree
is at least 75%?
. .
.2
11.11 Suppose I have a relation with
n
r
tuples on which I want to build a secondary
11.12 Suppose you want to efficiently support queries of the following form
select sum(A) from r where v1 < r.B and v2 > r.B
11.13 In extendible hashing, if the occupancy of a bucket is too low, what bucket(s)
are you allowed to merge the underfull bucket with?
. .
.2
11.14 Suppose we insert the following records into an extendible hash structure in
the order shown: (B,1), (D,1), (D,2), (M,1), (P,1), (P,2), (P,3). Assume that
B
11.15 Suppose that we are using extendible hashing on a file containing records with
the following search key values: 2,3,5,7,11,17,19,23,29
Show the extendible hash structure for this file if the hash function is h(x)
= x mod 8 and buckets can hold three records. Further, assume that we con–