CS FundamentalsHardGATE CS

An extendible hash index has bucket capacity 2 and uses the low-order bits of the integer key as the hash value (the directory starts with global depth 0 and one bucket; an overflowing bucket is split and the directory is doubled only when the bucket's local depth equals the global depth). After inserting the keys 20, 3, 12, 28, 5, 13, 21, 45, 8, 52, 60, 37 in this order, what are the global depth and the number of distinct buckets?

  1. A. global depth 5, 12 buckets
  2. B. global depth 4, 10 buckets
  3. C. global depth 5, 10 buckets
  4. D. global depth 6, 11 buckets

Correct answer: C. global depth 5, 10 buckets

Simulating the splits (low-order bits, split by the next bit, directory doubling only when local depth equals global depth) ends with global depth 5 and 10 distinct buckets, so some directory entries share a bucket.

More DBMS and SQL questions

Exams that ask this topic