db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel Noll <dan...@nuix.com>
Subject Re: How to store values that might be given in different measurement units?
Date Wed, 15 Oct 2008 22:47:47 GMT
Donald McLean wrote:
> I don't think that separate columns for each type of unit would be a
> good choice. I agree with Roy that the most straightforward approach
> would be to just convert to a standard unit. Where I work this is what
> most people (including me) do.
> However, if you want an alternate approach, you could store the value
> in one column and the units in another.

And as long as you never need to sort on that column, then there is 
probably no drawback.  Though personally if I didn't need to sort, I 
would probably use a string.  JScience should cope with parsing and 
formatting well enough, and it guarantees no loss in precision.


Daniel Noll                            Forensic and eDiscovery Software
Senior Developer                              The world's most advanced
Nuix                                                email data analysis
http://nuix.com/                                and eDiscovery software

View raw message