Sequential File Organization and Access in DBMS
Sequential File Organization
Sequential File Organization is another way of filing records where records are arranged one after another in a sequence by putting them in the order of the particular field or key. Programs that involve record series, such as batch processing or report generation, could be optimized in this structure. There are two main types of sequential file organization: Pile File Method and Sorted File Method.
1. Pile File Method
The Pile File Method is the simplest form of sequential file organization. ;No particular order is followed; records are saved in the order they are received. The more records there are, the less effective this strategy can be, despite its simplicity and ease of implementation.
Characteristics of Pile file method
- At the end of the file, new records are added.
- There is no particular order maintained.
- Scanning the entire file is necessary while looking for a specific record.
- Records deletions might result in gaps.
When inserting a new record in the Pile file method the new record gets directly added to the end of the file whether it is in sorted order or not.
The appended record R3 will now be available at the end of file:
2. Sorted File Method
The Sorted File Method ensures that the entries are sorted by arranging them in file with reference to a key field. This method enhances search flexibility and fast accessing of data since records can be searched faster in a sorted way. But to place things in this manner, may not be easy especially when inserting or deleting certain records.
Characteristics of Sorted file method:
- A key field is used to determine the order in which records are stored.
- Because order must be maintained, insertion and deletion procedures might be more complicated.
When a new record is inserted as shown in the figure below:
The new record gets inserted at a position such that the all the records should continue maintaining their sorted manner as shown below:
Sequential File Organization and Access in DBMS
Sequential File Organization is a basic technique employed in a database management system DBMS for storing and retrieving data. It is mostly applied when data access is sequential or in a particular order.
In this article, we will describe what sequential file organization is, define some fundamental terms about the method, depict a diagram of the sequential file organization, and give an insight into the process of accessing data sequentially in the method.
Contact Us