MySQL Forums
Forum List  »  Newbie

Different data types
Posted by: Sidney Kwakkel
Date: August 17, 2010 11:58AM

I am in the process of creating a database that holds my company's measurement data. There are three entities that I wish to relate

Project
Location
Measurement

Every Project has many Locations, and every Location has many Measurements

My problem is that different measurements can be qualitative or quatitiative.

For instance, "the rock is blue" and "the rock weighs 30 lbs".

The schema that I have right now:
Project
- Project_id
- Project_name

Location
- location_id
- location_name

Measurement_type
- measurement_type_id
- measurement_type_name

Measurement
- location_id
- measurement_type_id
- measurement_datetime (datetime)
- measurement_value (varchar-255)

There are linking tables for location_to_project and measurement_to_location

how do you save qualitative and quantitative measures in the same table?

how does someone create a query that pulls rock weights from 15 to 30 lbs if the data is stored as varchar?

can someone suggest a change to my schema?

Options: ReplyQuote


Subject
Written By
Posted
Different data types
August 17, 2010 11:58AM
August 17, 2010 01:19PM
August 17, 2010 01:29PM
August 17, 2010 01:53PM
August 17, 2010 08:43PM


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.