buckets are managed much like blocks (need to keep count and information about where the records start and stop
-
- Dealing with overflow:
- essentially the same problem as single record collision resolution
-
- consecutive spill addressing: store the overflow records in the nearest available bucket
-
- bucket chaining: create an overflow area; a new bucket is created in the overflow area and a link made from the primary bucket to the new bucket
-
- overflow area
DELETIONS
more complicated than deletions from other structures
- we can't just make them empty
- the slot freed by the deletion must not interfere with searches
- need to be able to reuse the slot
progressive overflow searches *MUST* always end at an empty address (deletion sort of messes this up)
- can replace deleted record with tombstone
- must be able to distinguish between deletes records and empty addresses (why?)
-
if chained: we can follow the links and adjust them (like deletion from a linked list)
What about coalesced chains?
- can't just do as above because it's possible to end up placing a key ahead of it's home address
Deletions from Open Addressing schemes present a special problem: if we delete a value that happens to have a synonym, we won't even know to look at the synonym. We still want to re-open locations rather than just setting tombstones because if we don't we will eventually have to search the entire list, all of the time.
-
- One Solution:
What about deletion from tables inserted using Brent's Method or Binary Tree Insertion?
How would Algorithm R have to be changed?
- - we'd have to test the key to see if j is a suitable location for the key at i by hashing it and stepping to j
- - if not, i is discarded as a viable option
If j has a synonym it will be found this way (for sure?)
If no synonym is found, is it safe to leave the space as empty?