I have an issue with converting/calculating based off of different units of measurement.
I'm setting up a database that, among other things, tracks supply levels and usage. The problem? I need to be able to convert from the purchased UM to the usage UM.
Normally this wouldn't be much of a problem but you see, I have some really (really) weird conversions that need to be handled. For example: Weight (pounds) to surface area (square feet).
What I've tried is to set up a UMConversions Table as follows:
UMConversions
Code:
UMID|UMDesc|UMModLen|UMModArea|UMModVol|UMModWeight|UMModQty
1|FT|1|0|0|0|0
2|LB|0|100|0|1|0
3|GAL|0|0|1|0|0
4|BOX|0|0|0|0|1
5|SQ FT|0|1|0|0|0
6|IN|0.0833333|0|0|0|0
7|SQ IN|0|0.0069444|0|0|0
8|ROLL|1000|0|0|0|0
So, using this Table, you can see that 1 pound (LB) is equal to 1 Weight Unit (it's our base UM for Weight) and 100 Area Units. And, since SQ FT is our Base UM for Area, 1 LB = 100 SQ FT.
I guess my question is: Is this a good way to set up a conversion system like this or do any of you have a better way?