Professional Documents
Culture Documents
and
access methods
Objectives
Students should be able to :
Describe various methods of file organization and access
Select appropriate file organization for particular application.
Definitions
Record- Is a collection of related data items (possibly of different types) stored in fields and : treated
as a single entity for processing.
Field - Contains a single data item, and many fields comprise a record. Each field has a name and
one is the key field used to identify the record.
Data file - Is a collection of records holding the same types of information but about different
objects or individuals.
Important characteristics of a file
A file can be regarded has either a permanent or temporary
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.
The master file contains two types of 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.
Types of File Cont’d
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 records
in the transaction file are used to perform three important operations:
E.g 1- A bank may store data about its daily transactions using magnetic tape,
which stores data using sequential file ordering. Therefore sequential access is
used to access those records.
Sequential Access cont’d
E.g 2- . A school will have a record for each student, stored on a file.
Each student's record must be accessible to review or update
information, but all records
must be printed out at the end of each school year to allocate
students to new classes. This type of setup would benefit from direct
and sequential file ordering, so index sequential file ordering and
access is probably the best system to use.
Direct Access (aka Random access)
allows you to access the record you want without having to go through any
others. The computer locates the data item using the indices.
it allows equally easy and fast access to any randomly selected destination.
E.g - of storage devices that use direct access are:
◦ hard disks
◦ CDs
◦ USB flash drives
◦ DVDs
Exercise
Read these descriptions of data sets and suggest the most appropriate choices for their file organization and
access.
1. A company distributes a list among its employees for ordering stationery items. Each item is added as
it is requested.
2. A company has a set of records detailing the seating arrangement of all employees, listed in order of
seat number.
3. A bank keeps track of the banking transactions you carry out every day and sends you a printed
statement of all transactions at the end of each month.
4. A software installation company has a list of customers that still owe the company money for
installations. Each customer's record must be accessible so their balance can be updated when they
pay another installment, and the whole list must be printed at the end of each month so the financial
manager can get an overview of the changes since the previous month.
5. A student uses a flash drive to back up the projects, pictures and music files that she keeps on her
computer.