Computer Science Principles V11

Clive W. Humphris

DATA FILES: Fixed Length Record.   

Computer files provide a secure method of storing data. If that data is assembled into a meaningful form it becomes information. Information is stored as records. In this example a company file contains information about its vehicles. Each record is made up of a number of fields of a fixed length, as in most instances the same amount of data is stored.

If we added a further field called 'accident damage'. The content would vary enormously which is clearly wasteful, because hopefully most of the time it would remain blank and so a decision of fixed or variable length records needs to be made. Markers are added to indicate the beginning (BOF) and end (EOF) of files during a search process. These usually consist of a predefined string of characters, which enable or disable the file handling process. Similarly if variable length records are used then a method to show the start and finish of each record needs to be added.

Using a vehicle record is a good example as each vehicle has a unique registration number or 'key' and so accessing the content is simply a matter of searching and locating that number. Employee numbers are also unique and so these also could provide a record entry key. In practice computers would use both.

As we shall see records are not normally stored in 'key' sequence as shown. Vehicles and drivers change and so efficient methods of accessing records need to be implemented.

Table of contents

previous page start next page