Open In App

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. 



B+ Tree File Organization

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

Disadvantages of B+ Tree File Organization

Cluster File Organization

In Cluster file organization, two or more related tables/records are stored within the same file known as clusters. These files will have two or more tables in the same data block and the key attributes which are used to map these tables together are stored only once. 



Thus it lowers the cost of searching and retrieving various records in different files as they are now combined and kept in a single cluster. For example, we have two tables or relation Employee and Department. These tables are related to each other.

Cluster File Organization

Therefore this table is allowed to combine using a join operation and can be seen in a cluster file.  

Cluster File Organization

If we have to insert, update or delete any record we can directly do so. Data is sorted based on the primary key or the key with which searching is done. The cluster key is the key with which the joining of the table is performed. 

Types of Cluster File Organization

There are two ways to implement this method.

Advantages of Cluster File Organization

Disadvantages of Cluster File Organization

ISAM (Indexed Sequential Access Method):

A combination of sequential and indexed methods. Data is stored sequentially, but an index is maintained for faster access. Think of it like having a bookmark in a book that guides you to specific pages.

Advantages of ISAM :

Disadvantages of ISAM :

FAQs on 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. 

Article Tags :