Storing Cost Estimate Details
Posted on 2013-09-30
I am creating a data structure to capture cost estimate data from an existing spreadsheet/template whose functionality we're going to replace via a web form. I have created a table structure and it will work, but I'm not happy with it. I'm sure there has to be a better way. Perhaps my coffee hasn't kicked in yet.
Most of the records are simply a cost code and a total:
However, some of the records are multiple fields that calculate a total for the user, and we'll need to store each of those individual data points rather than the total.
400 $300/day * 4 days
500 $150/day * 12 days + $500
600 450 gallons * $4/gallon
Here's what I came up with. Again, it is functional, but i'm not happy with it:
UOM_ID INT IDENTITY PK
Cost_Estimate_ID INT IDENTITY PK
Cost_Code_ID INT PK
Cost_Estimate_ID INT PK, FK
Cost_Code_ID INT PK, FK
First_UOM INT FK
First_Operator CHAR(1) (i.e. add, subtract, multiply, divide)
Second_UOM INT FK
Third_UOM INT FK
Thanks in advance for any ideas/help.