Unit 9 · Databases

9 Databases

By the end of this section you should be able to

  • 9.1 Define a single-table database
  • 9.2 Suggest suitable data types
  • 9.3 Choose a suitable primary key
  • 9.4 Read and complete SQL scripts
  • 9.5 Identify the output of an SQL query

Lessons

  1. What is a database?
  2. Data types and validation
  3. SQL: SELECT, FROM and WHERE
  4. SQL: ORDER BY, SUM and COUNT

Key vocabulary

Database
A structured collection of data stored so it can be searched and sorted.
Field
A single piece of data about each record; a column in the table.
Record
All the data about one item; a row in the table.
Primary key
A field that holds a unique value for every record.
SQL
Structured query language, used to query a database.
SELECT
The SQL keyword that chooses which fields to show.
WHERE
The SQL keyword that sets the conditions records must meet.
ORDER BY
The SQL keywords that sort the results ascending or descending.
Loading Bits of Bytes…