Download the BYJU'S Exam Prep App for free GATE/ESE preparation videos & tests - Download the BYJU'S Exam Prep App for free GATE/ESE preparation videos & tests -

Cluster File Organization in DBMS

Cluster file organization stores two or more linked tables/records in the same file, which is referred to as a cluster. There will be two or more tables in the very same data block in these files, and the key attributes that are used to link these tables together will only be kept once.

In this article, we will dive deeper into Cluster File Organization in DBMS according to the GATE Syllabus for (Computer Science Engineering) CSE. Keep reading ahead to learn more.

Table of Contents

What is Cluster File Organization in DBMS?

Clusters are created when two or more records are saved in the same file. There will be two or more tables in the same block of data in these files, and key attributes that are used to link these tables together will only be kept once. This strategy lowers the cost of searching several files for various records.

When combining tables with the same condition on a regular basis, the cluster file organization is employed. Only a few records from both tables will be returned by these joins. This approach cannot be used to retrieve the whole department’s records. We are retrieving records for only specific departments in the example given below.


We can immediately insert, amend, or delete any record using this approach. The data is arranged according to the key used for searching. A cluster key is a sort of key that is used to link tables together.

Types of Cluster File Organization

It is of two types. They are:

1. Indexed Clusters

In an indexed cluster, all the records are gathered and stored together based on the cluster key. An indexed cluster is a relationship between EMPLOYEE and DEPARTMENT, such as the one shown above. Here, all of the entries are clustered based on the cluster key, DEP ID.

2. Hash Clusters

It’s very much like the indexed cluster. Instead of storing data based on the cluster key, we compute the hash key value for the cluster key and then store the records along with the same hash key values in the hash cluster.

Pros of Cluster File Organization

  • When there are many requests for connecting tables with the same joining condition, the cluster file organization is employed.
  • Whenever there is a mapping of 1:M between the tables, it produces the most efficient output.

Cons of Cluster File Organization

  • For a very large database, this approach has a low performance.
  • If the joining condition changes, this method will no longer work. When we update the joining condition, traversing the file takes a long time.
  • For a table with a 1:1 condition, this technique is ineffective.

Keep learning and stay tuned to get the latest updates on the GATE Exam along with Eligibility Criteria, GATE Syllabus for CSE (Computer Science Engineering), GATE CSE Notes, GATE CSE Question Paper, and more.

Also Explore,

Comments

Leave a Comment

Your Mobile number and Email id will not be published.

*

*