Section 6.1
6 Files
6.1 File Concepts
6.1.1 File Structure
A files is an organised collection of data. For example: An employee file may
contain a collection of organised data relating to employees within a company.
Files are made up of records.
A record is a collection of data about one item or individual.
A record consists of a numbewr of fields.
Each holds one piece of data.
In a computer system data is usually stored on a magnetic or optical medium.
For example: Hard disk, floppy disk, CD-RW, etc.
Such media are non-volatile.
Media for data storage are classified:
Direct Access Storage
Data can be stored or retrieved at any address directly.
Serial Access Storage
Data can only be stored or retrieved from one address after another.
6.1.3 Data File Types
Files which consist of records and fields are called data files. There are three
main types:
Transaction Files
Such files contain details on all recorded events over the last period.
The period may be a day, a month, etc.
A sales transaction file contains data on all the sales made in the last day.
Transaction files have a very short life. Although they may sometimes be
achived.
Master Files
These are permanent files that are regularly updated by processing transaction
files.
They contain:
- Fairly permanent data.
- Data that is updated with the transaction files.
Resource Files
These are permanent files that are nt usually updated. Contents are used for
reference.
6.1.4 Other File Types
Program Files
Here the data is the 1s and 0s that make up an executable program.
Document Files
This data is used by applications software.