How to split an overflow node into 2 nodes without using a
virtual node
2 cases:
(they are handled differently)
How to split an overflow node into 2 nodes without using a
virtual node
Case 1:
x
inserted into the right node
How to split an overflow node into 2 nodes without using a
virtual node
Case 1:
x
inserted into the right node
Allocate a
new node (disk block)
How to split an overflow node into 2 nodes without using a
virtual node
Case 1:
x
inserted into the right node
Move all
keys < x (= 40)
and their pointers to the
new node
How to split an overflow node into 2 nodes without using a
virtual node
Case 1:
x
inserted into the right node
Move the inserted
key x (= 40)
and its pointer to the
new node
How to split an overflow node into 2 nodes without using a
virtual node
Case 1:
x
inserted into the right node
Finally move the
remaining keys x
and their pointers to the
new node
How to split an overflow node into 2 nodes without using a
virtual node
Case 2:
x
inserted into the left node
How to split an overflow node into 2 nodes without using a
virtual node
Case 2:
x
inserted into the left node
Allocate a
new node (disk block)
How to split an overflow node into 2 nodes without using a
virtual node
Case 2:
x
inserted into the left node
Starting at the
middle node, move the
keys and their pointers into the
new node
How to split an overflow node into 2 nodes without using a
virtual node
Case 2:
x
inserted into the left node
Shift the
remaining keys (and pointers)
as long as key > x (= 4)
How to split an overflow node into 2 nodes without using a
virtual node
Case 2:
x
inserted into the left node
Shift the
remaining keys (and pointers)
as long as key > x (= 4)
How to split an overflow node into 2 nodes without using a
virtual node
Case 2:
x
inserted into the left node
Finally,
insert the
new key x and its
pointer into the
new node
❮
❯