Slideshow:
|
|
Insert( x1, x2, ..., xn )
{
Find the leaf node L (block) that is used to store (x1, x2, ..., xn);
if ( leaf node L (block) has enough space )
{
insert (x1, x2, ..., xn) in L;
return;
}
else
{
/* ======================================================
1. Split leaf node L into 2n parts !!!
Each dimension exactly in HALF
2. Add an internal node with search key
for these 2n leaf nodes
====================================================== */
Let m1 = the middle of the x1 range of values in L;
Let m2 = the middle of the x2 range of values in L;
...
Let mn = the middle of the xn range of values in L;
Split the records in L into 2n blocks according m1, m2, ..., mn
Replace L by an internal node I with seacrh key (m1, m2, ..., mn);
Make the 2n blocks as child nodes of I;
}
}
|
Example:
|
|
|