File structure
A database consists of a number of related files (sometimes called tables).

A file consists of a number of related records.

A record consists of a number of related fields.

A field is a single data item consisting of a number of characters.

Example 1

This table shows a small section of a file which contains details about school pupils:

Number Surname FirstName Form
91230 Sam Fenella B
91231 Sanders Michael G
91232 Saunders Ian B
91233 Sealey Kelly R
91234 Shaw Lucy S
91235 Shaw Oliver N

The yellow section shows one record.

The file has 6 records and each record has 4 fields (Number, Surname, Firstname and Form).

The key field is used to uniquely identify a record. The key field in this example is 'Number'. No two records would have the same data in the key field.

Fields may be of a number of different types :

  • integer
  • real (decimal)
  • string (alphanumeric)
  • date
  • currency
  • picture
  • sound
  • video
  • a calculated field

 

When a database is created it is important that the same data is not stored twice (this may lead to inconsistencies). This is usually done by linking the tables with relationships...using the key field of one table as a field in another table.

 

Data in a database can be accessed and used to produce reports. A report may use data drawn from a number of different files.
Exercise : File structure
A field is a single data item.

A record consists of a number of related .

A file consists of a number of related .

A database consists of a number of related .

Example of part of a file :

Member No Name Initials Postcode DOB Type
1402 Simpson J.R. CF31 5YT 03/09/66 A
1419 Thomas L. CF20 6WV 11/04/89 J
1420 Thomas K.N. BT29 9QW 03/02/59 A
1426 Lambeth J CF28 8HU 01/03/70 A
1430 Jenkins A. SW12 8HY 12/03/91 J

This file has records. Each record has fields.

The key field is .

 

(Green indicates success)