AdvertisementYour brand could be hereYour brand hereOn every Darslab page · students, parents and teachersinfo@darslab.comAsk for pricesPricesinfo@darslab.com
☰ Year plan · Computing

Search the table

Week 17 · Unit 7: Be a data boss · 3 lessons
1

Searching step by step

Computing 4: Unit 7, pp. 90–103
GoalUse a data table to answer a question by searching the right field.
New words
search · to look through data to find the answer to a questionmatch · a data item that is the same as the one you are looking formanual search · looking through the data yourself, by eyedigital search · a computer finds the matches for you
Explanation

Information from a database often answers a question. To answer it you search the table. First read the question carefully. Then decide which field to look in. Look down that column for data items that match. Count the matches or read the matching records. Finally check your answer by reading the records again. For a small table you can search by eye. For a big digital database, a computer does the search in a moment. A search may find many matches, one match or none at all. “No matches” is a correct answer too.

NameHouseEventPlaceMedal
RaviRedSprint1Yes
AishaBlueLong jump3Yes
KenjiGreenSprint5No
NodiraRedRelay2Yes
LeoBlueSprint4No
LolaGreenLong jump1Yes
Worked examples
QuestionField to look inAnswer
How many children ran in the Sprint?Event3 (Ravi, Kenji, Leo)
Which children are in the Red house?HouseRavi and Nodira
What place did Nodira come?Name, then Place2
Each question tells us which field to look in and what to do with the matches.
StepWhat you do
1Read the question: we want names, and the rule is Blue house.
2Choose the field to search: House.
3Look down the House column. Aisha and Leo are Blue.
4Read the Name of those records: Aisha and Leo.
5Check: no other record says Blue. The answer is Aisha and Leo.
Here are the steps for the question “Which children are in the Blue house?”
A search can find no matches. The question “Which children ran the Hurdles?” has no match in the Event field. The answer is: no one. That is correct, not a mistake.
Class activity

Search race (with friends): write 8 records on small cards, such as eight pets, toys or sports players, with three facts on each card. Spread the cards on a table. One person asks a question, for example “Which toys are red?”. The other person must find all the matching cards and say how many there are. Time yourselves. Then put the cards in order by one field and ask the same question again. Was the second search quicker?

Practice
1
Use the sports-day table. How many children came 1st? Which field did you search?
2
Use the sports-day table again. Which field do you look at to find out who won a medal? Which children won one?
3
Which things in the lost-property box were found in the hall? Which field did you search and which field did you read?
ItemColourFound inDay found
scarfredhallMon
water bottlebluegymTue
gloveredyardTue
hatgreenhallThu
lunch boxblueclass 4BFri
4
Which buses go to the market? Give their times. Which field did you search?
RouteDestinationLeavesStop
4Airport08:102
12Market08:251
4Airport09:102
7Stadium09:403
12Market10:251