Try it on paper first. A hint, the key idea and the worked solution are here when you need them.
A sports day table has these fields. Suggest a suitable data type for each one.
RunnerID, such as R017SurnameHouse, one letter: R, G, B or YAge, such as Time100m, such as secondsFinishedRace, yes or noRaceStart, such as 10:30How many of the seven fields are text?
The six basic data types are text (alphanumeric), character, Boolean, integer, real and date/time. Choose a type from what the values look like and what you will do with them. A primary key is a field whose value is unique in every record and never empty, so it identifies exactly one record.
Have you tried it?
Work it out on paper first. It is fine to get stuck or make a mistake: that is how we learn. When you are ready, go through the solution one step at a time, and check each step against your own.
Step 1. Go through the fields.
RunnerID: text, because it mixes a letter and digits.Surname: text.House: character, because it is always exactly one letter.Age: integer, a whole number.Time100m: real, because it has a decimal part (seconds).FinishedRace: Boolean, TRUE or FALSE.RaceStart: date/time.Step 2. Count the text fields. RunnerID and Surname: fields.
Watch out. RunnerID contains digits, but it is not a number: nobody adds two IDs together.
Answer: text fields, with the types above.
Log in to join the discussion.
Loading…