DSE ICT | Relational Databases and SQL Practice Paper 1 (Basic Queries)
- 2026-11-04
DSE ICT | Relational Databases and SQL Practice Paper 1 (Basic Queries)
Starting from one twelve-row student table, count rows and columns, then work through LIKE prefixes, sorting and the NULL comparison trap.
Attempt first, mark afterwards Allow about thirty minutes; write down the expected row and column counts before typing any SQL.
01 Paper details (check answers afterwards)
| Item | Detail |
|---|---|
| Questions | 10 items |
| Suggested time | About 30 minutes |
| Difficulty mix | Foundation 4 · Intermediate 3 · Challenge 2 · Error redo 1 |
| Chapter | Chapter: DSE ICT | Relational Databases and SQL |
| Level | S5 (Secondary 5) ICT |
02 Questions (10 items)
- FoundationStudents has 12 rows and 5 columns. `SELECT name FROM Students WHERE form = 4;` returns 5 students. How many rows and columns come back?
- FoundationWhat two conditions must a primary key satisfy, and can a primary key column hold NULL?
- FoundationWhat is a foreign key for, and may its value repeat across rows?
- FoundationA Books table has 30 rows and 6 columns. How many data values does `SELECT * FROM Books;` return?
- IntermediateWith the same data (form 4: S01 72, S02 85, S03 64, S04 91, S05 58), which rows does `SELECT name FROM Students WHERE form = 4 AND score >= 85;` return?
- IntermediateStudent ids run from S01 to S12. How many rows does `WHERE id LIKE ‘S0%’;` return, and why is S10 excluded?
- IntermediateThe twelve students total 902 marks. What are the two results of `SELECT COUNT(*), AVG(score) FROM Students;`?
- ChallengeScores are 72, 85, 64, 91, 58, 77, 83, 69, 95, 88, 54 and 66. What are the three scores from `ORDER BY score DESC LIMIT 3;`, and what is the third highest?
- ChallengeHow many rows does `SELECT DISTINCT form FROM Students;` return for forms 4, 5 and 6, and how many without DISTINCT?
- Error redoError drill: a student writes `WHERE score = NULL;` to find students with no score. What is the correct form and why?
03 Answers and one-line notes
| # | Answer | One-line note |
|---|---|---|
| 1 | 5 rows and 1 column | WHERE filters rows (tuples); naming only name in SELECT keeps a single attribute, so the column count is one. |
| 2 | It must be unique and not null; NULL is not allowed | A primary key identifies each row, so a duplicate or a NULL would make row identity undecidable. |
| 3 | It references the primary key of another table to create a relationship; values may repeat, and may be NULL where allowed | A foreign key only enforces that the referenced row exists; repetition is normal, since many students can sit in one class. |
| 4 | 180 | Thirty rows times six columns gives 180 cells; SELECT * removes neither rows nor columns. |
| 5 | S02 (85) and S04 (91), two rows | AND requires both conditions, so only 85 and 91 pass the threshold. |
| 6 | Nine rows (S01 to S09); S10, S11 and S12 have 1 as the second character, so they do not match the prefix S0 | The percent sign stands for any string, but S0 is a literal prefix that must match character by character. |
| 7 | COUNT(*) = 12 and AVG = 75.17, since 902 divided by 12 is 75.166… | AVG skips NULLs, but there are none here, so the total is simply divided by the row count. |
| 8 | 95, 91 and 88; the third highest is 88 | DESC sorts largest first and LIMIT 3 keeps three rows; 88 sits only three marks above 85, so the ordering must be exact. |
| 9 | Three rows with DISTINCT, twelve rows without it, one per student | DISTINCT removes duplicate values; without it every row is emitted, duplicates included. |
| 10 | Write `WHERE score IS NULL;`; NULL is not a value, so equality always evaluates to unknown and returns nothing | NULL means unknown, so any equality test against it fails; IS NULL and IS NOT NULL are the only correct tests. |
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.
Need a tutor for this chapter? Register hereTutor 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.


