Both B-Trees and B+ Trees are self-balancing multi-way search trees used in databases and file systems, but they differ in where data lives and how splits work. In a B-Tree, every node — internal and leaf — stores data, and when a node splits the median key is moved up to the parent. In a B+ Tree, data lives only in the leaf nodes; internal nodes are purely routing guides, and the median key is copied up during a leaf split, so it remains in the leaf. Leaf nodes in a B+ Tree are also linked together, making range queries much more efficient. Try inserting the same values into both to see how the structures diverge.
When individual record lookups dominate and range queries are rare. A B-Tree can satisfy a point query by returning data directly from an internal node without reaching a leaf — potentially saving one I/O level. A B+ Tree always traverses to a leaf. In practice, the B+ Tree's superior range performance and cache friendliness make it the default choice in most database systems.
to join the discussion
Hand-picked resources to deepen your understanding
© 2025 See Algorithms. Code licensed under MIT, content under CC BY-NC 4.0