Domanda

In a software I use records of measurement data. Each record contains basic information like a name, some parameters and the actual measurement data in the form of three arrays of double values that may vary in length from record to record. I currently use a binary format to save these records.
However I am not entirely happy with this approach, since it makes it hard to maintain (there may be changes or additional information in new versions and so on).

So I was thinking of moving the data into a database like access. This would have advantages for everyone. I can add information as I want, the user can use the database for other purposes if they please, etc.

However I am a complete novice in regards to databases and I wonder how I would structure a database to represent this content, especially the variable arrays.
I thought about encoding the double values into a string (like ; separated base64 strings) but this seems like a dirty hack that's not very user friendly.

So my questions are:

  • Is a database like Access suitable for my type of application.
  • There are no "array"-fields in an Access database, right?
  • How is storing a variable amount of data in a database entry usually handled?
  • Can I link one Access-Table to an entry in another table? So I would create a Data-table with entries for each datapoint and link this to a specific record in my main table?

I hope I could make myself clear somehow, but it's hard to wrap my head around the concepts. If you need more information, please ask. Thank you.

È stato utile?

Soluzione

An array in access (or any other relational database) is simply another table.

Table 1

    ArrayID      AutoNumber

Table 2

    ArrayItemID  AutoNumber
    ArrayID      Number (Foreign Key, in one-to-many relationship with ArrayID in Table1)
    Value        Number
Autorizzato sotto: CC-BY-SA insieme a attribuzione
scroll top