Posts

Implementation of B and B+ Trees for database management

Image
  We may get confused with the terms Binary Tree, Binary Search Tree, B Tree, and B+ Tree . B Tree is also called Balanced Search Tree and B+ tree is something like B tree having some other features and conditions applied to it. So, let us first remove our confusion learning the difference between these terms. Here we go. What is Balanced Tree? A balanced tree means that all searches for individual values require the same number of nodes to be read from the disc. The B+-Tree is called a  balanced tree  because every path from the root node to a leaf node is the same length. Difference between Binary Tree and Binary Search Tree Binary tree is a generic version of binary search tree and its not  ordered . While constructing, binary tree we follow a rule that every node should have  at most  two children. Whereas in case of BST, along with at most two children rule, we follow below rules 1) All left descendants should possess smaller values than root value. 2)...