I am pretty new to all this Access stuff, so please bear with me...
I am trying to get my head around a problem that's been bugging me when designing a database:
- Say you have a DB for maintaining a record of product range, prices, orders, customers, inventory, etc
- The price of each product is either held in the product table or a separate prices table with each product holding a reference to the entry in the table referring to it.
- Now let's say that a customer ordered a product - the database stores the order information, with the order table holding links (pointers) to the productID, CustomerID, etc
- A while later the price of the above product changes, and the DB is updated to reflect this
- Later still the customer asks for a re-print of their invoice (or a summary of past orders inc prices)
Now this is my problem...
How does the database ensures that the new and old orders refer to the correct prices (old and new respectively)?
I am looking for the common practice used to achieve this. Do you add a new productID when the price changes?
I am trying to get my head around a problem that's been bugging me when designing a database:
- Say you have a DB for maintaining a record of product range, prices, orders, customers, inventory, etc
- The price of each product is either held in the product table or a separate prices table with each product holding a reference to the entry in the table referring to it.
- Now let's say that a customer ordered a product - the database stores the order information, with the order table holding links (pointers) to the productID, CustomerID, etc
- A while later the price of the above product changes, and the DB is updated to reflect this
- Later still the customer asks for a re-print of their invoice (or a summary of past orders inc prices)
Now this is my problem...
How does the database ensures that the new and old orders refer to the correct prices (old and new respectively)?
I am looking for the common practice used to achieve this. Do you add a new productID when the price changes?