B-Trees
A B-tree of order m has the following properties:
- every node has at most m children.
- every non-leaf node (except root) has at least m/2 children.
- the root has at least 2 children if its not a leaf.
- a non-leaf node with k children contains k-1 data elements.
- all leaves appear in the same level and carry no information.
Sorted B-Trees
If the data elements of a node are , , …, , then:
- all elements in the leftmost subtree will be less than .
- all elements in the rightmost subtree will be greater than .
- all elements in the subtree between and will be greater than and less than .
2-3 trees are B-trees of order 3.
B-trees are useful where data is in large blocks, hence databases and filesystems.