Posts

Showing posts from February, 2023

B Tree

 B-Trees are a type of self-balancing, multi-way tree data structure that are optimized for systems that have slow or limited access to disk storage. Unlike binary trees, where each node has at most two children, a B-Tree node can have multiple children. This allows B-Trees to store large amounts of data efficiently while maintaining a relatively shallow height. In a B-Tree, each node has a specific number of keys and associated values, called "entries". The keys act as pointers to the values, and are used to determine which node to follow during a search. The entries in each node are sorted in ascending order, and the values are stored in the leaf nodes. The root node, internal nodes, and leaf nodes are all stored on disk, making B-Trees well-suited for large data sets that can't fit into memory. When a node becomes full and needs to be split, it is divided into two new nodes, with some of its entries being moved to the new node. When a node becomes under-full, it may me