Thanks everyone, you have given me some ideas.  Jonathan

Steve Edberg <[EMAIL PROTECTED]> said:

> Well, as far as the inches and fractions thereof go, you could always 
> normalize your data to the smallest measurement - for example: if the 
> smallest increment is 1/32 of an inch, store all measurements in terms of 
> 32nds. So, 1" => 32, 1-5/32" => 37, and so on. Then you could store the 
> values in an integer column. Or, use a NUMERIC column (stored as strings, 
> so there is no roundoff error as there is with floating-point numbers)  and 
> convert to metric: 1-5/32" = 29.36875mm exactly. Convert measurements 
> to/from english as needed for input or display. If you will be dealing with 
> metric measurements in the near future, that might be a more reasonable way 
> to go.
> 
> Lastly, if you covert to metric and want to use a floating point column, 
read
> 
>          http://www.mysql.com/doc/P/r/Problems_with_float.html
> 
> first.
> 
> If I were me, and the site wasn't dealing in many metric tools, I'd 
> probably use the first method.
> 
> 
> At 07:43 PM 12/12/01 , Jonathan Duncan wrote:
> >I am creating a database for a website that sells tools.  Unfortunately 
they
> >aren't measured in metric.  Most of the measurements look something like:
> >
> >1 1/16"
> >3/8"
> >3/16"
> >1 5/32"
> >45º
> >10º
> >2 7/16"
> >
> >These aren't pretty numbers to enter into a database.  The simple way would
> >be to enter them as CHAR's and forget about them, but then searching on 
that
> >could cause problems.
> >
> >Does anyone have any idea what would be the best way to enter these number
> >and as what type?
> >
> >Thanks in advance,
> >Jonathan Duncan
> 
> 
> +------------------------------------------------------------------------+
> | Steve Edberg                                      [EMAIL PROTECTED] |
> | Database/Programming/SysAdmin                            (530)754-9127 |
> | University of California, Davis             http://pgfsun.ucdavis.edu/ |
> +---------------------- Gort, Klaatu barada nikto! ----------------------+
> 
> 



-- 
Jonathan Duncan
nacnud.com administrator
Nacnud, Inc.



________________________________________________________________

Brought to you by nacnudMail using TWIG.  http://www.nacnud.com


---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to