Loading…

Updating guides…

Subject

Key Stage

Clear filters
Computing GCSE

GCSE Computer Science: Databases and SQL Guide

Relational database structure and basic SQL commands for GCSE Computer Science.

What is a database?

A database is an organised collection of structured data, typically stored in tables made up of records (rows) and fields (columns), designed to be searched and updated efficiently.

Relational databases

A relational database links multiple tables together using keys — a primary key uniquely identifies each record in a table, and a foreign key links to a primary key in another table to connect related data.

Why use multiple tables?

Splitting data across related tables (normalisation) reduces repeated data, which saves storage space and avoids inconsistencies that can happen when the same information is duplicated in many places.

Basic SQL

SQL (Structured Query Language) is used to interact with databases: SELECT retrieves data, INSERT adds new records, UPDATE changes existing records, and DELETE removes records, often combined with a WHERE clause to target specific rows.

Common mistakes

  • Confusing a primary key (unique identifier in its own table) with a foreign key (a link to another table).
  • Forgetting a WHERE clause, which can affect every row in a table by mistake.
  • Storing the same data repeatedly across a database instead of linking tables properly.