Records live in leaves
Internal keys guide the search but do not represent separate records. Every inserted value remains in exactly one leaf.
A B+ Tree is a balanced multiway search tree in which all records are stored in the leaf nodes. Internal nodes contain only separator keys, and the leaves are linked from left to right for efficient ordered and range queries.
Example B+ Tree loaded. Choose an operation.
find the target leaf
insert the key in sorted order
if the leaf overflows:
split the leaf
copy the first key of the new right leaf
into the parent
if an internal node overflows:
split it
promote its middle separator keyInternal keys guide the search but do not represent separate records. Every inserted value remains in exactly one leaf.
When a leaf splits, the first key of the new right leaf is copied into the parent and also remains in the leaf.
Leaf nodes form a linked list. After locating the first matching leaf, a range query continues through the leaf links.
Every root-to-leaf path has the same length, keeping point searches logarithmic.
| Property | B-Tree | B+ Tree |
|---|---|---|
| Record location | Internal or leaf nodes | Leaf nodes only |
| Internal keys | May be records | Separator copies only |
| Leaf links | Usually absent | Typically linked |
| Range queries | Tree traversal | Leaf-chain scan |