Cambridge O Level Computer Science · Syllabus 2210 · Databases
Database
What is Database?
An organised collection of data that can be stored, searched and processed; it holds its data in one or more tables, and Cambridge 2210 Topic 9 works only with databases containing a single table.
This definition is part of the Databases chapter in Cambridge O Level Computer Science.
Database in context
A database is an organised collection of data that can be stored, searched and processed. Topic 9 works entirely with a database made of one table: data arranged in rows and columns, where a field is a column holding one category of data and a record is a row holding all the field values for one item. Every field is given a data type (text/alphanumeric, character, Boolean, integer, real or date/time) and, where a rule can be stated, one or more validation checks. One field is chosen as the primary key because its value is different in every record. SQL is then used to ask questions of that table — and the answer to “what does this query output?” is found by working through the clauses in a fixed order, never in the order they are written.
A database is an organised collection of data that can be stored, searched and processed. The data is held in one or more tables, and a table is data organised into rows and columns. In Cambridge 2210 Topic 9 every database you meet contains exactly one table, so “the database” and “the table” usually refer to the same thing — but they are not the same idea, and the definition of each is worth knowing separately.
A primary key is a field whose value uniquely identifies each record in the table. Its purpose is to make every record findable and distinguishable: given one primary-key value, the database can return exactly one record, and no two records can ever be confused with one another. To be suitable, a field must have a different value in every record, must never be left empty, and should stay stable over time. That is the whole test — and it is a test about uniqueness, not about importance.
Structured Query Language (SQL) is the language used to ask questions of a database. A Topic 9 query is built from at most four clauses, always written in the order SELECT, FROM, WHERE, ORDER BY, and finished with a semicolon. That written order is not the order the query is worked out in. The table is fetched first, the records are filtered next, the chosen fields are taken after that, any total or count is calculated, and the sort happens last. Getting those two orders straight is the single most useful thing in this half of the chapter.
WHERE filters records according to a condition. The database takes every record in turn, tests the condition against that record's field values, and keeps it if the condition is true and discards it if it is not. Records that fail never reach the output at all. WHERE decides which records; SELECT decides which fields of those records are displayed. The two jobs never overlap.
Common mistakes with Database
- M1 — “A database always contains just one table.” Why it is wrongReal databases routinely contain many tables that reference one another. The single table is a restriction of this syllabus, not a fact about databases. Correct“A database is an organised collection of data held in one or more tables. Cambridge 2210 Topic 9 works only with a database containing a single table.”
- M4 — “There are 11 records, because I counted 11 rows.” Why it is wrongThe heading row was counted. It holds field names, not field values, and there is no item in the database called “BookingRef”. Correct“The number of records is the number of data rows. The BOOKING table has 10.”
- M19 — “Without ORDER BY, the records come out in table order.” Why it is wrongSQL guarantees no order unless you ask for one. Writing them in printed-table order in an exam is sensible; claiming the database must do so is not true. Correct“If a particular order is required, an ORDER BY clause has to say so.”
Examiner tips on Database
- No calculator matters here. Every SUM in a Topic 9 question is arithmetic you must do in your head or on the paper. That is exactly why the numbers in real database questions are kept small and round — and why an answer of 361.00 where 360.00 was correct usually means a copying slip, not a misunderstanding. Write the values you are adding in a column first, then add them.
- Command words, one more time. State and give want short factual answers — do not justify unless asked. Identify wants one thing chosen from what is in front of you. Explain and describe the purpose of want a reason as well as a fact. Complete means fill the printed gaps in the printed style. Show the output means write the result table, nothing more. Matching the answer to the command word is worth more marks in Topic 9 than any extra database knowledge.
Questions students ask about Database
Is a database the same thing as a table?
No. A database is an organised collection of data that can be stored, searched and processed; a table is the structure that holds the data in rows and columns. A database can contain many tables, although in Cambridge 2210 Topic 9 it always contains exactly one, which is why the two words are often used loosely for the same thing.
Should I write ASC and DESC, or ASCENDING and DESCENDING?
For this examination, write ASCENDING and DESCENDING — those are the words the Cambridge 2210 syllabus lists. The abbreviations ASC and DESC mean the same thing and are what you will meet in working database systems and in most textbooks outside this syllabus, but they are not the wording listed here.
If a query has no ORDER BY, what order do the records come out in?
SQL makes no guarantee. In an examination, write the qualifying records in the order they appear in the printed table — that is what is expected and it will be marked correct. What you should not do is claim that a database must return them in that order, or assume that an unsorted query gives you a sorted result.
Do I need to know about joins, foreign keys or normalisation?
Not for Topic 9. Those belong to multi-table database design, which this syllabus does not examine. Every Topic 9 question is answerable from the single table you are given. If a question seems to need a second table, re-read it — it does not.

