/en-tutor-prep-s2-ict-databases-tables-queries-practice-1/
/en-tutor-prep-s2-ict-databases-tables-queries-practice-1/
General Inquiry: info@TutorZone.com.hk
Office Hours: Monday to Saturday - 9:00 AM to 6:00 PM
WhatsApp Monday to Sunday - 24 hours
Hotline: +852 6828 1809
Instant Support: +852 9061 3106

S2 ICT database tables and queries practice 1: fields, primary keys and basic filters

S2 ICT database tables and queries practice 1: fields, primary keys and basic filters

  • 2026-11-20

S2 ICT database tables and queries practice 1: fields, primary keys and basic filters

Ten items all built on one library book table of five records: counting fields and records, telling a primary key from a data type, then counting matches with greater than, equals and OR conditions.

S2 ICT database practice 1: ten foundation items The table has five fields and five records, BookID is the unique key and the title Physics Basics repeats twice. Filtering Year above 2015 leaves four records and author Chan gives two. Every item carries a note so a tutor can check whether fields and records were confused.

01 Paper details (check answers afterwards)

Item Detail
Questions 10
Suggested time 25
Difficulty mix Foundation 3 · Intermediate 3 · Challenge 3 · Error redo 1
Chapter Chapter: S2 ICT: Database tables and queries
Level Foundation

02 Questions (10 items)

  1. FoundationA library book table has five fields (BookID, Title, Author, Year, Copies) and five records. How many fields and records are there?
  2. FoundationThe title Physics Basics appears twice among the five records. Which field is the best primary key?
  3. FoundationWhat data type should the Year and Copies fields use?
  4. IntermediateWith the filter Year > 2015, how many records match?
  5. IntermediateWith the condition Author = Chan, how many records are returned?
  6. IntermediateSorting by Year from largest to smallest, which book comes first?
  7. ChallengeApplying both Author = Chan and Year >= 2019, how many records remain?
  8. ChallengeChanging the condition to Author = Chan OR Author = Lee, how many records match?
  9. ChallengeWhat is the total of the Copies field?
  10. Error redoA student sets Title as the primary key and then enters a second Physics Basics. What goes wrong?

03 Answers and one-line notes

# Answer One-line note
1 Five fields and five records Fields are the vertical columns and records the horizontal rows, so the two counts are read separately.
2 BookID, because every book number is unique A primary key must be unique, so a repeated title cannot serve as one.
3 Both should be numeric, integer type Year and copies take part in comparisons and totals, so storing them as text would block arithmetic.
4 Four: 2018, 2016, 2020 and 2021 Any year above 2015 qualifies, while 2015 itself does not.
5 Two: B001 and B003 One author can hold several books, so a filter need not return a single record.
6 B005 Physics Basics, year 2021 In descending order the largest year is listed first.
7 One record, namely B003 AND requires both conditions at once, so only one record survives.
8 Four records, since two books are by Lee OR accepts a record when either condition holds, so the result is wider than with AND.
9 Fifteen copies Adding the five Copies values, three plus two plus five plus four plus one.
10 The entry is rejected because the primary key repeats; a key must be unique and never blank Duplicate titles are normal, which is why the book number is the key.

04 What to do after marking

  • After marking, redo only the wrong items and write down which step went wrong (formula, unit, or misread number).
  • Repeat the same item two days later; move to the next paper only when both attempts are correct.
  • Parents only need the answer and note columns; there is no need to explain every item.

To keep practising queries and filters for this chapter, work through the other three papers, moving from foundation up to challenge.Tutor Registration →

Questions and answers are written originally by the TutorZone team and are not taken from any school, publisher or examination authority paper. Every value is checked by computer.

Join as a tutor or coach — academic, music, sports, arts, STEM. Free to register. See how it works →