Skip to main content
1 of 2

I don't think a database should be responsible for stopping someone from misclassifying the sub-type of a record. That seems much more like a business logic layer problem.

When I think about "data consistency" from a RDBMS standpoint I think about ACID.

"Consistency. A transaction either creates a new and valid state of data, or, if any failure occurs, returns all data to its state before the transaction was started."

It should have more to do with the mechanics of correctly persisting transactions.

I do wonder about what would be the best way to handle the case of re-classifying a product. Any sub-type record that was previously created would need to be deleted since only one sub-type should exist for each super-type record - assuming only a single layer of inheritance. Should that be a database trigger or something handled in the Business Logic Layer?