File Organisation 2023
File Organisation 2023
FILE COMPONENTS
FILE: It is an organised collection of related records. It is also called data file. Eg. A
Transaction file, Master File.
FIELD: It is a single data item. A field contains similar data about all the entities
since a field has a particular data type. Eg. Student surname, student first name,
age, class, address in a student’s file. In a database, a field is signified by a
column.
PRIMARY KEY, KEY FIELD OR KEY: It is a field that differentiates the records in
a file. The data stored in a key field contains data that is unique to a specific record.
A student record would use student_ID as a key field because it uniquely identifies
each student.
Primary key Fields
Records
Data item
Page | 1
1. SERIAL FILE: Records are stored onto the storage medium one after
another as they are entered.
Serial Access: A method in which to read a record it is necessary to read
through all the preceding records first.
2. SEQUENTIAL FILE: Records are stored onto the storage medium one after
the other but in a defined sequence according to the record keys.
Sequential Access: A method in which the records are read from the first
until you reach the one you want.
3. DIRECT (RANDOM) FILE: Records are stored onto the storage medium in
no particular order.
Direct Access: A method where any record can be accessed without having
to access other files first. It is also known as random access.
Notes:
File stored in a tape cartridge are always serial or sequential access. A direct
access would involve too much movement of the tape forward and backward.
Direct access files can only be stored on a direct access medium (such as
magnetic tape).
Page | 2
TYPES OF FILES
There are various types of files.
1. Transaction File It is a file that is used to hold temporary data which is used to
update the master file affected by the transaction. It is a collection of transaction
records like sales transactions, payroll transactions.
2. Master File: The most important file since it is the most complete and up-to-
date version of a file. Examples of master files can be inventory master file, general
ledger master file, receivables master file.
3. Security/Backup File is a copy of a file which is kept in case the original gets
lost, stolen, corrupted or damaged. For a large organisation, this may be
detrimental to its operations and existence. However, it is possible to recreate a
master file using the grandfather-father-son principle.
The fourth backup is made by recording over (or replacing, depending on the
media) the grandfather copy. The new copy becomes the son, the previous son
becomes the new father and the father is promoted to grandfather. This continues
in rotation so there are always three backups, each of a different point in time.
Page | 3
The advantage of saving the two previous backups as well as the current backup is
that if the computer data somehow become corrupted and the problem isn't caught
until after the backup is made, there are still two uncorrupted, albeit increasingly
out of date, backup copies. Given reasonable care, it's unlikely a problem will
corrupt all three backups before it is caught. Similarly, if one of the backup copies
is damaged, you still have two more. The three-generation backup also makes it
easy to store one of the copies (usually the grandfather) in a more secure and often
off-site location.
SUMMARY OF FILES
Task: Using the above principle, fill data in the figure below
Page | 4
Page | 5