B + Tree and B.-Tree

Source: Internet
Author: User

The B-tree has been introduced before , and we'll introduce the B + tree.

1. B + tree concept

b+b-m step b+ tree and m b-

(1) there are n keywords in the nodes of N subtrees tree .

(2) All the leaf nodes contain information about all the keywords, and pointers to those key records, and the leaf node itself is the size of the key words from a large sequence of links.

(3) All non-endpoints can be viewed as an indexed part, with only the largest (small) keyword in its subtree (root node).

B + trees typically have two pointers, one pointing to the root node and the other to the smallest leaf node of the keyword. Because of this, there are two types of operations for B + trees: One is to search from the minimum keyword, and the other is to search randomly from the root node.

2 b+ tree lookup

       b so in b+ in the tree, each search is a path from root to leaf node, regardless of whether the search is successful or not. In addition, b+ All leaf nodes of the tree form an ordered list that can traverse all records in the order in which the key codes are sorted. The above two ways together, make b+ tree is ideal for range retrieval.

3. B + tree insertion

the insertion of B + trees is similar to the insertion process of a B. tree. The difference is that the B + tree is carried on the leaf node, if the number of key yards in the leaf node exceeds m, it must be divided into two nodes with approximately the same number of key yards, and the maximum key code of the two nodes is guaranteed in the upper node.

4, the deletion of B + Tree

B + tree in the key code after the leaf node layer is deleted, its copy on the upper level can be retained as a " decomposition key code " exists, if because of the deletion caused by the key number of nodes less than ceil (M/2), its processing process and The B-tree is treated the same.

Thanks to the original author's share: http://blog.163.com/zhoumhan_0351/blog/static/3995422720091023111239445/

B + Tree vs. C-Tree

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.