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 are preprocessor directives, What are preprocessor directives? Pre...

What are preprocessor directives? Preprocessor directives: These are the commands given to a program called as pre-processor that processes the source code before it passes by

For what CIDR stands, CIDR stands for? CIDR stands here for Classless I...

CIDR stands for? CIDR stands here for Classless Inter Domain Routing.

Flynn’s classification, Flynn's Classification Flynn's classification i...

Flynn's Classification Flynn's classification is based on multiplicity of data streams and instruction streams observed by the CPU during program execution. Let Ds and Is  are

Sosail studies, whitch goods did the new england colonies exportto england ...

whitch goods did the new england colonies exportto england and what did they get in return

State about CSMA/CA, State about CSMA/CA It belongs to a class of proto...

State about CSMA/CA It belongs to a class of protocols known as multiple access methods. CSMA/CA  stands  for:  Carrier  Sense  Multiple  Access  with  Collision Avoidance.  In

What does formal verification mean, What does formal verification mean? ...

What does formal verification mean? Formal verification uses Mathematical techniques by proving the design by assertions or properties. Correctness of the design can be achiev

Scope of supply chain management consultancy, What are included in scope of...

What are included in scope of Supply Chain Management Consultancy? Supply Chain Management Consultancy's scope is extensive, and classically includes as given here: a. Sales

What is over-clocking, Overclocking is the process of making a computer or ...

Overclocking is the process of making a computer or component operate faster than the clock frequency particular by the manufacturer by modifying system parameters. One of the most

Explain the operation of 8:1 multiplexer, Explain the operation of 8:1 mult...

Explain the operation of 8:1 multiplexer. Ans: In this multiplexer 8 Input and 1 Output and three select lines i.e. S 2 , S 1 , S 0 are given. Any one of the inputs will be

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