Answer the question
In order to leave comments, you need to log in
How to organize daily temperatures database in mysql?
Task.
1. I take the air temperature in different cities through the API service. And you need to write them to the database. This must be done every hour.
2. Data must be for one year, everything older must be deleted.
The question is how to schematically build a database. The first thing that came to my mind was to make a separate page with cities. Then make a linked table with temperatures (temperature field, time, city id), link through the city id field.
The question is that the table with temperatures will be just huge, because data will be written every hour. How it is correct to build and optimize for fast sampling and issuance?
Maybe someone has a similar experience and can share?
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question