Computer Files for SS2

Computer Files for SS2
Definition of some Terms
1. Computer file is defined as the smallest meaningful unit of data representation within a computer
2. A computer file is a block of arbitrary information, or resource for storing information, which is available to a computer program and usually on some kind of durable storage.
File Functions:
Files are used to do one or more of the following functions:
a. Provide machine executable code
b. Store application program or operating system configuration
c. Store data used by user such as Microsoft Word files.
Therefore there are three types of information that files contain:
i. Executable code
ii. system or program configuration file
iii. user data
3. Record: A record is a collection of fields. In computer science , a record (also called
struct or compound data) is a basic data structure .
4. Field: Field is a single piece of information about and object. A is also defined as a space that holds specific parts of data from a set or a record. Examples of fields are NAME, ADDRESS, QUANTITY, AGE, etc.
5. Data element: A data element is the logical definition of field
6. Data item: Data item is the actual data stored in the field.
Types of Data Items
Each data element consist only a single item. These items will have one of the three basic types: numeric, alphabetic and alpha-numeric.
Numeric data: Data consisting of digits and not letters of the alphabet or special characters.
Alphabetic data: Data consisting of letters and not digits or special characters.
Alpha-Numeric data: Data consisting of digits, alphabets as well as special characters.
File Organization
The term ” file organization ” refers to the way in which data are stored in a file and, consequently, the method(s) by which it can be accessed.
File organization Terms
a. Block: A block is the physical unit of transfer between the backing store and the main memory.
b. Bucket: A bucket is the logical unit of transfer between the backing store and main memory.
c. Hit: In processing a record that is required is called a hit.
File Organization Structure
 
Types of File Organization
There are mainly four types of file organization:
1. Serial file organization
2. Sequential file organization
3. Index file organization
4. Random file organization
Serial file organization
Serial files are stored in chronological
order, that is as each record is received it is stored in the next available storage position. In general it is only used on a serial medium such as magnetic tape.
Sequential file organization
Sequential files are files whose records are sorted and stored in an ascending or descending on a particular key field.
Index file organization
An index is an alphabetical list of names, subjects, etc., with references to the places where they occur. Indexed Sequential file organization is logically the same as sequential organization, but an index is built indicating the block containing the record with a given value for the Key field.
Random file organization
A randomly organized file contains records arranged physically without regard to the sequence of the primary key. Records are loaded to disk by establishing a direct relationship between the Key of the record and its address on the file, normally by use of a formula (or algorithm) that converts the primary Key to a physical disk address. This relationship is also used for retrieval.
Methods for Accessing Files
Files can be accessed:
a. Serially
b. Sequentially and
c. Randomly
File Classification
Files are classified as follows;
a. Transaction Files: transaction files contains details of all transactions that have occurred in the last period. Examples of transaction files are price of the products, customers order for the products, inserting new data to the database etc.
 
Features of transaction file
1. The data stored in these files are temporary by nature
2. This file contains data only for period of time and send to the master file
3. Any data to be modified is done in this file
4. In this file the data to be modified is stored.
b. Master Files: Master file are permanent file kept up-to-date by applying the transactions that have occur during the operation of the business.
Features of transaction file
1. The data stored in these files are permanent by nature
2. This file is empty while nature
3. This files are updated only through recent transactions
4. This file stores large amount of data
c. Reference Files: Reference file is a type of master file containing referential data.
It contains data that are necessary to support data processing. e.g. price lists, dictionary files, present value schedules, amortization.
Criteria for File Classification
1. How the file is to be used
2. How many records are processed each time the file is updated
3. whether the individual records need to be quickly accessible
4. nature of content
5. Organization method
6. Storage medium