File Organization
File Organization
File organization and access relate to the use of records, fields and files.
● A record is a collection of related data items (possibly of different types) stored in fields and treated as a single entity for processing.
● A field contains of a single data item, and many fields comprise a record. Each field has a name and one is the key field and used to
identify the record.
● A data file is a collection of records holding the same types of information but about different objects or individuals.
Serial Access
In a serial access file the data records are stored as a series, one after the other. They are not stored in any particular order. To find information,
the software needs to look through every record, one at a time.
Sequential Access
A sequential access file is like a serial file, but the records are sorted into a particular sequence. This makes it easier and quicker for the software
to locate the correct record when it is needed. The records might be sorted in code number order, for example.
● An index in a book lets you look up a particular key word or topic, and tells you what page of the book has information about that
topic
● An index in a data file lets you look up a fact in the data file and tells you what record in the database has that fact in it
An index added to a sequential file makes it quicker for the computer to find the information you need.
● Use a sequential access file in cases where the computer needs to look through every record in the database. An example is a payroll
program. The payroll database will contain a record for each employee in the company. When calculating pay, the database software
will process every record, in order.
● Use a direct access file when the computer has to quickly find one record in a large database. An example is a supermarket
point-of-sale terminal. The shop database will contain a record of each product in the store. When a bar code is scanned the computer
must immediately find the price of that product in the database.
● A library has a computer-based catalogue of all its books. The catalogue is sorted by the ISBN (International Standard Book Number)
which you can find on the back on any book that has been published. There is usually a barcode that gives the ISBN as well. When
someone borrows a book the librarian scans the ISBN barcode and this brings up the details of the book on screen. The catalogue file
is large, but stored sequentially. Index sequential file organization will give fairly quick access to any record.
Many businesses and organizations regularly access, modify and store large amounts of files. These files are given special names to identify their
purpose.
Master file
A master file is a permanent file which is kept up-to-date and stores the main information, summary data and key fields in the data.
● Permanent data, such as employee personal data, payroll data, employee status and job title
● Less permanent data, which is updated on a regular basis, such as hours worked and taxes deducted
The master file before update is called the old master file or grandfather file.
Transaction file
A transaction file is a temporary file which is used to update the master file after a certain time (at the end of each day or week, for example).
The transaction file updates the master file. The records in the transaction file are used to perform three important operations:
There is also another file known as the change or transaction log, which keeps a record of changes to the transaction file. This is important as
many businesses need to record the history of what transactions have taken place and not just the latest one.