A File is a collection of related records (i.e. several records put together) that give a complete set of information about a certain item or a particular business entity.
Files are important in any business because; they provide up-to-date information relating to the entity sets of the business, e.g., the suppliers, employees, customers, etc of the organization.
Entities are things whose facts need to be recorded. Each entity has its attributes (i.e., individual properties), e.g., Employee (which is an entity) has attributes such as; Name, salary, address, etc.
A file can be stored manually in a file cabinet or electronically in a computer’s secondary storage device such as a Floppy disk or hard disk.
Advantages of computerized filing system over manual filing systems.
- Information takes up less space than the manual filing.
- It is much easier to update or modify information.
- It offers faster access and retrieval of data.
- It enhances data integrity.
- Reduces duplication of data, or of the stored records
Logical and physical files
Computer files are classified as either; Logical or Physical.
A Logical file is a type of file viewed by the user in terms of what data items it contains & what processing operations may be performed on the stored data items.
A Physical file is viewed in terms of how the data items found in a file are arranged on the surface of the storage media (e.g., disk, tape), and how the stored data items can be processed.
In data processing, data is organized from the smallest element to the most comprehensive.
Fields (a group of characters)
Records (a collection of fields)
File (a combination of related data records maintained in some pre-arranged order)
Database (consists of several related and integrated data files)
A Bit is the smallest item that can be stored in a physical file.
The bit can either be a ‘0’ or a ‘1’; the two states that define the storage cells of a computer memory & a storage media.
Bits combine together to form the Byte (which is the unit of measuring the computer storage). A Byte is the collection of several bits that represent a Character.
ELEMENTS OF A COMPUTER FILE.
A computer file is made up of three elements:
A character is the smallest element in a computer file, and can refer to a letter, number, & symbol that can be entered, stored and output by a computer.
A character is formed by several bits combined together, depending on the character coding system used, e.g., in a 6-bit character coding system, a character is represented by a combination of 6 bits.
Characters are normally used to represent data items such as Names, Prices, etc.
A field is an item of data or information consisting of one or more characters.
A Field is made up of a combination of characters, and forms the attribute of a given entity, e.g., in a student’s record, the students Admission number is a field.
There are 2 types of fields;
- Fixed length fields – these are fields with the same numbers of characters.
- Variable length fields – fields within a record that are made up of different numbers of characters (i.e., fields with different spaces allocated for their characters).
A record is a collection of related fields, which together form or represents a single entity.
In any particular file, there is a separate record for each entity, e.g., in a class score sheet, the details of each individual student in a row such as name, admission number, total marks, and position form a record.
There are 2 types of fields;
- Fixed length records – records in a file that are made up of the same number of fields.
- Variable length records – records that have different number of fields making them. If the records have different spaces preserved for them, then it implies that, all the records in the file will not have the same size.
Note. Variable length records normally utilize the storage efficiently. However, processing or updating them in a computer is difficult because; the programmer is dealing with unknown quantities.
On the other hand, fixed length records do not utilize the storage efficiently, but they are easy to process because; the programmer is dealing with known character quantities.
TYPES OF COMPUTER PROCESSING FILES.
There are various types of files used to store data needed for processing. Data processing files are classified according to:
- Their uses within the overall data processing activities.
- The kind of data/ information they store.
The main types of data processing files include:
- Master files.
- Transaction files.
- Reference files.
- Sort files.
- Backup files.
- Scratch files.
- History files.
- Report files.
A Master file is the main file that contains relatively permanent records about particular items or entries against which transactions are processed.
Master files contain records, which have long-term significance, and are very important for the running of the organization.
Master files normally contain 2 types of data: Static data and Dynamic data.
- Reference (Static) data:
Static data is relatively permanent, and contain details which do not change, e.g., Name, Sex, Date of birth, Date of hiring, etc.
Static data is processed by amending (i.e. making occasional changes to) the existing records, e.g., inserting new records, deleting outdated records, etc
- Dynamic data:
Dynamic data is temporary and is likely to change frequently, e.g., Salary, Tax rates, hours worked, Rate of pay, etc.
Dynamic data is processed by updating (i.e. changing the values of the various fields).
The accuracy of data within the operational files is achieved by Updating the Master file (i.e., changing the contents in the master files regularly in order to reflect the current state of affairs). This involves adding, removing or adjusting the data in the Master file.
Transaction (Movement) files.
A Transaction file contains individual data about the transactions (activities) that occurred in a business during a particular period of time.
The file contains relatively temporary information such as all incoming or outgoing records resulting from a transaction.
Transaction files are usually created from the source documents, which contain data from the point of their origin.
The contents in a Transaction file are used to update the dynamic data on Master files. For example, in a busy supermarket, daily sales are recorded on a transaction file, and later used to update the stock file. The file is also used by the management to check on the daily or periodic transactions.
Transaction files have a short life span. This is because, once the contents of the file have been used to update the master file, its contents are no longer required, and can be replaced by the next business transactions.
Examples of transaction files:
Files that contain Earnings & deductions of an Employee, or payments received from customers.
A Reference file is used for reference or look-up purposes.
Lookup information is that information which is stored in a separate file, but is required during processing. E.g., the item code entered either manually or using a bar-code reader in a point-of-sale terminal is used to look-up the item description & price from a reference file stored on a storage device.
Reference files contain records that are fairly permanent or semi-permanent such as tax deductions, Wage rates, Customer address, etc, and therefore, they need to be revised occasionally.
A Backup file is used to hold duplicate copies (backups) of data or information from the computer’s fixed storage (hard disk). These files are kept for security purposes.
This is because; the operational files held on the hard disk may be corrupted, lost or changed accidentally leading to loss or damage of existing information. It therefore important to keep copies of the recently updated files so that, in case the original file is corrupted or deleted, the backup file can be used in its place or to reconstruct the original file.
Note. The backup file & the operational file should be kept at separate places so that in case of loss or damage, both are not affected.
Sort files are created from existing files, such as Master or Transaction files, and are used mainly for sorting data (i.e., they are used to alter the sequence of the existing files).
A sort file is mainly used where data is to be processed sequentially. In sequential processing, data or records are first sorted and held on a magnetic tape before updating the master file.
A Report file contains a set of relatively permanent records extracted from the data in a Master file or generated after processing.
Report files are used to prepare reports, which can be printed at a later date.
Example of Report files:
Report on Overtime, report on Taxes, report on student’s class performance in the term, etc.
A Scratch file is a temporary file used to hold data during processing. It contains temporary data, which can be erased when the task is finished.
History (Archive) files.
History files are usually old files retained for historical use or for reference purposes, e.g., it can contain Employee details for the last 10 yrs.
A Key field is one or more fields in a record that uniquely identifies the record or a group of records.
E.g., an Employees Serial number may be used to identify the employee records in a Payroll file.
Note. Any field in the record can be used as the key field. However, it should display unique identification characteristics.
- Define a computer file.
- State four advantages of storing data in computer files over the manual filing system.
- Differentiate between Logical file structure and physical file structure.
- With the help of a figure, illustrate the information system Data hierarchy.
- Define the following terms:
- Key field.
- List 5 types of files used in data processing and their purposes.