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
In a sorted list, Binary search is carried out by dividing the list into two parts depends on the comparison of the key. Since the search interval halves each time, the iteration o

Q. Convert the following given Infix expression to Postfix form using the stack function: x + y * z + ( p * q + r ) * s , Follow general precedence rule and suppose tha

Write a program to create a hashed file that stores the records currently in the file " data_2013 ". Records should use the same fixed-length schema given previously, and should ag

Q. State the difference between a grounded header link list and a circular header link list?     Ans: A header linked list is a linked list which all the time c

Since the stack is list of elements, the queue is also a list of elements. The stack & the queue differ just in the position where the elements may be added or deleted. Similar to

The operations of the Symbol ADT The operations of the Symbol ADT are the following. a==b-returns true if and only if symbols a and bare identical. a symbol bin Unico

In file access: what is the difference between serial, sequential and indexed sequential searching

Q. Create a heap with the given list of keys: 8, 20, 9, 4, 15, 10, 7, 22, 3, 12                                                  Ans: Creation

what is circular doubly link list?write down the algorithm for insertion of elements in circular doubly link list

Q. Take an array A[20, 10] of your own. Suppose 4 words per memory cell and the base address of array A is 100. Find the address of A[11, 5] supposed row major storage.