Methods of Sequential File Organization

The following methods are used to implement sequential file organization

  • Pile File method
  • Sorted File method

Pile File Method

In this method, data blocks are stored successively. Data are entered in the order in which they are placed in the table. Once found, it is marked for deletion, and new information is added in its place. To insert a new record in the file, one should add a new record at the end of the file. Suppose we have four files in order, R1, R3…. R9 and R8. If we want to add a new R2 file to the array, we must put it at the end of the file.

Pile File Method

Insertion of new record in Pile File Method: Whenever new record is added to the file organization, it is added to the end of the existing information. Let R1, R3,…, R9, and R8 be the records stored in the file. A new record R5 file has arrived. Then this file will be added to the end of the file, that is, after the R8 file.

Insertion of new record in pile file method

Sorted File Method

In this method, new files are always added to the end of the file and the order is then sorted. A primary key is used to sort the records. If a record is modified, it will first update the record, then sort the file, and then store the record in the correct location. Assume there is a pre-existing sorted array of four files: R1, R3…R9 and R8. If new data R2 needs to be added to the array, add it to the end of the data and then sort the array.

Insertion of new record in sorted file method

Insertion of new record in Sorted File Method: When a new file arrives, it will first be added to the end of the file, just like the heap file, and then its position in the queue will change. Let R1, R3,…, R6, and R7 be the records in the file, sorted by key. For example, the new R2 file has arrived. Then the data will first be added to the end of the data i.e. after R7 and then its position will be changed to the next of R1.

Sequential File Organization in Database

Sequential file organization is the simplest type of file organization, where files are stored one after the other, rather than storing different files in rows and columns (in a tabular form), storing data in rows. In this article, we will learn about sequential file organization and its advantages and disadvantages in databases. We will understand various methods of sequential file organization.

Similar Reads

What is File Organization in Databases?

File organization describes the connection between the different records that make a file, especially when it comes to identifying and accessing specific data. File organization is the practice of storing information in an order. The file structure describes the logic that controls the processing of data, tags, and data blocks....

What is Sequential File Organization In a Database?

The Sequential file organization stores information in sequential files, one after the other in a sequence. To access these files, we must search through all columns until we find the desired information in O(n), assuming there is no order in the information. When it comes to ordering the structure of data, there are two ways to arrange them sequentially....

Methods of Sequential File Organization

The following methods are used to implement sequential file organization...

Advantages of Sequential File Organization

It includes a way to store large data quickly and efficiently. Data and information can be stored relatively easily. This method can be applied using cheaper materials such as magnetic tape. Sequential file organization is beneficial for statistical computation....

Disadvantages of Sequential File Organization

This results in wasted time as we cannot navigate to the specific desired file. Sequential access is time consuming. More space is required of sorted file method. Sorting is time and space consuming process. The traversal time of the sequential file organization is longer because the system cannot find a certain data in single go. It has to go through the whole sequence of data item....

Conclusion

Sequential data organization is a simple form of data storage and is suitable for large-scale data storage and processing systems. Sequential file organization stores records sequentially on data storage devices (such as disks, optical disks, and magnetic tables). File organizations store many data files in secondary storage to make it easier to update, delete and add new documents. Data is stored sequentially in sequential file organization....

Sequential File Organization in Database – FAQs

How are the sequential files stored?...