6.1 File structure and terminology

Files, records and fields

A file is a collection of related structured data. Related means that all the data is connected with the same purpose of the theme. Structure means that you are storing the same variety of detail about each item in the file.

File: File containing record.

Record: A record is all of the data or information about one person or one thing.

Field: One piece of data or information about a person or thing.

Key field: a field in a record that holds the unique data which identifies that record from all the other records in the file or database.

Primary keys: Primary keys is the key that is unique from others.

Foreign keys: Foreign keys is a field in one table that uniquely identifies a row of another table. Foreign key is defined in a second table but it refers to the primary key  in the first table.

The breakdown of file

The breakdown of file, record and field is true for any collection of data. For example a car salemen has a file that would contains detail about all of the cars he is selling or it has been sold. The detail of one car make up one record. Each record will have the same set of details for each car: model, color, size engine and so on.

Key fields

At some of the stage records in a file is needed to be sorted, searched or merged. When searching through the records there may be time when there is more than one possible answer. For example, the file for the cars might have more than one Lamborghini Aventador. How can people be sure if it the correct information about the correct car? A car actually have a unique identifier so the registration plate. Two cars can’t have the same registration plate. This needs to be included as a field within the record, and because of its special use it is called the key field.

Flat file or relational database

A flat file database is a collection of data held in single table.

A relational database data may be held in a number tables where links are created to connect the data in different tables to each other.

123 1234