Insertion in a B+ Tree
description
Transcript of Insertion in a B+ Tree
Insertion in a B+ Tree
Insert: 8
Insertion in a B+ Tree
8
Insert: 5
Insertion in a B+ Tree
5 8
Insert: 1
Overflow – create a new level
5
Insertion in a B+ Tree
1 5 8
Insert: 7
5
Insertion in a B+ Tree
1 5 7 8
Insert: 3
Overflow - Split
3 5
Insertion in a B+ Tree
1 3 5 7 8
Insert: 12
Overflow - Split
Propagates to a new level
5
83
Insertion in a B+ Tree
1 3 5 7 8 12
Insert: 9
5
83
Insertion in a B+ Tree
1 3 5 7 8 9 12
Insert: 6
Overflow – Split
Insertion in a B+ Tree
7 8
5
3
1 3 5 6 7 9 128
Resulting B+-tree
91 6
7
Deletion in a B+-Tree
1 5 6 7 8 9 12
Delete: 5
91 6
7
Deletion in a B+-Tree
1 7 8 9 126
Delete: 12
Underflow - redistribute
81 6
7
Deletion in a B+-Tree
1 76 98
Delete: 9
81 6
7
Deletion in a B+-Tree
1 76 8
Underflow
merge with the left propagate reduce the tree levels
1 6 7 8
1 6
Deletion in a B+-Tree