Databases | Cambridge IGCSE Computer Science (0478)
Guide overview All 10 topics Sample questions Papers and weighting Look inside Questions and answers
Databases
- 42 questions
- 2 subtopics
- Paper 2
Databases is examined in Paper 2 (Algorithms, Programming and Logic).
It covers database tables, data types and primary keys, and structured query language.
Sample questions from Databases
Answer each one closed book first, then open the answer.
-
Database tables, data types and primary keys
What is a database?
Show the answer
A database is a structured collection of data, organised so that it can be searched, sorted and updated easily. -
Database tables, data types and primary keys
Why is validation set up on database fields?
Show the answer
Validation rules check data as it is entered into a field. A range check on an age field is one example. Unreasonable data is rejected before it is stored in the table. -
Database tables, data types and primary keys
Which database data type suits the number of items in stock?
Show the answer
An integer data type suits a stock level, because it is always a whole number. -
Database tables, data types and primary keys
Why is a surname not a suitable primary key?
Show the answer
Two people can share the same surname. A primary key must hold a unique value for every record. A surname therefore cannot identify each record. -
Structured query language
What is structured query language?
Show the answer
Structured query language (SQL) is a language used to search a database and return the records that meet given criteria. -
Structured query language
Write an SQL query to show the Name and Age of every student older than 15, in alphabetical order of name.
Show the answer
The query is SELECT Name, Age FROM Students WHERE Age > 15 ORDER BY Name ASC, ending with a semicolon. -
Structured query language
Write an SQL query to count how many products have a stock level of 0.
Show the answer
The query is SELECT COUNT(ProductID) FROM Products WHERE Stock = 0, ending with a semicolon. -
Structured query language
Write an SQL query to show the Name and Owner of every pet in the table Pets in descending order of age.
Show the answer
The query is SELECT Name, Owner FROM Pets ORDER BY Age DESC, ending with a semicolon.
The 2 subtopics
One subtopic is one session. Work down the list.
| Subtopic | What it covers | Questions |
|---|---|---|
| Database tables, data types and primary keys | Fields and records, choosing data types and validation for a single-table database, and choosing a primary key. | 18 |
| Structured query language | SELECT, FROM, WHERE, ORDER BY, SUM, COUNT, AND and OR, and working out the output of a query from a table. | 24 |
How the guide is worked
Answering a question from memory stores it far better than reading the answer again. The guide runs that as a fixed procedure on one subtopic at a time, about twenty minutes a session.
-
Step 1 · Closed book
Cover the answers. Work through one subtopic and write down what you can. Leave blanks where you have nothing.
-
Step 2 · Open book
Go back to the top. Read each printed answer and write it out in full, including the ones you had right.
-
Step 3 · Closed book again
Same questions, same order, from memory. The gap between pass one and pass three is the session result.
Read the full method, the return schedule and the research behind it.
Around this topic
Cambridge IGCSE Computer Science Active Recall Guide
Databases and every other topic, with the answers printed after each section.