I'm very new to databases and have no knowledge of how to design them. I've been using ASP.net Core to develop my website/API
So what I want to achieve is that remote devices log their temperature value every 10 minutes. I want to do this with potentially 100.000 devices, for multiple years.
Later I want to show the data in a graph on the website. So I'd have to query the database to show me for example the values of the last year. It basically only has to return every nth entry in the database to generate a nice looking graph, instead of every entry. I also want to select the last logged temperature of a device.
The question is: What would be the better solution to do it:
- One table for all the devices
- A table per device
I'd say I have to go for #2, since 6*24*365*100.000 = 5.2 *10^9 entries after one year. Which means that it will probably take a lot of computer power to return the right query.
But again, I'm new to databases. Why would I go for option #1?