R
RichUE
I am designing a Components database to analyse forecast costings of parts
based on quotes. I have two tables that appear to have a Many-to-Many
relationship, and I want to resolve this into two Many-to-Ones. My tables are:
tbl_Parts, consisting of:
txt_PartNumber (PK)
txt_PartDescription
etc.
tbl_PriceBreaks, consisting of:
txt_PartNum (FK) (PN)
int_MinimumOrderQuantity (MOQ)
cur_MinimumOrderValue (MOV)
int_PriceBreakQty (PBQ)
cur_PriceBreak (PB)
tbl_PriceBreaks example data:
PN, MOQ, MOV, PBQ, PB
1, 50, null, 50, 1.25
1, 50, null, 500, 1.10
2, null, 500.00, null, 3.50
2, 200, null, 200, 3.15
There will either be a minimum order quantity, or a minimum order value,
resulting from a particular quote, but not both. However, different suppliers
may quote using MOQ or MOV. The price break quantity may be the same as the
MOQ or may be higher depending on the quote. For a part with an MOQ of 200,
there may be a price break at 1000, for example. The price break quantity may
be calculated from an MOV, if there is one. There may be several price break
cost values depending on the quote.
A third related table is:
tbl_Quotes, consisting of:
txt_PartNumber (FK)
cur_Cost
dtm_DateOfQuote
int_QuoteLine
I evaluated the Parts-PriceBreaks relationship as Many-to-Many because each
part may have a number of price breaks, e.g. 50 off, 100 off, 500 off,...,
and similarly each price break will be associated with many parts. Do I have
too much data in tbl_PriceBreaks? How could I sub-divide it to eliminate the
Many-to-Many relationship?
based on quotes. I have two tables that appear to have a Many-to-Many
relationship, and I want to resolve this into two Many-to-Ones. My tables are:
tbl_Parts, consisting of:
txt_PartNumber (PK)
txt_PartDescription
etc.
tbl_PriceBreaks, consisting of:
txt_PartNum (FK) (PN)
int_MinimumOrderQuantity (MOQ)
cur_MinimumOrderValue (MOV)
int_PriceBreakQty (PBQ)
cur_PriceBreak (PB)
tbl_PriceBreaks example data:
PN, MOQ, MOV, PBQ, PB
1, 50, null, 50, 1.25
1, 50, null, 500, 1.10
2, null, 500.00, null, 3.50
2, 200, null, 200, 3.15
There will either be a minimum order quantity, or a minimum order value,
resulting from a particular quote, but not both. However, different suppliers
may quote using MOQ or MOV. The price break quantity may be the same as the
MOQ or may be higher depending on the quote. For a part with an MOQ of 200,
there may be a price break at 1000, for example. The price break quantity may
be calculated from an MOV, if there is one. There may be several price break
cost values depending on the quote.
A third related table is:
tbl_Quotes, consisting of:
txt_PartNumber (FK)
cur_Cost
dtm_DateOfQuote
int_QuoteLine
I evaluated the Parts-PriceBreaks relationship as Many-to-Many because each
part may have a number of price breaks, e.g. 50 off, 100 off, 500 off,...,
and similarly each price break will be associated with many parts. Do I have
too much data in tbl_PriceBreaks? How could I sub-divide it to eliminate the
Many-to-Many relationship?