File Organization in DBMS
Q.1: What do you mean by B+ Tree?
Answer:
B+ Tree is a self-balancing search tree where each node has more than two children and can hold multiple values.
Q.2: Where do we use B+ Tree?
Answer:
We use B+ Tree where we have to store a large amount of data that can’t be stored in the main memory.
Q.3: What are the advantages of the Cluster File Organization?
Answer:
Cluster File Organization shares available storage that remains underutilized if they come across separately.
File Organization in DBMS | Set 3
B+ Tree, as the name suggests, uses a tree-like structure to store records in a File. It uses the concept of Key indexing where the primary key is used to sort the records. For each primary key, an index value is generated and mapped with the record. An index of a record is the address of the record in the file.
B+ Tree is very similar to a binary search tree, with the only difference being that instead of just two children, it can have more than two. All the information is stored in a leaf node and the intermediate nodes act as a pointer to the leaf nodes. The information in leaf nodes always remains a sorted sequential linked list.
In the above diagram, 56 is the root node which is also called the main node of the tree.
The intermediate nodes here, just consist of the address of leaf nodes. They do not contain any actual records. Leaf nodes consist of the actual record. All leaf nodes are balanced.
Advantages of B+ Tree File Organization
- Tree traversal is easier and faster.
- Searching becomes easy as all records are stored only in leaf nodes and are sorted in sequentially linked lists.
- There is no restriction on B+ tree size. It may grow/shrink as the size of the data increases/decreases.
Disadvantages of B+ Tree File Organization
- Inefficient for static tables.