Question

In the northwind traders database unitprice is listed on both the products and [order details] tables. Both tables list different prices for the same product. Is this a redundancy or is there an explanation for this?

Was it helpful?

Solution

There's a reason.

When you change the price of a product, you don't want all orders containing that product changing as well. You need the unitprice in the [Order Details] table to preserve history.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top