Question: Consider we are using extendable hashing on a file that contains records with the following search-key values: (3, 9, 12, 15, 16, 17, 18, 20,
Consider we are using extendable hashing on a file that contains records with the following search-key values:
(3, 9, 12, 15, 16, 17, 18, 20, 21, 34, 44, 49)
Sketch the extendable hash structure (in the same order shown) for this file if the hash function is h(x) = x mod 8 and buckets can hold up to three records. Initially, the structure is empty, and global depth is 1.
Note:Use a directory of pointers to buckets. The directory structure doubles when a bucket overflows.
Q1.What are the final global and local depths of all the buckets in the hash structure?
Q2.Suppose following range query is given : select * from table where key > x and key <= y
Do you think this hash structure will efficiently answer the query? Why or why not?
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
