I don't have the book, and I don't know the scenario or requirements that resulted in the final design, but IMO a UnitPrice may be better of in an OrderDetails table than in a PartNo.
When you buy an item, it has a specific price at that very moment. It's that price that you want to maintain in your system for ever for that specific order and product, so it's added to the OrderDetails table rather than to the PartNo table.
Suppose you buy 10 items of product x for $1. After a while, the price is increased to $1,10. Now, looking at the history of the system, did you all of a sudden pay $11.00 for your 10 products? No, you didn't. You still paid $10.
If you'd maintained the price in the PartNo table, the price would also have changed for every historical order, something that you really really don't want in your system.
Does this make sense?
Cheers,
Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
|