Apr-10-2020, 07:39 AM
(Apr-10-2020, 06:37 AM)buran Wrote:(Apr-10-2020, 06:28 AM)PythonNPC Wrote: I thought about fixing the DB, but there's can be variable number of floats.In a relational database, you would have separate table with one-to-many relationship. Each value will be in separate row. And you will have a field that will link each of them to respective record in the main table.
Of course you can have everything in one table, again each value on separate row, but in this case you will repeat all other fields in the record, which is not advisable
In the current setup, as I already explained, you can split the string at commas and cast each element to int
Yes, I have given a thought to that approach as well.
According to you, what would be the better approach? Comma separated values or a separate table?
The end goal is stability and less load on the Raspberry Pi because the Raspberry Pi will be running on a battery and want it to last long by reducing load on the processor.