\\\\\\\\\FILING SYSTEM or DATA HANDLING
File: A collection of records is called a file. It is a collection of related data. Before we had
computers information was stored on piece of paper on card in manual filing systems. A manual
filing system is something like a filing cabinet or card index.
A computer based filing system can store a lot of information in a very small space, search
through the information is very quickly and produce printed reports and lists very easily.
Field: a field is an area on a record which contains a single piece of information. Examples of
fields are Name, Age candidate number etc.
Record: a record is a set of related information about a thing or individual. The records are
divided in to fields. A sales record would contain all the sales made to a particular company.
Data files: Information in computer based filing systems is stored in data files. A file is a
collection of related records: this means that each record in a file contains the same sort of
information as all the other records. The data is usually held as one or more files on backing
storage.
File extension: All file names carry some kind of extension. The file name extension identifies
the kind of data in the file example
.Doc for document file
.DBF for database file
.XLS for excel file
.BMP for bitmap file
TYPES OF FILES
i. Master file: a master file is the most important file and the main source of data for an
application. It is the most complete and up-to-date version of a file. If this file is damaged the
whole system will break down. Example of a master file is a payroll master file for
employees which is updated by a transaction file of hours worked for the current month.
ii. Transaction file: A file is used to hold temporary data which is used to update the master file.
Transaction file can occur in any order and it is necessary to sort a transaction file into the
same order as the master file before it is used to update the master file.
Relation between Master and Transaction files.
The master file is the main file containing all the records about a particular subject.
For example: a sales master file will contain all the information about the accounts.
Because there will be many transaction (pieces of business). The master file needs to
be regularly updated. All the transactions which take place in a day or sometimes a
week are placed on a file which is called the transaction file. The transaction file is
combined with the master file to produce a new updated file. The new updated file
1
now becomes the master file.
iii. Transaction log file: Is where a record of transaction is kept, it shows all the transactions
made over a certain period. Using the log file, you can see what the data was before the
changes were made and who made them. Transaction log files therefore maintain security
and can also be used to recover transactions lost due to hardware failure.
iv. Archive file: Is a file containing data that is no longer in use but held for historical/reference
purposes. It is often stored away or sometimes on the same computer system in a secure
location.
v. Backup file: Is a copy of a file kept as a security measure in case the original file is
corrupted in any way. It often kept in secure location away from the computer system.
Backup files are also known as Security files.
The grandfather - father - son principle: There is always a slight chance that the
data contained on a master file may be destroyed. It might be destroyed by an
operator error, a power failure, fire or even theft. For a large company this could
prove disastrous. But using the grandfather father - son principle it is possible to
recreate the master file if it is destroyed.
The principle works like this;-
Basically three generations of files are kept. The oldest master file is called the
grandfather file and it is kept with its transaction file. These two files are used to
produce a new master file called the father file which, with its transaction file is
used to create the most up-to-date file, called the son file.
The process is repeated and the son becomes the father and the father becomes the
grandfather and so on. Only three generations are needed and the other files can be
re-used. Figure below shows how this procedure works.
2
FILE ORGANISATION
File organization means how data is stored on the secondary storage.
The filing systems used by modern computers are called hierarchical filing systems. An area
where files are stored is called a directory or a folder. In a hierarchical filing systems, each
directory may contain other directories. These are called sub-directories.
Methods of Organizing Files
i. Serial filing: A serial file is one in which the records have been stored in order in which they
have occurred, they are not sorted into any particular order. With the serial file, the records
do not follow each other in any particular order, if a new record needs to be added it can just
be added to the end of the file.
Device: we use Tape disc, drum or hard disk to store files serially.
ii. Sequential filing: A sequential file is one in which the records are stored in a sorted order or
specified order. E.g. In a student record system this could be in numerical order of candidate
number or alphabetical order of surname.
Device: we use Tape disc, drum or hard disk to store files sequentially.
iii. Random filing: Random files are usually stored on disc they are not stored in any order on
the disk surface, the address of each record is the sector and track number where the data is
located.
Device: we use hard disk, floppy disk or RAM to store random files.
Methods of Accessing Files
i. Serial access: Is where items are read one at a time from the start until end of the file. To
read a serial file a computer has to read each record until it reaches the one required.
Device: we use Tape disc, drum or hard disk to access files serially.
ii. Sequential access: With sequential access the records are in order and sorted out, so if just
one record is required it is slow if all the records are required it is fast.
Device: we use Tape disc, drum or hard disk to access files sequentially.
iii. Direct access or random access: Is where any item can be retrieved immediately, provided
its position in the file is known. With direct access it is possible to go directly to a record
without having to look at any other record.
Device: files can be accessed randomly or directly from hard disk, floppy disk or RAM.
3
Common File Processes/ Operations
File operations are those activities/processes that can be performed on an existing data file.
Reading: is taking a copy of data item or record from a file.
Writing: is inputting data item or saving any changes to a file.
Updating: is altering an existing data item or record already written in the file.
Inserting: is adding a new data item or record to an existing file.
Appending: is adding a new data item or record at the end of an existing file.
Deletion: is removing a data item or record from a file.
Searching: is the process of examining a file to find out if a given data item or record exist.
File Manipulation Operations
Sorting: Is the process of arranging data items in a pre-determined order such as alphabetical
or numerical in ascending or descending order.
Merge: Is the process of combining two or more ordered data structures or files into a single
one. The process of combining two files is called merging. E.g. – Mail-merge means
combining a database file with a document file.
File interrogation: Involves getting information from a file. Fields are selected and the
computer then searches through the records, finding all records which match the field or fields
being used for the search. A report (printout) is then produced which has either all records
found or only certain fields of those records.
Data analysis: Some databases allow the data to be analysed in some way once they have
been entered. E.g. – You can produce bar charts, pie charts and line graphs using selected
fields from a database.