|
Primary key is [productId, productIdTo, productAssocTypeId, fromDate].
I have a scenario where I may have 2 identical items as BOM components of a product. Reason is
that makes it easier for the machining shop. Consider that for a bicycle frame, I have 1
large-diameter metal tube (down tube), and 2 small-diameter tubes (more actually, but this is just
for simple example). For the 2 small-diameter tubes, they're of different lengths.
For ease of manufacturing, I'd like a BOM with 3 items:
- 1 large-diameter tube unit (meters) 1.45
- 1 small-diameter tube unit (meters) 1.23
- 1 small-diameter tube unit (meters) 0.98
Would it be better if I include sequenceNum in the primary key? Or quantity?
I'm importing data from a legacy system, so the fromDate values can be all similar, thus breaking
the primary key constraint.
Jonathon
|