Consider the following database structure:
• A products table that stores product information.
• An orders table where each order can have multiple orderItems (stored in a separate table).
• The orderItems table includes a reference to a product.
Now, if an admin updates a product’s details (e.g., changes the product price), this update will also affect the sale price when viewing past orders.
How would you handle this behavior to ensure the sale price in past orders remains unchanged?