Skip to content
ExamSpine

Answer it

P1 a3 weather data types

3 marksYou mark it yourself against the marking points

A school weather station stores its readings in a table called Reading. Each reading has these attributes.

  • station_code: always exactly four capital letters, such as KLMA
  • temperature: degrees Celsius to one decimal place, such as -2.5
  • is_raining: whether rain was detected at that moment

(a) State a suitable SQL data type for temperature and one for is_raining. [2]

(b) Outline why CHAR(4) suits station_code better than VARCHAR(4). [1]

[3]