0% found this document useful (0 votes)
75 views

File Organization

File organization refers to how data is stored in a file and determines methods of access, efficiency, and storage devices used. There are four main file organization methods: sequential, random, serial, and indexed-sequential. Sequential organization stores and accesses records in a sorted order, allowing for faster searching methods like binary search. Random organization stores records randomly but accesses them directly using a record key. Serial organization stores records sequentially without indexing, making individual record access cumbersome. Indexed-sequential organization stores records sequentially with an index to enable direct access.

Uploaded by

Adil Aziz
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
75 views

File Organization

File organization refers to how data is stored in a file and determines methods of access, efficiency, and storage devices used. There are four main file organization methods: sequential, random, serial, and indexed-sequential. Sequential organization stores and accesses records in a sorted order, allowing for faster searching methods like binary search. Random organization stores records randomly but accesses them directly using a record key. Serial organization stores records sequentially without indexing, making individual record access cumbersome. Indexed-sequential organization stores records sequentially with an index to enable direct access.

Uploaded by

Adil Aziz
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

File organization methods

·File organization refers to the way data is stored in a file. File organization is very important because
it determines the methods of access, efficiency, flexibility and storage devices to use. There are four
methods of organizing files on a storage media. This include:
1. sequential,
2. random,
3. serial and
4. indexed-sequential

1. Sequential file organization


1. Records are stored and accessed in a particular order sorted using a key field.
2. Retrieval requires searching sequentially through the entire file record by record to the end.
3. Because the record in a file are sorted in a particular order, better file searching methods like
the binary search technique can be used to reduce the time used for searching a file .
4. Since the records are sorted, it is possible to know in which half of the file a particular record
being searched is located, Hence this method repeatedly divides the set of records in the file
into two halves and searches only the half on which the records is found.
5. For example, of the file has records with key fields 20, 30, 40, 50, 60 and the computer is
searching for a record with key field 50, it starts at 40 upwards in its search, ignoring the first
half of the set.

Advantages of sequential file organization


1. The sorting makes it easy to access records.
2. The binary chop technique can be used to reduce record search time by as much as half the
time taken.

Disadvantages of sequential file organization


1. The sorting does not remove the need to access other records as the search looks for particular
records.
2. Sequential records cannot support modern technologies that require fast access to stored
records.
3. The requirement that all records be of the same size is sometimes difficult to enforce.

2. Random or direct file organization


1. Records are stored randomly but accessed directly.
2. To access a file stored randomly, a record key is used to determine where a record is stored on
the storage media.
3. Magnetic and optical disks allow data to be stored and accessed randomly.

Advantages of random file access


1. Quick retrieval of records.
2. The records can be of different sizes.
3. Serial file organization
1. Records in a file are stored and accessed one after another.
2. The records are not stored in any way on the storage medium this type of organization is
mainly used on magnetic tapes.

Advantages of serial file organization


1. It is simple
2. It is cheap

Disadvantages of serial file organization


1. It is cumbersome to access because you have to access all proceeding records before retrieving
the one being searched.
2. Wastage of space on medium in form of inter-record gap.
3. It cannot support modern high speed requirements for quick record access.

4. Indexed-sequential file organization method


1. Almost similar to sequential method only that, an index is used to enable the computer to
locate individual records on the storage media. For example, on a magnetic drum, records are
stored sequential on the tracks. However, each record is assigned an index that can be used to
access it directly.

You might also like