2 ms·
> There's nothing wrong with having a trigger that turns deletes into updates, if that's what you want. While I wouldn't use it on base tables, a view that pro
by dragonwriter 7y ago
> There's nothing wrong with having a trigger that turns deletes into updates, if that's what you want.
While I wouldn't use it on base tables, a view that provides a “current” picture where deletes are updates (or even inserts of a deletion event) into a base tabl with (potentially along with others) provides a complete historical picture of the status of the data of which the view presents a current snapshot is a useful approach.
- cryptonector 7y agoThat's fine, though if you have to worry about sufficiently-privileged and insufficiently-knowledgeable DBAs/devs, then it's best to have such triggers on base tables. After all, you want referential integrity at all times -- it should take drastic action to perform operations that don't adhere to your business rules.