For my application I need to keep the prefered unit of measurement of a user.
The possible units currently are:
- Liter (the unit the values in the rest of my database are stored in)
- Kilogram (varries with the density of the products)
- US Liquid Gallon (3.785411784 litres)
- US Liquid Quart (1/4th of above)
- UK Liquid Gallon (4.54609 litres)
- UK Liquid Quart (1/4th of above)
I need a way to save these units in an mssql 2005 (and up) database so that there can be no ambiguity and preferably without all the applications keeping an enumeration and without having to create an extra table.
Using an ISO abbreviation would work for the first two, but AFAIK there is none for the last four.
Using the string representation is also asking for trouble..
So besides of finally getting through to the project manager about not using retarded units of measurement, what other suggestions do you have?