<b>Dynamic Hash Functions</b>



next up previous
Next: Comparison of Indexing Up: Indexing & Hashing Previous: Static Hash Functions

Dynamic Hash Functions

  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?

     
    Figure 8.10:   General extendable hash structure.

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

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

    2. If , then more than one entry in the bucket address table points to bucket .
  7. Note that in both cases we only need to rehash records in bucket .

  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 8.20.
  10. Advantages:
  11. Disadvantages:
  12. Summary: A highly attractive technique, provided we accept added complexity.



next up previous
Next: Comparison of Indexing Up: Indexing & Hashing Previous: Static Hash Functions



Page created and maintained by Osmar R. Zaï ane
Last Update: Wed Nov 15 11:12:38 PST 1995