GoalUse the words record, field and primary key, and explain why data in a field needs one format.
New words
record · all the data about one thing or person: one row of a tablefield · one kind of data about every record: one column of a tableprimary key · a field whose value is different for every record, so each record can be found exactlyformat · the way data is written, such as DD/MM/YYYY for a date
Explanation
A database stores data in a table. Each row is a record, which holds all the data about one member. Each column is a field, which holds one kind of data about every record, such as the date joined. A primary key is a field where every record has a different value, such as a member number. Names are not good keys, because two members can have the same name. To search correctly, all the data in a field must use the same format. Suppose one member joined on 5 March 2024. If some records say 05/03/2024, others say 5 March 2024 and others 05.03.24, a search for one form misses the rest. A date format such as DD/MM/YYYY means day, month, then the year with four digits.
Member ID
Member
Joined
M01
Lena Park
05/03/2024
M02
Omar Said
05/03/2024
M03
Ravi Das
05/03/2024
Worked examples
Member
Joined
Lena Park
05/03/2024
Omar Said
5 March 2024
Ravi Das
05.03.24
Mia Cruz
05/03/2024
Tom Reid
March 5th 2024
A garden club’s member table. Every member joined on the same day, but the dates are written in different ways. Each row is a record, and the Joined column is a field.
Search for
Records found
05/03/2024
Lena Park, Mia Cruz
5 March 2024
Omar Said
05.03.24
Ravi Das
March 5th 2024
Tom Reid
A search for 05/03/2024. Only two records match, even though all five members joined that day. The other dates mean the same day, but the computer compares the characters, not the meaning.
Member
Joined
Lena Park
05/03/2024
Omar Said
05/03/2024
Ravi Das
05/03/2024
Mia Cruz
05/03/2024
Tom Reid
05/03/2024
With one format for the whole field, DD/MM/YYYY, the same search finds all five members. Another problem remains: 03/05/2024 could mean 3 May or 5 March, so everyone must know which format is used.
Class activity
Date detectives (no computer). Write ten join dates for an imaginary club on small cards, using four different styles, such as 12/04/2025, 12 April 2025, 12.04.25 and April 12th 2025. Mix the cards. Your partner sorts them into piles that mean the same date. Then rewrite every card in DD/MM/YYYY. Now “search” the original cards for the exact text 12/04/2025 and count how many you find, and then search the rewritten cards. Explain what the numbers show. If you have a computer or tablet, ask an adult to help you type your cards into a table.
Practice
1
In the table, name the records, the fields and say which field would make a good primary key.
Member ID
Member
Joined
M01
Lena Park
05/03/2024
M02
Sam Lee
09/04/2024
M03
Sam Lee
14/05/2024
The three rows are records. The columns Member ID, Member and Joined are fields. Member ID is the best primary key, because each member has a different ID. Names could be repeated.
2
Write these dates in the format DD/MM/YYYY: 3 June 2025; 14.08.25; December 2nd 2024.
03/06/2025; 14/08/2025; 02/12/2024.
3
A teacher searches the table for 12/10/2025 and finds only 2 of 4 pupils who joined that day. Explain why.
Pupil
Joined
Ana
12/10/2025
Ben
12 October 2025
Chen
12/10/2025
Dina
12.10.25
The other two dates are written in a different format, such as 12 October 2025. They mean the same day, but the search compares characters, so it misses them.
4
Why is a member’s name not a good primary key?
Two members can have the same name, so the name might not be different for every record. A member number or ID is different for every record.