Insertion into B-Trees
Overview of the method:
- find leaf node and position in node where entry would be stored
- if node is not full, insert entry into appropriate spot
- if node is full, split node into two half-full nodes
and promote middle element to parent
- if parent full, split and promote upwards
- if reach root, and root is full, make new root upwards
Note: if duplicates not allowed and key exists, may stop after step 1.
|