I'm not sure I understand the reasoning why a quote# wouldn't be a primary
key? The quote# should be a unique value. There shouldn't be any duplicates
of this quote number repeating itself anywhere. If a customer makes reference
to a quote, it will be a specifc quote# that shouldn't pull up multiple
quotes, only one.
As for it being a foreign key, each quote may contain multiple packages of
varying configurations so shouldn't there be a separate table that handles
the package information with the quote# as a foreign key that ties it back to
the proper quote?
i.e.
Quote#1
- Package#1 - "X" model engine with "X" model radiator w/ "X" model
transmission
- Package#2 - "Y" model engine w/ "Y" model radiator w/ "Y" model generator
end
- etc.
The Quote level table would handle details like who the customer is, the
salesman, the general description of the quote, the branch the quote came
from, etc.
The Package level table would handle details of the specific configuration
of the package that's being quoted so more technical information.
As background info, this is quoting for the Oil and Gas sector so for
example a customer will want a quote for a drill rig which is made of up 5
different engine packages with each package that performs a different duty
but all within this drill rig. So within this quote the customer will want to
see each of the packages broken a part and priced as such with a total price
for the entire drill rig at the end. The customer is not going to want 5
different quotes for the same drill rig hence one quote# with sub-packages
detailing the different engine units.
To me that means a main table that handles the over all quote# and then
sub-table that handles each of the sub-packages. Wouldn't this be best
handled in the manner I described? A table for the main quote# and then a
sub-table that handles the packages with a FK to the quote they belong to?
Alan