Sunday, February 19, 2012

I need help in design?

I am trying to create a database that is used to create/store estimates for a manufacturing company. There are many things to consider in this estimate but I will isolate this question to the takeoff itself:

There are several categories in which costs are estimated and they are as follows : Product(s), Site Work, Transportation (Shipping), Field Materials, etc...

Should each of the above have their own "Takeoff" table, or would using one table and a gategory table be a better way to go?

Mike BAre these all products? If so, I would use one table with a category column, probably need more info to give better advice.|||Originally posted by rhigdon
Are these all products? If so, I would use one table with a category column, probably need more info to give better advice.

No they are not all products but, the take off list has the following items

Item | Description | Quantity | Cost | Sub-Total | %adj. | &adj. | Total

So, if I create identity columns on the source tables with the use of categories to create a surrogate key...?

tbProduct
Entry (FK) | ProductID (PK) | Account | etc...
----------------
1 | DT101A | 2301 | ....

tbTransportation
Entry (PK)| Company | Rate
----------
1 | 1 | 450

tbCategories
Category | Description
--------
1 | Product
2 | Transportation

tbTakeoff
Estimate (PK) | Entry (fk) | Category (fk) | Quantity | Cost | ......
------------------------
1000 | 1 | 1 | 1250 | 11.25 |.....
1000 | 1 | 2 | 2 | 450 |...

What do ya think?

Mike B

No comments:

Post a Comment