sales db

March 11, 2007 by Carl Grint
If you are using this for sales, it would be better to have a table with the Sales in, with the Product ID, and the Price the product was when it sold, separate from the Product table which holds the current price.
This is how you would set up an ecommerce site database, so the price, colours, size etc for the product ordered where fixed, rather then referencing a second table, as you end up with the details changing as you have found, and not being true for the date of sale.