Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 134229
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T06:34:33+00:00 2026-05-11T06:34:33+00:00

A niave beginners question about database design. I have an app managing some logger

  • 0

A niave beginners question about database design.
I have an app managing some logger data eg. 1000s of sequential measurements of time, voltage, current, temperature. In addition each sequence run has meta data (date, location, etc).
So I need a table for each set of measurements and a master table listing these tables and the meta data for each.

A couple of questions:
This doesn’t really use the fact that all the data tables are the same format – there is no ‘array of tables’ concept, does this mean anything?

Would I just give each data table a unique name, put that in the main table as a column, then simply substitute it into the SQL select statement – or is there a better way?

edit: The reason for many tables, one per run, is that there might be 10-100 runs each with many 1000s of measurements. If I want to display/query/delete just one run it seemed more natural to have each in it’s own table.
It looks like this is a programmer mindset (everything should be collections of separate objects) the database approach seems to prefer – store everything together and use index/cross-references.

  • 1 1 Answer
  • 2 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-11T06:34:33+00:00Added an answer on May 11, 2026 at 6:34 am

    BTW, I want to address the question of whether it’s a pain to manage all the data in one table, versus having multiple tables.

    Starting assumption: you’re going to want to at least have a meta-data table to store the experiment meta-data, and one-or-more table(s) to store the measurements.

    If you take the ‘I want a table for each measurement set’ approach, you’ll need to know the name of the table. So your metadata table will look something like:

    Metadata ---------- experimentName experimentLocation experimentDateTime ... measurementTableName 

    And a table for each experiment, each looking the same:

    Measurement0001    Measurement0002    Measurement0003    Measurementt0004  --------------     --------------     --------------     --------------  measurementNum     measurementNum     measurementNum     measurementNum  voltage            voltage            voltage            voltage         amps               amps               amps               amps            

    Then in your program, you first need to fetch the metadata:

    select * from Metadata where experimentName='Johnson Controls 1' 

    which will, amongst other things, return measurementTableName for the experiment of interest (say Measurement0002). Then, your next query is:

    select * from Measurement0002 order by measurementNum 

    Now, let’s take the ‘store all the data in the measurement table’ approach. Your metadata table will look like:

    Metadata ---------- experimentName experimentLocation experimentDateTime ... measurementSetID 

    And a table for all experiments.

    Measurement -------------- measurementSetID measurementNum voltage             amps                

    Then, just as before, you first need to fetch the metadata:

    select * from Metadata where experimentName='Johnson Controls 1' 

    which will, amongst other things, give you the measurementSetID which you will use to get only the the measurements from the desired set (let’s say id=2). Then, your next query is:

    select * from Measurement where measurementSetID=2 order by measurementNum 

    So let’s compare the two approaches… The metadata queries are essentially identical. The only difference is that in the first case, you are retrieving the measurementTableName for the desired experiment table; while in the second case, you are retrieving the measurementSetId for the desired entries in the measurements table.

    The measurement-fetching queries are essentially the same, too:

    select * from Measurement0002                      order by measurementNum select * from Measurement where measurementSetID=2 order by measurementNum 

    The only variable is either the table name, or the measurementSetID:

    select * from <tablename>                                order by measurementNum select * from Measurement where measurementSetID=<setID> order by measurementNum 

    The query result is almost the same, the second approach will just give you an extra column in your data (the measurementSetID) which you can ignore, because all returned rows will have the same set ID.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 142k
  • Answers 142k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer As far as I know, you can't set local variables… May 12, 2026 at 8:12 am
  • Editorial Team
    Editorial Team added an answer I use a single form object with this and just… May 12, 2026 at 8:12 am
  • Editorial Team
    Editorial Team added an answer It is neither. It runs on the same UI thread… May 12, 2026 at 8:12 am

Related Questions

I am learning C and writing a simple program that will take 2 string
I realize this perhaps a naive question but still I cant figure out how
Perhaps this is a naive question. In my understanding, ASP.NET MVC cannot work with
this may be a naive question, but, as asked in the object, what is

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.