Presentation is loading. Please wait.

Presentation is loading. Please wait.

Random inserting into a B+ Tree

Similar presentations


Presentation on theme: "Random inserting into a B+ Tree"— Presentation transcript:

1 Random inserting into a B+ Tree
Assume node size (B) = 512 bytes, pointer size (Pr) = 4 bytes, and key size (V) = 200 bytes p * Pr + ((p – 1 ) * V ≤ B 4p + 200p – 200 ≤ 512 204p ≤ 712 p = 3 < p1, k1, p2, k2, p3 > Root node key entries ptrs Level nodes key entries ptrs Level nodes key entries ptrs Level nodes key entries ptrs Level n

2 Random inserting into a B+ Tree
Initial State - root and empty node > Insert 10

3 10 Leaf (could also be root node) Insert 10 Next 24 Records of data #records per block

4 10 24 Insert 24 Next 18

5 18 10 18 24 Insert 18 Next 20

6 18 10 18 20 24 Insert 20 Next 12

7 12 18 10 12 18 20 24 Insert 12 Next 16

8 12 18 10 12 16 18 20 24 Insert 16 Next 8

9 12 10 18 8 10 12 16 18 20 24 Insert 8 Next 2

10 12 8 10 18 2 8 10 12 16 18 20 24 Insert 2 Next 14

11 12 8 10 16 18 2 8 10 12 14 16 18 20 24 Insert 14

12 12 8 10 16 18 2 8 10 12 14 16 18 20 24 Delete 16 - Find 16 in the leaf and delete it from the leaf

13 12 8 10 16 18 2 8 10 12 14 18 20 24 16 is deleted from the leaf but not the internal node.


Download ppt "Random inserting into a B+ Tree"

Similar presentations


Ads by Google