Skip to main content
O-LevelComputer ScienceDatabases2210/21 · May/June 2021 · Q66 Marks

A library uses a database table, GENRE, to keep a record of the number of books it has in each genre. ID | GenreName | Total | Available | Loaned | Overdue ---|---|---|---|---|--- ABI | Autobiography | 500 | 250 | 250 | 20 BIO | Biography | 650 | 400 | 250 | 0 EDU | Education | 20200 | 10000 | 10200 | 1250 FAN | Fantasy | 1575 | 500 | 1075 | 13 GFI | General Fiction | 35253 | 23520 | 11733 | 0 GNF | General Non-Fiction | 25200 | 12020 | 13180 | 0 HFI | Historical Fiction | 6300 | 3500 | 2800 | 0 HNF | Historical Non-Fiction | 8000 | 1523 | 6477 | 0 HUM | Humour | 13500 | 9580 | 3920 | 46 MYS | Mystery | 26000 | 13269 | 12731 | 0 PFI | Political Fiction | 23561 | 10523 | 13038 | 500 PNF | Political Non-Fiction | 1823 | 750 | 1073 | 23 REF | Reference | 374 | 374 | 0 | 0 ROM | Romance | 18269 | 16800 | 1469 | 0 SAT | Satirical | 23567 | 12500 | 11067 | 0 SCF | Science Fiction | 36025 | 25000 | 11025 | 0 SPO | Sport | 45720 | 32687 | 13033 | 3256 THR | Thriller | 86000 | 46859 | 39141 | 0

  1. (a)State the reason ID could be used as a primary key in the table GENRE.[1]
  2. (b)State the number of records in the table GENRE.[1]
  3. (c)Complete the query-by-example grid to display any genres with overdue books. Only display the ID, GenreName and Overdue fields in order of the number of books overdue from largest to smallest.[4]

Mark scheme

Marking points from the official mark scheme (May/June 2021). The mark or mark type is shown in brackets.

  1. [1] The data in the ID column/field is unique/not repeated in each row/record
  2. [1] 18
  3. [1] Correct fields present and correctly named (ID, GenreName, Overdue)
  4. [1] Correct table name (GENRE) and show box ticked in all columns
  5. [1] Correct sorting (Overdue, Descending)
  6. [1] Correct search criterion (Overdue > 0)

Write your answer and get it marked

On Oracle Prep you can write or photograph your own answer and have it marked by AI against this mark scheme, with feedback on what you missed.

Sign up free →

About this question

Topic
Databases, O-Level Computer Science (syllabus 2210). Structured question, 6 marks.
Source
O-Level Computer Science, May/June 2021 Paper 2 Variant 1, question 6.

Questions and mark schemes are from past examination papers and remain the copyright of the exam board. How Oracle Prep builds its content

Related Computer Science questions

© 2026 Oracle Prep