Slideshow:
|
I will illustrate the "node split" procedure with 2 examples first
Then I will show you the algorithm
|
Example: we want to insert the key 40 (+ record pointer) into the full B+-tree node
|
|
Example: we want to insert the key 4 (+ record pointer) into the full B+-tree node
|
Allocate a new node R (the right node);
/* ========================================
Link the leaf nodes
======================================== */
R.last pointer = L.last pointer
L.last poinetr = R
/* ============================================
Divide the key in half over the 2 nodes
============================================ */
Let:
x = insertedKey;
m = middle key in L (= k⌈(n+1)/2⌉);
if ( x > m )
{
/* ======================================
x belongs to the right half
====================================== */
|
|
|