For my application, I need to save the user's preferred unit of measure.
The following units are currently possible:
- Liter (unit is stored in the rest of my database)
- Kilogram (varieties with product density)
- US Liquid Gallon (3,785,411,784 liters)
- US Liquid Quarter (1/4 of the above)
- UK Liquid Gallon (4.54609 liters)
- UK Liquid Quart (1/4 of the above)
I need a way to store these units in the mssql 2005 database (and above) so that there is no ambiguity and, preferably, without all the applications that support enumeration, and without the need to create an additional table.
Using the ISO abbreviation will work for the first two, but AFAIK for the last four not.
Using a string representation also poses problems.
So, besides having finally done work with the project manager about using slow units, what other suggestions do you have?
source
share