Databases: queries, calculations and reports Cambridge IGCSE Information & Communication Technology revision
Not started
Learn it
In plain words
Putting data into a database is only worth doing if you can get answers out. A query asks the question. A report presents the answer neatly enough to print.
8 things to know
- A query selects the records that match one or more criteria.
- Operators used in criteria: = equal to, <> not equal to, > greater than, < less than, >= greater than or equal to, <= less than or equal to.
- AND means both criteria must be true. OR means at least one must be true. NOT excludes records that match.
- LIKE is used with wildcards. An asterisk stands for any number of characters: LIKE "S*" finds everything beginning with S. A question mark stands for a single character.
- Records can be sorted in ascending or descending order, on one field or on several.
- A calculated field works out a new value for each record, such as Price multiplied by Quantity. Functions calculated when a report is run include sum, average, maximum, minimum and count.
- A report presents data for printing. The report header appears once at the start and the report footer once at the end. The page header and page footer appear on every page.
- In a report, all data and labels must be visible in full. Numbers are aligned to the right, with currency symbols and decimal places set.
Worked example
A table of cars has the fields Make, Colour and Price. Write the criteria to find all red cars costing less than 5000.
- Both conditions must be true, so AND is needed.
- Colour = "Red" AND Price < 5000.
- Text values go in quotation marks. Numbers do not.
Tips and tricks
- AND narrows a search: fewer records. OR widens it: more records.
- A total for the whole report belongs in the report footer. Column headings belong in the page header, so that they appear on every page.
It lands in your notebook with its questions as flashcards.
Databases: queries, calculations and reports: 6 questions and answers
These are the quiz’s questions. Do the quiz first, then come back here for the ones that got you.
Which operator means "not equal to"?
For example, Colour <> "Blue".
Which records does Age > 12 AND Age < 16 select?
Both conditions must be true, and neither limit is included.
What does the wildcard * stand for?
A question mark stands for exactly one character.
Where does a page header appear in a report?
It usually holds the column headings.
What is a calculated field?
For example, Price multiplied by Quantity.
Using OR in place of AND between two criteria will usually:
A record needs to match only one of the criteria.
Quiz
6 questions
Tap an answer and you’ll see straight away whether it’s right, and why.
Worksheet
3 questions, 6 marks. Write your answers on paper, then check them.
Databases: queries, calculations and reports
Cambridge IGCSE Information & Communication Technology 0417 · 6 marks · papermunch.org
Name ______________________________ Date ______________
Write search criteria to find all records where the Town is "Lima" or the Town is "Quito".[2]
Show answerHide answer
Town = "Lima" OR Town = "Quito"
State where in a report you would place the report title and a grand total.[2]
Show answerHide answer
The title in the report header. The grand total in the report footer.
Explain what LIKE "B*" would find in a Surname field.[2]
Show answerHide answer
Every surname that begins with the letter B. The asterisk stands for any number of characters after it.
Answers: Databases: queries, calculations and reports
- 1. Town = "Lima" OR Town = "Quito"
- 2. The title in the report header. The grand total in the report footer.
- 3. Every surname that begins with the letter B. The asterisk stands for any number of characters after it.



