Topic 6 · Notes

Organisation and structure of data

These notes are part of the Study subscription

11 sections covering the whole specification for this topic, with worked examples.

Preview

Fields, records and files

Term Meaning Example
Field One item of data Surname
Record All the fields about one person or thing One student's details
File A collection of related records Every student in the school
Key field A field that identifies each record uniquely StudentID

Designing a file means deciding, for each field:

  • its name, which should describe the data
  • its data type: text (string), integer, real, date, Boolean
  • its length (for text fields) or size in bytes
  • any validation rules
  • which field is the key and the order the records are kept in

Choose data types carefully. A phone number is stored as text, not an integer: it has a leading 0, may contain spaces, and is never used in calculations. Dates are stored as a date type so they can be sorted and compared properly.

Also in these notes

  • Fixed and variable length recordsAS
  • Master and transaction filesAS
  • File organisation and accessAS
  • Backup, generations and archivingAS
  • ValidationAS
  • VerificationAS
  • Creating and processing filesA2
  • Hashing algorithmsA2
  • Multi-level indexesA2
  • Overflow and file reorganisationA2