Answer the question
In order to leave comments, you need to log in
Cascading update and delete data?
Suppose we have a Products table and an Orders table , which stores the details of the ordered product.
Obviously Orders.productId is a foreign key. How correct, from the point of view of the business process, is it to cascade the deletion of orders, following the products they refer to? From the point of view of information, information about completed orders is critically important, since the orders table accumulates almost all the basic information on the order. But what's the point of keeping it if the product has already been deleted, in terms of data integrity? Another contradiction arises.
Answer the question
In order to leave comments, you need to log in
How correct, from the point of view of the business process, is it to cascade the deletion of orders, following the products they refer to?Completely wrong. The item just needs to be marked as unused.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question