First Note: The B-Tree is a C-tree, "-" is a ligature symbol, not a minus sign.
B-Tree is a Balance The Multi-way lookup (also called sort) Tree, which is applied in the file system. Used primarily as an index for a file. where B means balance (Balance)
B + trees have one of the greatest benefits, convenient sweep of the library, B. Tree must use the method of sequence traversal in order to sweep the library, and B + trees sweep directly from the leaf knot.
B + Tree support for range-query (interval query) is very convenient, while the B. Tree does not support。 This is the main reason why the database chooses the B + tree.
For example, to check between 5-10, B + Tree one to 5 of this marker, and then to 10, and then strung together on the line, a tree is very troublesome. The benefit of B-trees is that successful queries are particularly advantageous because the height of the tree is generally higher than that of a B + tree. In the case of unsuccessful, B-trees are a little bit less expensive than a plus + tree.
The advantage of B-tree is that when you're looking for a value that is just a non-leaf node, finding the node succeeds and ends the query, while the B + tree is only indexed because the NON-LEAF nodes contain only the largest (or smallest) keywords in its subtree, and the lookup does not terminate when the keyword on the non-terminal node equals the point value. Instead, continue down until the leaf node. Therefore, in the B + tree, whether the search succeeds or not, is a path from root to leaf node.
There are many based on the frequency of search is the use of B-tree, the more frequent query node more toward the root, the premise is that query to do statistics, but also to do some changes to key.
In addition, B-tree is good, the root or a few layers because of query repeatedly, so these pieces of basic in memory, will not appear read disk IO, generally started, will be actively swapped into memory. MySQL's underlying storage is implemented with a B + tree, because in-memory B + trees have no advantage, but as soon as they get to disk, the power of a B + tree comes out.
b* Tree is a variant of a B + tree that adds a pointer to a sibling at the non root and non leaf nodes of a B + tree .The b* tree defines the number of non leaf node keywords at least (2/3) *m, that is, the minimum use rate of blocks is 2/3 (instead of 1/2 of B + trees);
B + Tree splitting: When a node is full, assign a new node, the data of 1/2 in the original node is copied to the new node, and then the pointer to the new node is added to the parent node. B + The division of the tree only affects the original node and the parent node, and does not affect the sibling node, so it does not need to point to the sibling pointer;
The division of the b* tree: When a knot is full, if its next sibling knot is not full, then move a subset of the data to the sibling node, insert the keyword at the original node, and finally modify the key of the sibling node in the parent node (because the sibling node's keyword range has changed); If the brothers are full, Then the new node is added between the original node and the sibling node, and the data of 1/3 is copied to the new node, and the pointer of the new node is added at the parent node.
Therefore, the probability that the b* tree allocates new nodes is lower than that of B + trees, and the space usage is higher.