B树

介绍B树之前,先介绍树的几个概念。

Degree

  The number of subtrees of a node.

Height of node

  The height of a node is the number of edges on the longest path between that node and a leaf.

Height of tree

  The height of a tree is the height of its root node.

Depth

  The depth of a node is the number of edges from the tree's root node to the node.

定义

A B-Tree is defined by the term minimum degree ‘t’. The value of t depends upon disk block size.

  1. Every node except root must contain at least t-1 keys. Root may contain minimum 1 key.
  2. All nodes (including root) may contain at most 2t – 1 keys.
  3. Number of children of a node is equal to the number of keys in it plus 1.
  4. All keys of a node are sorted in increasing order.
  5. All leaves are at same level.

另一种定义方式

 4阶B树又叫2-3-4树,3阶B树又叫2-3树。

 

 

参考资料:

https://en.wikipedia.org/wiki/Tree_(data_structure)

https://en.wikipedia.org/wiki/B-tree#Definition

B-Tree | Set 1 (Introduction)

What is the difference btw “Order” and “Degree” in terms of Tree data structure 

B+ tree

 

posted @ 2017-11-06 10:18  Sawyer Ford  阅读(178)  评论(0编辑  收藏  举报