Database Testing
Design and explain tests showing that SQL operations produce correct changes and outputs.
How to study Higher Computing Science
Move from requirements to structured designs, trace code and data precisely, and support every test or evaluation judgement with observable evidence.
Core concepts
Concept 1
A database test identifies the operation, starting data, expected result and observed result.
Exam cue: Choose test data that exposes the specific criterion or boundary.
Concept 2
SELECT tests verify fields, criteria, calculations, grouping and order against known records.
Exam cue: State the exact rows, values or ordering expected after the operation.
Concept 3
INSERT, UPDATE and DELETE tests confirm intended records change while unrelated records remain unchanged.
Exam cue: Include a non-matching record when proving that a modification is correctly restricted.
Risk pitfalls and guardrails
Saying run the query without defining expected output.
Guardrail: Check route, scope, data type, boundary, loop condition, identifier and expected output before committing to the response.
Testing only a matching record and not unintended changes.
Guardrail: Check route, scope, data type, boundary, loop condition, identifier and expected output before committing to the response.
Using production data without a controlled starting state.
Guardrail: Check route, scope, data type, boundary, loop condition, identifier and expected output before committing to the response.
Memory anchors
Database test case
Known starting data + operation + exact expected database or output state.
SELECT test
Verify selected fields, matching rows, calculations, grouping and ordering.
INSERT test
Confirm the new record and every required field value are stored correctly.
UPDATE test
Confirm intended values change and non-matching records stay unchanged.
DELETE test
Confirm only records satisfying the stated condition are removed.
Repeatable evidence
Use a known starting state so expected and actual outcomes can be compared reliably.
Checkpoint rule
Do the check-up only after you can summarize each concept in one sentence and identify one dangerous pitfall from memory.
Knowledge Check (after reading)
Short check-up to confirm understanding of this module.
Check-up Questions
A field allows ratings 1 to 5. Which test set covers both valid boundaries and values just outside?
What expected result should be recorded for inserting a duplicate primary key?
Answer all questions to submit.
Next step personalized recommendations
Continue learning
Move forward only after this module is stable.
What is Pass Harbor?
Completely free exam prep for 247 UK exams.
- Practice questions
- Flashcards
- Study guides
- Mock exams
- No registration
- No paywall
- Start instantly
“No more expensive exam prep. Quality study tools should be accessible to everyone.”
