For our application, we will be creating two tables, one each for our temperature and humidity readings. The structure will be similar for both of them:
- The createdAt column to store the date and time of creation
- The value column to store the actual value read by the sensor
When creating the table, it's useful to know SQLites datatypes. This will not be a hard task since there are only five:
- TEXT
- NUMERIC
- INTEGER
- REAL
- BLOB
From this, we decide the types of these:
- createdAt as TEXT (ISO formatted datetime)
- value as REAL...