Explain insertion procedure into a b-tree, Data Structure & Algorithms

Ans:

Insertion into the B-tree:

1.  First search is made for the place where the new record must be positioned. As soon as the keys are inserted, they are sorted into the appropriate order.

2.  If the node can contain the new record, insert the new record at the suitable pointer so that number of pointers happens to be one more than the number of records.

3.  If the node overflows because of an upper bound on the size of the node, splitting is needed. The node is divided into three parts; the middle record is passed up and inserted into parent, leaving two children at the back. If n is odd (n-1 keys in full node and the new target key), the median key int(n/2)+1 is placed into the parent node, the lower n/2 keys are placed in the left leaf and the higher n/2 keys are placed in the right leaf. If n is even, we may have left biased or right biased means one key can be more in left child or right child respectively.

4.  Splitting may propagate up the tree because the parent, into which the divided record is added, it may overflow then it may be split.  If the root is required to be divided, a new record is created with only two children.

 

 

Posted Date: 7/11/2012 1:42:52 AM | Location : United States







Related Discussions:- Explain insertion procedure into a b-tree, Assignment Help, Ask Question on Explain insertion procedure into a b-tree, Get Answer, Expert's Help, Explain insertion procedure into a b-tree Discussions

Write discussion on Explain insertion procedure into a b-tree
Your posts are moderated
Related Questions
WHAT IS THE PURPOSE OF STACK IN C

P os t - o r d e r T r av er sal :  This can be done by both iteratively and recursively. The iterative solution would require a modification or alteration of the in-

The searching method are applicable to a number of places in current's world, may it be Internet, search engines, text pattern matching, on line enquiry, finding a record from data

Comparison Techniques There are several techniques for determining the relevancy and relative position of two polygons. Not all tests may be used with all hidden-surface algori

Q. Devise a representation for a given list where insertions and deletions can be made at both the ends. Such a structure is called Deque (which means Double ended queue). Write fu

The location of a node in a binary search tree is defined as a string such as LLRRL, which represents the node that you find by starting at the root, and traversing Left, traverse

Now, consider a function that calculates partial sum of an integer n. int psum(int n) { int i, partial_sum; partial_sum = 0;                                           /* L

Enumerate about the carrier set members Ruby is written in C, so carrier set members (which is, individual symbols) are implemented as fixed-size arrays of characters (which is

Q. Consider the specification written below of a graph G V(G ) = {1,2,3,4} E(G ) = {(1,2), (1,3), (3,3), (3,4), (4,1)} (i)        Draw the undirected graph. (

Containers Introduction Simple abstract data types are useful for manipulating simple sets of values, such as integers or real numbers however more complex abstract data t