Hi,
I'm working on an application to track all of our sales quotes and I'm trying to figure out how I want to handle a certain table in the database.
Basically, here's the scenario: Whenever someone in sales needs to quote a price to a customer, they'll use this application to create the quote. We have a list of 87 materials (another table in the database) with the standard price for each material. When a quote is generated, you have the option to change any of the material prices for that quote. So, for every quote generated, I will be storing a list of all 87 materials and prices for that quote.
So, here's my question: Would it be better to create a table with columns for all 87 prices so that I have 1 record with all of the quote information, or should I create a smaller table to store each individual price for the quote and have 87 price records for that quote?
I've been wrestling with this for a day or so, and here are some of the pro's and con's I've come up with. To start with, one record with 87 columns means that every time we add a new product/material I'll have to add a new column to the table. Yuck! But, storing each individual price means that for every 1 quote created I'll have to do 87 inserts into the smaller table...kinda nasty trying to do the inserts and the table would grow like crazy, but it would simplify the whole "add new product/material" situation.
What are your thoughts on this situation?
Thanks!
Hope This Helps!
Ecobb
"My work is a game, a very serious game." - M.C. Escher
I'm working on an application to track all of our sales quotes and I'm trying to figure out how I want to handle a certain table in the database.
Basically, here's the scenario: Whenever someone in sales needs to quote a price to a customer, they'll use this application to create the quote. We have a list of 87 materials (another table in the database) with the standard price for each material. When a quote is generated, you have the option to change any of the material prices for that quote. So, for every quote generated, I will be storing a list of all 87 materials and prices for that quote.
So, here's my question: Would it be better to create a table with columns for all 87 prices so that I have 1 record with all of the quote information, or should I create a smaller table to store each individual price for the quote and have 87 price records for that quote?
I've been wrestling with this for a day or so, and here are some of the pro's and con's I've come up with. To start with, one record with 87 columns means that every time we add a new product/material I'll have to add a new column to the table. Yuck! But, storing each individual price means that for every 1 quote created I'll have to do 87 inserts into the smaller table...kinda nasty trying to do the inserts and the table would grow like crazy, but it would simplify the whole "add new product/material" situation.
What are your thoughts on this situation?
Thanks!
Hope This Helps!
Ecobb
"My work is a game, a very serious game." - M.C. Escher