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

Explain dos function call with one illustration, Explain DOS function call ...

Explain DOS function call with one illustration DOS function call In order to use DOS function calls, always place function number into register AH and load all other re

Various ways of floating point representation in memory, Describe the vario...

Describe the various ways of floating point representation in memory. What is the importance of normalizing the mantissa in this representation? Explain it by example(s)?

Extjs, tell some thing about htmleditor in extjs whether it contains attach...

tell some thing about htmleditor in extjs whether it contains attachment button or not

What is the function of an ip packet screening router, What is the function...

What is the function of an IP packet screening Router? Explain with the help of a diagram. Function of an IP Packet Screening Router: A screening router is the most fund

What is hybrid olap, When a database developer uses Hybrid OLAP it seperate...

When a database developer uses Hybrid OLAP it seperates the data among relational and specialized storage. In some certain modifications a HOLAP database may store vast amounts of

Disadvantages of address translation, Disadvantages of Address translation:...

Disadvantages of Address translation: Disadvantages are following: A program that is too large to be held in a part needs some special design, that called overlay

Explain management information base variables, Explain MIB (Management Info...

Explain MIB (Management Information Base) variables. MIB is a set of named items which an SNMP agent knows. To control or monitor a remote computer, a manager should fetch or s

Java, what is java?

what is java?

Telecommunications, with poisson arrival of two calls per minute what is th...

with poisson arrival of two calls per minute what is the probability that more than three calls will arrive in two minutes? that is the time during which at least 4 calls will arr

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