Sequential File Organization

In sequential file organisation records are stored or arranged in Ascending or Descending Order according to the search key / key field.

Search Key: It is an attribute or set of attributes, which is needed to be "Primary key or even a Super Key.

• First record in the order is placed at the beginning of the file.

• Second record is stored right after the first and the third after the second and so on.

• *** Key Field can be numeric( write any employee code number) or alphabetic (like employee name). ***

Arrangements of records in file

In this records are sequentially arranged to the roll number of student (Search key).

For fast retrieval of records in search key order, we chain together records by pointers.

Pointer in each record points to the next record in search key order.

For Minimize the number of Block Access: For this we store records physically in search-key Order, or as close to search-key order as possible.

Branch name

It is a sequential file organisation of ' Account ' records.

Records are Arranged using 'Branch Name'as a search key.

This organisation of file is useful for displaying but it is difficult to maintain physical sequence order as record are inserted and deleted, we have to move many records as a result of a single insertion deletion.

By using the concept pointer chain i.e creating free list because we can overcome deletion based memory wastage.

For insertion, we apply the following rules:

• 1) locate the record in the file which comes before the record to be inserted in search-key order.

• 2) due to deletion if any space left blank in same block, inside the new record at that place. Or otherwise insert the new record in an overflow block. For this we have to adjust the pointers so as to chain together the records in search-key order.

Overflow Block

• In this Records with Search Key'kamla Nagar' has to be addded. We check if there is any search ey with Kamla Nagar.

• If yes and it checks the free space there then insert the kamla Nagar there.

• If no then the record saved in overflow block pointing next record and the record before the new inserted record in previous list points to it.




Facebook Likes

Youtube