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

Code density and smaller faster programs, Q. Code Density and Smaller Faste...

Q. Code Density and Smaller Faster Programs? Memory was very expensive in older computer. So there was a need of less memory utilization, which is it was cost effective to have

Telematics, How are switching system classified

How are switching system classified

List all seven layer of osi model, List all seven layer of OSI model and de...

List all seven layer of OSI model and describe function of application layer. The layers of OSI model are as follows: (1) The Physical Layer: It defines an interface in

Give the truth table of S-R and D-flipflops, Give the truth table of S-R an...

Give the truth table of S-R and D-flipflops. Ans: The Truth Table for S-R Flip-Flop is illustrated in Fig.(a) and truth table of D Flip-Flop is illustrated in Fig.(b)

What are the general security issues, What are the General Security Issues ...

What are the General Security Issues Many issues exist when linking a computer system to the Internet or indeed to an external link via a network set up. There are numerous way

Describe collective communications, Q. Collective Communications? A num...

Q. Collective Communications? A number of message-passing systems allow communication involving more than two processors. Such type of communication can be known as collective

What are the three basic types of web documents, What are the three basic t...

What are the three basic types of web documents? There are three fundamental types of web documents: Static, Dynamic and Active. STATIC A static web document resides i

What is test requirements, Test requirements are definite in the Requiremen...

Test requirements are definite in the Requirement Hierarchy in TestManager. The requirements hierarchy is a graphical outline of requirements and nested child requirements. Req

Explain basic working of mainframes, Q. Explain Basic working of Mainframes...

Q. Explain Basic working of Mainframes? Mainframe computers are normally 32-bit machines or higher. These are suited to large organizations, to manage high volume applications.

Mac address helps in which access control, MAC address helps in (A)  m...

MAC address helps in (A)  multimedia access control. (B)  media access control. (C)  mobile access control. (D) master access point control Ans: MAC addr

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