Algorithm to insert a key in b-tree, Computer Engineering

Assignment Help:

Algorithm to insert a key in B-tree is as follows:

1.  First search is completed for the place where the new record must be put. As the keys are inserted, they are sorted into the proper order.

2.  If the node can contain the new record, insert the new record at the appropriate pointer so that number of pointers remains one more than the number of records.

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

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

 


Related Discussions:- Algorithm to insert a key in b-tree

What types of data entry services do you perform, What types of data entry ...

What types of data entry services do you perform? Our business is to understand what data you require entered and in what particular format. After an initial analysis is perfor

No. of decimal places for output within a write statement, The no of decima...

The no of decimal places for output can be describes within a write statement. This statement is right. Write:/ decimals 2.

What is full form of bdc session, What is full form of BDC Session? Bat...

What is full form of BDC Session? Batch Data Communication Session.

Illustrate the basic structure of the von neumann machine, Illustrate the b...

Illustrate the basic structure of the von Neumann machine The following figure shows basic structure of the von Neumann machine. A von Neumann machine has only a single path be

Explain the propagation delay characteristics for digital ic, Explain the ...

Explain the Propagation Delay characteristics for digital IC's. Ans: Propagation Delay: - The speed of a digital IC operation is given in terms of propagation delay ti

Design a nand-to-and gate network, Q Use as few gates as possible, design a...

Q Use as few gates as possible, design a NAND-to-AND gate network that realize the following Boolean algebra expression. ABCD + A'BC'D + A'BC'D' + A'BCD + (A'B'C'D' + A'BCD')

Name the variable types of c, C provides a wide range of variable types. ...

C provides a wide range of variable types. Normal 0 false false false EN-IN X-NONE X-NONE MicrosoftInternetExplorer4

How can we design radio button, Q. How can we design Radio Button? Radi...

Q. How can we design Radio Button? Radio buttons are used when only one out of group of options is to be chosen. In the illustration code we have put a line break after every b

What do you mean by ssi chips, Q. What do you mean by SSI chips? The 3 ...

Q. What do you mean by SSI chips? The 3 rd generation computers mostly used SSI chips. One of the key concepts that were brought forward for the duration of this time was conc

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd