user height and weight in sql

Posted by Samuel on Stack Overflow See other posts from Stack Overflow or by Samuel
Published on 2010-03-24T04:57:39Z Indexed on 2010/03/24 5:03 UTC
Read the original article Hit count: 199

Filed under:
|
|

We are planning to capture a user's height and weight and am looking for ideas on representing them in sql. I have the following questions in mind

  1. weight can be expressed in kilograms and grams and height in meters and centimeters, so should I capture them as a BigDecimal with an appropriate precision and scale or capture them as vanilla strings and do the manipulation in the user interface. Note: I am planning to capture the kilograms and grams separately in the user interface.

  2. should the metric of measurement be part of the sql (i.e. the end user might want to view this information in pounds, inches according to his preference)

OR

Should I just support kilograms / meters in the database and do the conversion while showing this in the user interface

© Stack Overflow or respective owner

Related posts about sql

Related posts about database-design