Here is my question, I have 2 basic entities.
1-Order and 2-Delivery Type (basically a look up table 1-email, 2-download, 3-USPS Mail)
Let's say a customer places an order and chooses delivery type 3-USPS Mail.
My orders table stores the id 3 to join to the Delivery Type. Basic stuff.
but what happens when an admin by mistake updates the delivery type from UPS mail to Fedex Mail.
The order will reflect the wrong delivery type. My question is, should we prevent people from updating the delivery type once an order has been places or my order should be denormalized and store a snapshot of the document type at that moment what's the best practice for this?
I see that most of the time for example in orders-products scenarios, updating a product name is not a big deal but whats the procedure to implement when the new value impacts the order?
Thanks!
That is going to depend entirely on the business process you're automating there. If they should not be able to do, and there is no business reason to do it, then they should be prevented from doing it. If they need to do it, then the system needs to be able to handle it. It's the kind of thing you need to model from the start, to keep from getting into holes you can't get out of.
So, short of it is, there's no firm answer. Your data needs to match what is currently going on with the order, that's for certain.