Hi.
I am to set up a database for measurement-data.
The data in question ist pretty straight forward: date, time and
location of the measurement as well as several parameters measured.
The problem is, that in the forseeable future the parameters are going
to change. Some will be added, some will no longer be measured.
As I do not have any experience with databases, I do not know the
implications of this for the DB.
Right now I have two ideas:
1. Add a column each time a parameter is added or changed, set the
value of the parameters not used in one specific measurement NULL. The
drawback of this solution I would imagine is a table that would grow
over time and contain a lot of rubbish (NULL-values)
2. Create one table with the parameters that will be recorded always
(date, time, location) and another table with the parameters that are
measured. Each time the parameters are changed, a new table is
created. The new table would contain the new parameters as columns and
new measurements would be entered there, leaving the old tables
unchanged. Of course I would need some kind of unique id so I can
connect each entry in the space/time table with a corresponding
measurement. Two problems with that idea: 1.Over time the number of
tables would steadily grow. 2. I do not know exactly how to connect
the row in the "space/time" table with the corresponding measurements.
Maybe I'm way off with both ideas...?
Any suggestions would be welcome!
Thanks!
Alex
I am to set up a database for measurement-data.
The data in question ist pretty straight forward: date, time and
location of the measurement as well as several parameters measured.
The problem is, that in the forseeable future the parameters are going
to change. Some will be added, some will no longer be measured.
As I do not have any experience with databases, I do not know the
implications of this for the DB.
Right now I have two ideas:
1. Add a column each time a parameter is added or changed, set the
value of the parameters not used in one specific measurement NULL. The
drawback of this solution I would imagine is a table that would grow
over time and contain a lot of rubbish (NULL-values)
2. Create one table with the parameters that will be recorded always
(date, time, location) and another table with the parameters that are
measured. Each time the parameters are changed, a new table is
created. The new table would contain the new parameters as columns and
new measurements would be entered there, leaving the old tables
unchanged. Of course I would need some kind of unique id so I can
connect each entry in the space/time table with a corresponding
measurement. Two problems with that idea: 1.Over time the number of
tables would steadily grow. 2. I do not know exactly how to connect
the row in the "space/time" table with the corresponding measurements.
Maybe I'm way off with both ideas...?
Any suggestions would be welcome!
Thanks!
Alex
Comment