Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The [Deep Dive -> B-Tree] section may contains incorrect contents #276

Open
LENSHOOD opened this issue Jul 21, 2021 · 0 comments
Open

The [Deep Dive -> B-Tree] section may contains incorrect contents #276

LENSHOOD opened this issue Jul 21, 2021 · 0 comments

Comments

@LENSHOOD
Copy link
Contributor

Change Request

The B-Tree picture and descriptions related to the pic maybe incorrect.
Location: Deep Dive -> Key-value engine -> B-Tree vs LSM-Tree

Describe the problem / Suggest an improvement/fix


  1. This picture is not (typically) a B-Tree nor B+Tree or B*-Tree

    • B-Tree cannot contain duplicated keys (like 15/25/30 in the pic)
    • B+Tree contains pointers between the leaf nodes
    • B*-Tree contains pointers between internal siblings

    Maybe is better to post a standard B-Tree or just modify current pic to a B+Tree (since the below content mostly use B+Tree as example).


Figure 1. The root node is shown at the top of the tree, and in this case happens to contain a single pivot (20), indicating that records with key k where k ≤ 20 are stored in the first child, and records with key k where k > 20 are stored in the second child. The first child contains two pivot keys (11 and 15), indicating that records with key k where k ≤ 11 is stored in the first child, those with 11 < k ≤ 15 are stored in the second child, and those with k > 15 are stored in the third child. The leftmost leaf node contains three values (3, 5, and 7).

  1. Ignore the picture's issue, the quote section are also contains error:
    • k ≤ 20 should be k < 20
    • k ≤ 11 should be k < 11
    • 11 < k ≤ 15 should be 11 ≤ k < 15
    • k > 15 should be k ≥ 15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant