Database for sparse and changing data

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Alexander Federlin

    #1

    Database for sparse and changing data

    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
  • sdfgsd

    #2
    Re: Database for sparse and changing data


    "Alexander Federlin" <TheXX@gmx.de > wrote in message
    news:a357ac.031 0140646.66ae320 5@posting.googl e.com...[color=blue]
    > 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.[/color]

    (Snip)

    Now's the time to explore the relational in relational db's :-)

    So split it up into two or three tables:

    table => measurement_goa l
    mmnt_id
    date
    type
    desc

    table => parameters
    pmtr_id
    mmnt_id
    date
    pmtr_type
    reading

    table => pmtr_type
    etc

    Here you have a meta-measurement table hooked-up or related to a parameters
    table via 'mmnt_id'. Also each parameter type can be supplied from the third
    table to the second table. HTH.


    Comment

    • sdfgsd

      #3
      Re: Database for sparse and changing data


      "Alexander Federlin" <TheXX@gmx.de > wrote in message
      news:a357ac.031 0140646.66ae320 5@posting.googl e.com...[color=blue]
      > 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.[/color]

      (Snip)

      Now's the time to explore the relational in relational db's :-)

      So split it up into two or three tables:

      table => measurement_goa l
      mmnt_id
      date
      type
      desc

      table => parameters
      pmtr_id
      mmnt_id
      date
      pmtr_type
      reading

      table => pmtr_type
      etc

      Here you have a meta-measurement table hooked-up or related to a parameters
      table via 'mmnt_id'. Also each parameter type can be supplied from the third
      table to the second table. HTH.


      Comment

      • Alexander Federlin

        #4
        Re: Database for sparse and changing data

        Thanks! That's just the thing I was looking for!
        [color=blue]
        >...HTH.[/color]
        You did! :-)

        Cheers!

        Alex

        Comment

        • Alexander Federlin

          #5
          Re: Database for sparse and changing data

          Thanks! That's just the thing I was looking for!
          [color=blue]
          >...HTH.[/color]
          You did! :-)

          Cheers!

          Alex

          Comment

          Working...