Master and Transaction Files , Storage and Handling of Files

Master and Transaction Files

Storage and Handling of Files

MASTER FILE

A master file is a file used as a reference for a particular computer application. It may be updated when necessary.

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.

Example of a master and a transaction file

A file holds details of the goods stored by a chain of food shops. Each record consists of: product code, name of goods, price, minimum number to be held in stock. This file is the master file. Another 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.

Storage and Handling of Files

To create a file means to organize data into a file.

STORAGE OF FILES

Files on tape are usually stored with extra information both

1 Before the first record in a header label, for example, file name, date written, etc., and

2 After the last record in a trailer label, for example, number of records in the file, etc.

Sequential files have an end of file marker, so that programs can recognize the last record. Discs usually have a directory which is used by the operating system to locate files.

A directory is a file containing a list of names of files and the information needed to access those files on the disc.

The operating system locates files using an addressing system for the tracks and sectors (and cylinders on a disc pack). This addressing may be built-in at the manufacturing stage or may be added later by formatting the disc.

To format a disc means to prepare it for subsequent file storage by adding control information to it. In microcomputers this is usually done by running a program which writes track and sector numbers on the disc. Only blank or unwanted discs should be formatted as the operation will effectively erase any data already on them.

FACILITIES FOR FILE USERS

A computer’s operating system usually allows users to:

1 Create and access sub-directories. A sub-directory is a part of the main directory which can be accessed separately.

2 Obtain a catalogue of a given directory. A catalogue is a list of the files in a directory. 3 (a) save, (b) load, (c) delete, (d) rename and (e) copy files.

(a) To save a file means to copy all the records from the main store onto a permanent store.

(b) To load a file means to read all the records from a permanent store into the main store.

(c) When a user deletes a file it can no longer be used. Usually the file is not actually erased from the disc. The reference to it is erased from the directory and the space on the disc is made available for other data.

(d) When a user renames a me, the name of it is changed in the directory. The file itself is not altered.

(e) When a file is copied, it is read into the main store, in sections if necessary, and a copy of it is written onto a new disc or another part of the same disc. After the operation there are two identical files, although the user may choose to give the new file a different name.

Leave a comment

Your email address will not be published. Required fields are marked *