|
Usually one particular field of each record contains an item which is used to identify the record. This field is called the key field . The value in the key field must uniquely identify each record.
A patient number could be used as a key field to uniquely identify each patients record in the doctors patient file. The patients name could not be a key field as there may be more than one patient with the same name.
Sometimes a record may contain more than one key field. For example the doctors patients file may contain both a patient number and a National Insurance number for each patient. Both of these are key fields. We therefore choose one of them and call it the primary key field.
Often records are stored in a file sorted into order using the primary key field. When records are stored in a file in a particular order we say that the file is a sequential file. This is especially likely to be the case if the files are stored on a serial access medium such as magnetic tape.
GCSE ICT Companion 04 - (C) P Meakin 2004