/    /  DBMS – B-Tree Index Files

B-Tree Index Files

A   B Tree Index is a multilevel index.

A   B Tree is a rooted tree satisfying the following properties :

  1.  All paths from the root to the leaf are equally long. 
  2.  A node that is not a root or leaf, has between [n / 2]   and  ‘n’ children. 
  3.  A leaf node has between [(n-1) / 2] and ‘n-1’ values.

The structures of leaf, non-leaf nodes of this tree is : 

Example-1: Construct a B- Tree for the following search key values, where n = 3.                              {10, 20, 30, 40, 50}

Let’s take another example and insert, delete elements from the tree

Example-2: Construct a B- Tree for the following search key values, where n = 3. (n is no of pointers) 

{10, 20, 30, 40, 50, 60, 70, 80, 90}

  1. a) Delete 20 from above tree.

  1. b) Insert  65 to the above tree.

Reference Link

B-Tree Index Files