Indexing (cont.)
Insertion in a B+ Tree Another B+ Tree
Insertion in a B+ Tree Now Insert
Insertion in a B+ Tree Need to split leaf
Insertion in a B+ Tree Need to split branch
Insertion in a B+ Tree After split
Deleting a Data Entry from a B+ Tree Start at root, find leaf L where entry belongs. Remove the entry. –If L is at least half-full, done! –If L has only d-1 entries, Try to re-distribute, borrowing from sibling (adjacent node with same parent as L). If re-distribution fails, merge L and sibling. If merge occurred, must delete entry (pointing to L or sibling) from parent of L. Merge could propagate to root, decreasing height.
Deletion from a B+ Tree Delete
Deletion from a B+ Tree After deleting May change to 40, or not
Deletion from a B+ Tree Now delete
Deletion from a B+ Tree After deleting 25 Need to rebalance Rotate
Deletion from a B+ Tree Now delete
Deletion from a B+ Tree After deleting 40 Rotation not possible Need to merge nodes 50
Deletion from a B+ Tree Final tree 50