← Arsenal

B / B+ / B* Tree Explorer

▶ DRILL

Switch between B-tree, B+ tree, and B* tree — all at t=2, initialized with the same 20 keys. Add, delete, or search 1–99 and observe how the structure and split behaviour differ. A comparison table summarises the key differences.

B-tree (t=2): Keys stored in every node — internal and leaf. Search terminates as soon as the key is found, at any level. Splits move the median key up; each split creates two ~50%-full nodes.
592544118202731475052667485606268838487
B-tree t=2 · max 3 keys/node · seed 42 · 10 nodes
# comparison
PropertyB-treeB+ treeB* tree
Data in nodesAll nodesLeaves onlyAll nodes
Internal nodesRouting + dataRouting onlyRouting + data
Search ends atAny levelAlways leafAny level
Leaf chainNoYes — enables range scanNo
Min fill (non-root)50% (≥1 key)50% (≥1 key)67% (≥2 keys)
Split strategy1 full node → 2 half-full; median moves upLeaf: copy key up (stays in right child); Internal: same as B-treeRedistribute to sibling first; if both full: 2 nodes → 3 (higher avg fill than binary split)
Best forGeneral-purpose; fewer levels when data fits in internal nodesDatabase indexes, file systems; range queries use leaf chainHigh-occupancy storage; fewer splits = better write throughput
# propertiesMin degree t=2 · max 3 keys/node · max 4 children/node