Databases

2026 Syllabus Objectives

By the end of these notes, you should be able to:

  1. Define a single-table database from given data storage requirements (including fields, records, and validation)
  2. Suggest suitable basic data types (text/alphanumeric, character, Boolean, integer, real, date/time)
  3. Understand the purpose of a primary key and identify a suitable primary key for a given database table
  4. Read, understand and complete SQL scripts to query data stored in a single database table (SELECT, FROM, WHERE, ORDER BY, SUM, COUNT, AND, OR)

What is a Database?

A database is an organised collection of data. Think of it like a digital filing system that stores information in a structured way.

Key features of databases:

  • Made up of one or more tables (like spreadsheets)
  • Each table contains fields and records to organise the data
  • Allows you to store, find, and manage information easily
  • Particularly useful when working with large amounts of data
  • Stored on secondary storage (like hard drives or servers)
  • Often stored on remote servers so multiple people can access the data at the same time
  • More secure than simple text files
  • Data can be sorted and searched very efficiently

Fields

A field is one piece of information relating to one person, item, or object.

  • In a database table, a field is represented by a column
  • Each field has a name that describes what information it contains
  • For example: FirstName, Age, PhoneNumber

Records

A record is a collection of fields relating to one person, item, or object.

  • In a database table, a record is represented by a row
  • Each record contains all the information about one specific item

Example:

Here's a simple database table showing student information:

StudentIDFirstNameLastNameAge
1001SarahAhmed15
1002JamesChen16
1003AmiraKhan14

In this table:

  • Fields (columns): StudentID, FirstName, LastName, Age
  • Records (rows): Each row represents one student
  • The first record contains: 1001, Sarah, Ahmed, 15

Sign in to view full notes