Database Systems · Linear Hashing and Hash Versus Index Comparison
When is a split triggered? (load-factor trigger)
Linear hashing always splits bucket (the split pointer's bucket), not necessarily the bucket that overflowed. Two triggers appear in textbooks: (i) load factor — split when the global load factor exceeds a threshold (like or ); (ii) overflow — split whenever an insertion causes an overflow (the simple variant in Elmasri–Navathe and Ramakrishnan–Gehrke). This chapter uses the load-factor trigger; follow the trigger stated in the question.
Trigger condition (records-per-bucket form, most common in GATE):
Capacity form (Elmasri–Navathe): with capacity ,
Procedure on each insertion of key :
- Insert into its correct bucket (using the search rule). If the bucket is full, put it in an overflow chain.
- Increment .
- If (or ): perform one split of bucket :
- Create new bucket number (the next free address).
- Redistribute records of bucket and the new bucket using : records with stay, records with go to the new bucket.
- ; .
- If : round ends → , ( is unchanged).
Trap: only one split per insertion, even if the load factor is still above after the split. (Some variants split until below ; the standard textbook version splits once per insertion. If a question says "split until load factor ≤ θ", do that instead — read the wording.)