Skip to main content
O-LevelComputer ScienceDatabases2210/22 · May/June 2024 · Q108 Marks

A television subscription service has a new database table named Contract to store details of their subscribers' contracts. The table contains these fields: • ContractNumber – the contract number, for example CT567 • Months - the length of the contract in months, for example 6 • EndDate - the date the contract finishes, for example 30 November 2024 • News the news service, yes or no • Movie - the movie service, yes or no • Sport - the sports service, yes or no • Junior - the children's service, yes or no.

  1. (a)Identify the field that will be the most appropriate primary key for this table.[1]
  2. (b)Complete the table to identify the most appropriate data type for these fields in Contract Field ContractNumber Months EndDate Sport Data type[2]
  3. (c)Explain the purpose of these structured query language (SQL) statements. Statement 1: SELECT SUM (Months) FROM Contract; Statement 2: SELECT COUNT (News) FROM Contract WHERE News;[3]
  4. (d)Complete this SQL statement to find the contract numbers of the subscribers that take both the news and sports services. SELECT ... FROM Contract WHERE ... AND ... ;[2]

Mark scheme

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

  1. ContractNumber
  2. One mark for every two correct data types
  3. Field Data type
  4. ContractNumber text/alphanumeric
  5. Months integer
  6. EndDate date/time
  7. Sport Boolean
  8. One mark for each point
  9. MP1 to find the total number of months for all contracts
  10. MP2 to find the number of contracts
  11. MP3 that are subscribed to News
  12. ContractNumber
  13. News AND Sport // Sport AND News
  14. Example answer:
  15. SELECT ContractNumber
  16. FROM Contract
  17. WHERE News = TRUE AND Sport = TRUE ;

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, 8 marks.
Source
O-Level Computer Science, May/June 2024 Paper 2 Variant 2, question 10.

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