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

Parallel edge or self loop of the total number of edges, A graph with n ver...

A graph with n vertices will definitely have a parallel edge or self loop of the total number of edges are More than n(n-1)/2

State about the multiple inheritance, State about the multiple inheritance ...

State about the multiple inheritance multiple inheritance is shown in Figure. In this, one class is inherited from more than one class.

Mapping design principle, The following definition of mapping is adapted fr...

The following definition of mapping is adapted from the first edition of the Set Book: Mapping concerns the relationship between controls and their effects in the world. Nearly al

Explain dynamic server creation briefly, Explain dynamic server creation br...

Explain dynamic server creation briefly. Dynamic Server Creation: If only one server handles one request at a time, each client should wait while the server fulfils the on

Explain about joint application development, Q. Explain about Joint Applica...

Q. Explain about Joint Application Development? It is defined as a structured approach in which users, managers, and analysts work together for many days in a series of intensi

What is electronic payment system, What is electronic payment system? E...

What is electronic payment system? Electronic payment systems are alternative cash credit payment methods using various electronic technologies to pay for products and services

Stepwise refinement of the program, What do you understand by stepwise refi...

What do you understand by stepwise refinement of the program? The method of "Stepwise refinement" means to take an object and move it from a general perspective to a exact leve

Assembler directives, What are assembler directives? Ans: These are th...

What are assembler directives? Ans: These are the instructions that direct the program to be executed. They have no binary corresponding so they are called pseudo-opcodes. The

Differentiate between unit testing and integration testing, Unit testing an...

Unit testing and integration testing: Unit testing focuses on the least element of software design by the module. Unit test is conducted on every of the modules to uncover er

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