MySQL Forums
Forum List  »  MySQL Workbench

Re: Database design for scientific tests
Posted by: Martin Karm
Date: June 24, 2009 03:46PM

Thanks for catching the typo with the value field. I had it right in the ERD but coded it incorrectly.

I understand the idea of having the test_data_type field reference a list, and it does work for storing the data, but the "order" matters since this is tabular data that needs to be recreated or could have graphs as output. For instance:

Reference table:

id | name
__________________
1..|..pressure
2..|..saturation


Data I'm trying to store:

Pressure | Saturation
__________________
1..............|..99
2..............|..98
3..............|..60

How it looks stored (other PK and FK data would be included in this table also):

test_data_type | test_data_value
___________________________________
1........................|.....1
2........................|.....99
1........................|.....2
2........................|.....98
1........................|.....3
2........................|.....60



These can be stored as described, but there is importance in pairing 1 and 99, 2 and 98, etc because for graphing you need to know that the saturation is 99 when the pressure is 1. Even for just recreating the data as tables this would be important.

Any thoughts on how to "pair" these, other than just assuming the order is correct? Assuming anything sounds like a bad idea to me.


Things do get more complicated, but they also make much, much more sense.

Thank you once again!

Options: ReplyQuote


Subject
Views
Written By
Posted
Re: Database design for scientific tests
1763
June 24, 2009 03:46PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.