Databases

Computer Science: OCR A Level, topic 3.2.2

Flat-File Databases

Flat-file databases are used to store records of information in order to be searched or queried at a later date.

Structure of flat-file databases

Structure of flat-file databases

  • A flat-file database is one that has a single table to store data about an 'entity'.
  • The table stores data in fields (columns) such as date of birth.
  • A record (row) of information is a complete set of fields put together.
  • This could be a person's details such as name, address, date of birth, telephone number.
Redundancy

Redundancy

  • Redundant data is data that is repeated in a database.
  • A single table file is inefficient as it is full of redundant data
Primary key

Primary key

  • A primary key is a field used to uniquely identify a specific row of data in a table.
  • For example, each student in a college database will have a student ID number that is unique to each student that can be used as a primary key

Test yourself on Databases

  • Which of the following is a suitable primary key for a database of office workers?

  • What is the term used for 'Date of Birth' in a database?

Practise this topic for free