using mariadb/mysql as our main database in a somewhat monolithical application.
We are storing sensor data in a single table (database within a database you could say). Since we want to abstract away device data to equalize schema across all protocols.
To also provide historical data, we have a report table. But since the name of the fields is flexible, depending on the device and its configuration, we found no other way than naming the fields 1 through 30. With a foreign key to Device.
How would you go about this? Right now our application logic needs to take care of joining device parameter data to the history table. So each column has its own relation to a device parameter. Should we now just double the amount of fields and add 1_DeviceParameterID? How would you go about this?
Rdmbs are not great for historical data and for data that has a flexible schema. I would suggest you to see other time series oriented dbms like influxdb.
how do you bridge the foreign keys on a foreign database? :O
Обсуждают сегодня