I‘m looking for help with the database scheme for weather sensor data.
One of the major issues I have here is, that there are a bunch of different sensor types I want to support, which all support a different range of data types (99% of them do temperature, some of them also measure wind speed and/or humidity and/or illumination, etc.).
The best approach I came up with, is to create a measurement “sensor_data”, with only one field called “value” (containing the measured value) and two tags, which are sensor_id (id of sensor that tracked “value”) and type (identification for the type of the value, like “temperature”, “humidity”, …).
That structure would solve all my problems, but what about performance? Will this scale properly, or is it better to go with a measurement for each of the datapoint type? Or would it be even better to add fields for all the different data point types (and leave those fields empty that are not supported by a sensor)?
What do you think about it? Or do you have another idea?
Thanks for your help!