This preview shows pages 1–2. Sign up to view the full content.
1
CSE671  Introduction to DB Systems II
Homework 2
Due: in class, Jan. 28, 2008
Problem 1
: Extensible Hashing (30 points)
Consider indexing the following key values using an extensible hash table. Suppose that
we insert the keys in the order of
44, 36, 30, 56, 34, 62, 50, 22
The hash function h(n) for key n is h(n) = n mod 16; i.e., the hash function is the
remainder after the key value is divided by 16. Thus, the hash value is a 4bit value.
Assume that each bucket can hold 2 data items.
(1)
Draw the hash index (both the directory and the buckets), after the first four keys
are inserted. Show the keys themselves in the buckets, as well as the hash values.
Be sure to indicate the number of bits in the hash value that are used (in the
directory as well as each bucket).
(2)
Draw the hash index after all the keys are inserted.
Problem 2
: Linear Hashing vs. B+tree (40 points)
Consider indexing the following key values using a linear hash table and a B+ tree. Here
is the specification of these index structures.
The hash function h(n) for key n is h(n) = n mod 16; i.e., the hash function is the
This preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
This is the end of the preview. Sign up
to
access the rest of the document.
This note was uploaded on 04/13/2010 for the course CSE 671 taught by Professor Hakanferhatosmanoglu during the Winter '06 term at Ohio State.
 Winter '06
 HakanFerhatosmanoglu

Click to edit the document details