You are on page 1of 4

CAPE Information Technology

Unit 2
Module 1 Specific Objective 5

Specific Objective 5: describe the different types and organization of files and databases;

Content: File types including master and transaction files; file organization including serial,
sequential, random or direct, indexed sequential database types including personal, workgroup,
department and enterprise databases; database organization including hierarchical, relational,
network and object-oriented.

Define Master and Transaction file


Posted on June 1, 2012 by
Master File
A master file is a file used as a reference for a particular computer application. It may be updated
when necessary. E.g. a file holds details of the goods stored by a chain of food shops. Each
record consist of product code, name of goods, price minimum number to be held in stock. This
file is the master file.

Transaction File
A transaction file is a file of temporary data, which has been prepared in order to carry out a
processing operation with the data on a master file. Usually the transaction file is being used to
update the master file.e.g The file is prepared containing product code and new price for some of
the goods on the master file. This is the transaction file and it is used to update the prices on the
master file.

Source: http://olevelcomputerstudies.com/2012/06/define-master-and-transaction-file/

Computer File Organisation


File organisation refers to the arrangement of records within a database. Operating systems
support three basic types of file organisation. These are sequential, index-sequential and direct-
access.

Sequential Files
These can only be accessed from beginning to end sequentially, i.e. to read or write the 1000th
record, you must first read the 999 records that come before the 100th record. It works a bit like
songs on a cassette tape. If you want to listen to the last song on the tape, you must wind through
all the songs that come before it. Sequential files are usually sorted into some order, e.g.
ascending order of customer number.
Sequential File organisation is used when a high percentage of records are processed at the same
time, e.g. a wages file.
CAPE Information Technology
Unit 2
Module 1 Specific Objective 5

Index-Sequential Files
When you create a database on your PC with 20 to 30 records stored in the table, all the queries
work instantly. However, when there are thousands of records in a database, it can take much
longer for a query to find records. The reason for this is that queries work by searching through
all the fields in the table, record by record. The more records there are, the longer this takes.

Creating an index for the fields that you use in your queries will speed up the queries. An index
will also speed up sorting of these fields. For example, in the table above, if you did a lot of
searching and sorting on the Result field, setting up an index of the Result field would speed up
your queries and reports. An index in a database is similar to the index at the back of a book,
where you can quickly look up a key word. Once you locate the key word in the index, you will
be given a page number which allows you to go directly to that section without having to look
through the rest of the book.
This is how an index works in a database file. The index is a separate file, just like the index in a
book. When you set up an index in a database file, queries work faster. The database searches
through the index first. The index points to the location of the records in the database. This is
much quicker than searching through an entire table.
CAPE Information Technology
Unit 2
Module 1 Specific Objective 5

An index can be set up in table design, as shown above for the Result field. This will speed up
any sorting and searching on that field. In the table above, the Exam Number field is the primary
key. When you set a field as a primary key, Access automatically creates an index for that field.

Direct-Access files
In a direct-access file, you can read any record or write new record a new without having to wait
for the database to read all the other records in the table. In a direct access file, one of the fields
in the table must be set up as the primary key. This allows the database to locate specific records
because records in the table will always be in ascending order of the primary key field.

Selecting a File Organisation


This depends on how you will process records in the database

 If a large percentage of the records are processed together, sequential file organisation is
best. This is because a computer can process records much quicker when they are stored
in sequence. A good example of this is the computer system that produces student
payslips every week. Every student record in the database is processed and the output
from the program is a payslip for every student record. Sequential file organisation is
used in batch processing.
 If a large percentage of records are processed but some records need to be updated
occasionally, then index-sequential file organisation is best. An example of this is an
employee payroll. All the records are processed every week to produce payslips but
individual records would need to updated occasionally as employees get pay rises or
promotions. Index-Sequential file organisation is used in batch processing.
 In a system where records are processed one at a time, direct-access file organisation
should be used. For example, in an airline booking system, individual travel agents would
CAPE Information Technology
Unit 2
Module 1 Specific Objective 5

log into the system to book flights for individual customers. Direct-access file
organisation allows the travel agent to instantly access the specific flight that they
require. Direct-access file organisation is used in on-line processing.

Source: http://www.bitsoflearning.com/ics/lecturenotes/unit3/fileorg.htm, retrieved: August 26,


2013

You might also like