What is a B+ Tree?
A B+ Tree is a self-balancing, ordered tree data structure that allows searches, sequential access, insertions and deletions in O(logn). In a B+
Tree, data pointers are stored only at the leaf nodes of the tree, resulting in a very high fanout (number of pointers to child nodes in a node,
typically on the order of 100 or more), which reduces the number of I/O operations required to find an element in the tree.
An example of a B+ Tree
Why should I use a B+ Tree?
A B+ Tree is an
optimal selection for systems that read and write large blocks of data, e.x. filesystems, since it automatically reorganizes itself with small,
local changes in the face of insertions and deletions, while reorganization of the entire file is not required in order to maintain performance.
In a B+ Tree file organization, leaf nodes store records instead of pointers. This type of file organization helps keep data records clustered
even when there are insertions, deletions or updates.
How a disk saves data from a file using a B+ Tree
For more information, you can visit
this site.
*The images above were used from
this site.
Here, this visualization can not only help you understand but also test the basic operations(insert, delete and find value or range of values) of a B+ Tree.
The B+ Tree elements will be depicted here!