B – trees, Data Structure & Algorithms

Assignment Help:

B-trees are special m-ary balanced trees utilized in databases since their structure allows records to be added, deleted & retrieved with guaranteed worst case performance.

A B-Tree is a special multiway tree. In a B-Tree each of nodes may contain a large number of keys. The number of subtrees of each of node may also be large. A B-Tree is designed to branch out in this great number of directions and to contain many keys in each node so that height of the tree is comparatively small.

It means that only a small number of nodes have to be read from disk to retrieve an item.

A B-Tree of order m is multiway search tree of order m such as

  • All leaves are onto the bottom level
  • All internal nodes (except root node) contain at least m/2 (non empty) children
  • The root node can have as few as 2 children if this is an internal node and can have no children if the root node is leaf node
  • Each leaf node has to contain atleast (m/2) - 1 keys. The given is the structure for a B-tree :

struct btree

{          int count;         // number of keys stored into the current node

            item_type key[3];        // array to hold 3 keys

            long branch [4];           // array of fake pointers (records numbers)

};                    

Figure depicts an order 5 B-tree.

1847_B – TREES.png

Figure: A B-tree of order 5


Related Discussions:- B – trees

Efficient way of storing a sparse matrix in memory, Explain an efficient wa...

Explain an efficient way of storing a sparse matrix in memory.   A matrix in which number of zero entries are much higher than the number of non zero entries is called sparse mat

Algorithms & flowchart, write an algorithm to find the average number of oc...

write an algorithm to find the average number of occurances of MECHANIL in an english passage

Calculates partial sum of an integer, Now, consider a function that calcula...

Now, consider a function that calculates partial sum of an integer n. int psum(int n) { int i, partial_sum; partial_sum = 0;                                           /* L

State warnock algorithm, Warnock's Algorithm An interesting approach to...

Warnock's Algorithm An interesting approach to the hidden-surface problem was presented by Warnock. His method does not try to decide exactly what is happening in the scene but

Acyclic graph, Tree is a widely used data structure employed for representi...

Tree is a widely used data structure employed for representing several problems. We studied tree like a special case of acyclic graph. Though, rooted trees are most prominent of al

Hashing and collisions during hashing, Q. What do you understand by the te...

Q. What do you understand by the term Hashing?  How do the collisions occur during hashing?  Explain the different techniques or methods for resolving the collision.

Perform breadth -first search, You are given two jugs, a 4-gallon one and a...

You are given two jugs, a 4-gallon one and a 3-gallon one. Neither has any measuring marker on it. There is a tap that can be used to fill the jugs with water. How can you get exac

What is Oscillating Sort?, For the Oscillating sort to be applied, it is ne...

For the Oscillating sort to be applied, it is necessary for the tapes to be readable in both directions and able to be quickly reversed. The oscillating sort is superior to the po

Algorithams example, any simple algoritham questions with answers

any simple algoritham questions with answers

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