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

Fields and records

Week 16 · Unit 7: Be a data boss · 3 lessons
2

Plan a good table

Computing 4: Unit 7, pp. 90–103
GoalChoose good fields for a data table and keep the data in the same format.
New words
field name · a short, clear name at the top of a columnformat · the way in which data is written, such as day/month/year for datesconsistent · done the same way every time
Explanation

A good data table is planned before it is filled in. First ask: what questions do we want to answer? Then choose a field for each kind of fact. Give every field a short, clear name. Each field should hold only one fact. Do not put two facts in one cell, such as “Leo, 9”. All the data items in one field must be written in the same format. For dates, always use the same order, such as day/month/year. A consistent table is easy to sort and search. Every record has the same fields.

QuestionField needed
Which bike is free?Hired today
Which bike is the smallest?Size
What colour is bike 4?Colour
Worked examples
Poor table: BikeBetter table: SizeBetter table: ColourBetter table: Hired today
small, red, hiredsmallredYes
large, blue, freelargeblueNo
small, green, freesmallgreenNo
This bike-hire table puts two facts in one cell. It is hard to search for all the small bikes. The better table has one field for each fact.
Booked on
07/09/2021
14/02/2022
3 March 2022
25/12/2021
The dates in this field are not consistent. One of them is written in a different way, so a computer cannot sort the dates correctly. Use day/month/year for all of them.
CakePrice (coins)In stock
Lemon4Yes
Carrot6No
Fruit3Yes
Chocolate7Yes
Plan a table by writing the questions first. For a cake stall the questions are: Which cakes cost less than 5? Which cakes are sold out? So the table needs the fields Cake, Price and In stock.
Class activity

Table planner (with a friend): choose a topic such as the pets in your class, your family’s favourite meals or the plants in a garden. First write three questions that your table must answer. Then choose four fields that give the answers. Write the field names. Make up three records and check: can you answer each question with your table? If not, which field is missing? Swap tables with another pair and check that their data is consistent.

Practice
1
A field called “Name and age” holds items such as “Ana, 8”. Why is this a poor design and how can you fix it?
2
One date is written in a different format from the others. Which one?
Date joined
09/10/2021
20 November 2021
15/01/2022
02/06/2021
3
Which field answers the question “Which fruits are sold out?” Which records answer it?
FruitPrice (coins)Sold out
Mango9No
Apple2No
Kiwi5Yes
Plum3No
4
You want a table about the trees in a park. Write four good field names. Each field must hold only one fact.