首先从B-树谈起
B-树的定义
A B-tree of order m (the maximum number of children for each node) is a tree which satisfies the following properties:
1. Every node has at most m children.
2. Every node (except root and leaves) has at least ceil(m⁄2) children.
3. The root has at least two children if it is not a leaf node.
4. All leaves appear in the same level, and carry information.
5. A non-leaf node with k children contains k–1 key
6. Each leaf node (other than the root node if it is a leaf) must contain at least ceil(m / 2) - 1 keys
7. Keys and subtrees are arranged in the fashion of search tree
根节点与普通节点关键字与分支的范围
B-树的例子
B+tree
The B+ tree is a variant of the B-tree, all records are stored at the leaf level of the tree; only keys are stored in interior nodes. B-tree can store both keys and records in its interior nodes; in this sense, the B+ tree is a specialization of the B-tree.
A B+treeis a B-tree in which data records are in leaf nodes, and faster sequential access is possible
严蔚敏的数据结构中对B+树的定义
B+树的插入
B+树的删除
删除普通节点
删除后节点数目少于m/2向下取整
删除后节点数目少,且不能向相邻节点借节点