My approach for this particular situation would always be to store the
value in a known unit. If varying presentation units were required for
the interface, then I would convert transparently. Thus, I would
probably store weight in either g or kg and convert between imperial if
required.

 

Roy

 

________________________________

From: Stanley Styszynski [mailto:[EMAIL PROTECTED] 
Sent: 15 October 2008 11:59
To: [email protected]
Subject: How to store values that might be given in different
measurement units?

 

Hi All,

 

I would appreciate any thoughts on the following topic:

How to store values that might be given in different measurement units?

 

For example weight. It can be in pounds or kilograms.

 

Basically, I am writing an application in which user can enter some
values (weight, height and some medical measurements)

in different units and I want to store this in Derby database. I don't
know if it would be better to store these values in one unit 

and convert it if needed or to create separate columns for each possible
unit and retrieve them using special query? 

Maybe there is some other way of doing this?

 

Regards

 

Stan

 


===============================
CONFIDENTIAL & PRIVILEGED COMMUNICATION 

The information contained in this message is privileged, confidential, and 
protected from disclosure. 
This message is intended for the individual or entity addressed herein. If you 
are not the intended recipient,
please do not read, copy, use or disclose this communication to others. Also 
please notify the sender by 
replying to this message, and then delete it from your system. The sender 
totally disclaims, and will not 
accept, any responsibility or liability for the unauthorized use, or the 
consequences of any unauthorized use,
of this communication or message.

Reply via email to