next up previous
Next: Comparison of Indexing and Up: Indexing & Hashing Previous: Hash Indices

Dynamic Hashing

  1. As the database grows over time, we have three options:
  2. Some hashing techniques allow the hash function to be modified dynamically to accommodate the growth or shrinking of the database. These are called dynamic hash functions.
  3. How does it work?

      figure314
    Figure 11.9:   General extendable hash structure.

  4. To find the bucket containing search key value tex2html_wrap_inline1097 :
  5. We now look at insertions in an extendable hashing scheme.
  6. Two cases exist:

    1. If tex2html_wrap_inline1109 , then only one entry in the bucket address table points to bucket j.

    2. If tex2html_wrap_inline1135 , then more than one entry in the bucket address table points to bucket j.
  7. Note that in both cases we only need to rehash records in bucket j.
  8. Deletion of records is similar. Buckets may have to be coalesced, and bucket address table may have to be halved.
  9. Insertion is illustrated for the example deposit file of Figure 11.20.
  10. Advantages:
  11. Disadvantages:
  12. Summary: A highly attractive technique, provided we accept added complexity.

next up previous
Next: Comparison of Indexing and Up: Indexing & Hashing Previous: Hash Indices

Osmar Zaiane
Mon Jul 13 13:28:03 PDT 1998