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

Write a short note on structure chart, Write a short note on structure char...

Write a short note on structure chart.    Structure Chart is an significant program design method and it shows all components of code in a hierarchical format

Give example of stack using encapsulation of OOA, Give example of stack usi...

Give example of stack using encapsulation of OOA An example of the Stack.  A Stack abstraction provides methods like pop (), push (), isEmpty(), isFull(). The Stack can be i

Assembly lenguange , what is the work of pin daigram in 8086 microprocessor...

what is the work of pin daigram in 8086 microprocessor in assembly

How codes represent data for scientific calculations?, Q. How codes represe...

Q. How codes represent data for scientific calculations? How codes are in fact used to represent data for scientific calculations? The computer is a discrete digital device

Define dma controller, Define DMA controller. The I/O device interface ...

Define DMA controller. The I/O device interface control circuit that is used for direct memory access is called as DMA controller.

Problems for decision tree learning, Appropriate Problems for Decision Tree...

Appropriate Problems for Decision Tree Learning : However remember there that is a skilled job in "AI" to choose exactly the right learning representation ormethod for a parti

Which techniques are utilized to gain on the number pairs, Which techniques...

Which techniques are utilized to gain on the number pairs and also explain how it helps in connecting number of subscribers. In rural areas, subscribers are usually dispersed.

Asembly language programming, Ask question #Minimum Write a program to mask...

Ask question #Minimum Write a program to mask bits D3D2D1D0 and to set bits D5D4 and to invert bits D7D6 of the AX register. 100 words accepted#

Works flowing related technologies influence e-business, How the works do f...

How the works do flowing related technologies influence e-business? Work Flow related Technologies influence e-business: Microsoft CRM automates internal business process

Risc approach - computer architecture, RISC Approach - computer architectur...

RISC Approach - computer architecture: The RISC processors only use easy instructions that can be executed within one clock cycle. therefore, the "MULT" command discussed abov

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