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 8221387
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T13:54:10+00:00 2026-06-07T13:54:10+00:00

I have finally stumbled across a problem that I can’t already find the answer

  • 0

I have finally stumbled across a problem that I can’t already find the answer to on SO…

I am working on a database that will store recorded sampled data recorded over time. Originally, the client had built a table that was very specific to the data that they were currently recording, however, they would are concerned that as they expand, the collected data may begin to vary, and more, or at least different, columns may be required.

Current model:

+------------------+     +------------------+
|    FACILITIES    |     |   DATA_RECORD    |  
+------------------+     +------------------+  
| ID               |     | ID               |
| NAME             |     | FACILITY_ID      |
| DESC             |     | TIMESTAMP        |
| etc.             |     | TEMP_WATER       |
+------------------+     | TEMP_AIR         |
                         | pH_WATER         |
                         | etc...           |
                         +------------------+

I think the database should be designed as follows:

+------------------+     +------------------+     +------------------+
|    FACILITIES    |     |   DATA_RECORD    |     |   COLUMNS        |  
+------------------+     +------------------+     +------------------+  
| ID               |     | ID               |     | ID               |
| NAME             |     | FACILITY_ID      |     | NAME             |
| DESC             |     | details etc..    |     | DESC             |
| etc.             |     +------------------+     | UNITS, etc...    |
+------------------+                              +------------------+

+------------------+ 
|    DATA_POINT    | 
+------------------+ 
| ID               | 
| DATA_RECORD_ID   | 
| COLUMN_ID        | 
| VALUE            | 
+------------------+ 

My questions are:

  1. Is this the best way to design the database, or is there a better way that I am not familiar with.
  2. How do I form the query statement to return each data record with each of its associated columns?
  3. Is there a generally accepted good data-type to use as DATA_POINT.VALUE? e.g. float, decimal…?

Thank you so much for your help.

Sincerely,

Nate K.

  • 1 1 Answer
  • 0 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. Editorial Team
    Editorial Team
    2026-06-07T13:54:12+00:00Added an answer on June 7, 2026 at 1:54 pm

    Looking at your requirements, I think you’d be leaning more towards the Entity-attribute-value type of design, which in general is tough to query (although it is fairly simple to set up) and not very scalable.

    You can search for EAV models on this site or on google to see discussions about this.

    http://www.simple-talk.com/content/print.aspx?article=843

    Entity Attribute Value Database vs. strict Relational Model Ecommerce

    http://tkyte.blogspot.com/2009/01/this-should-be-fun-to-watch.html

    For your case, can you post the different types of Facilities and datapoints that you’d need to collect? May be you can use types and subtypes to model this?

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

Sidebar

Related Questions

I have finally tracked down a bug that I've been working on for the
I have finally started messing around with creating some apps that work with RESTful
I have finally managed to get javan-whenever gem working on my site5 server, and
I have finally gotten my login application to function with my online database. I
I have a third party library which I finally have working within my MonoTouch
I have finally quit the idea of learning Zend and instead i find CakePHP
Well after much messing about I have finally got a query that gives sales
Have finally got a responsive site working (of a fashion). What I want to
I've come across this several times in the past and have finally decided to
So this is my first app and first database. I think I have finally

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.