Re: Database efficiency with generating tables.
Avoid the issue entirly. Don't persist derived/calculated values like the cost of raw materials. Instead, calculate them on the fly in a query as needed.
The last thing you want to do is multiply the cost of a part by the quantity estimated for the job and store that.
This design can never scale, and performance could well be terrible.