LMacdonald
New member
- Local time
- Today, 00:23
- Joined
- Mar 18, 2020
- Messages
- 2
Hello there,
Apologies if this has been posted before but I am unable to find a solution.
Say I am trying to create a database to record sales and I have the following tables (simplified for easier posting here):
Orders tbl:
I am aware this is bordering duplication of data but I wish for the current price to be recorded when placing the order so that the price in the Stock table can be changed and thus update future orders with a new price whilst keeping a record of old orders accurate to the price they were sold.
Any help would be much appreciated.
Kind Regards,
Apologies if this has been posted before but I am unable to find a solution.
Say I am trying to create a database to record sales and I have the following tables (simplified for easier posting here):
Orders tbl:
- OrderID (Primary Key)
- Date
- Product Name (Primary Key)
- Price
- OrderID (Foreign Key)
- Product Name (Foreign Key)
- Quantity
- Price
I am aware this is bordering duplication of data but I wish for the current price to be recorded when placing the order so that the price in the Stock table can be changed and thus update future orders with a new price whilst keeping a record of old orders accurate to the price they were sold.
Any help would be much appreciated.
Kind Regards,