This is for a CRM application using PHP / MySQL. Various objects, such as a client, contact, note, etc., can be "deleted" by the user. Instead of actually deleting the entity from the database, I just want it to be deleted in the application, but stored in the database and can be "restored", if necessary, at a later time. Perhaps even add some kind of "basket" to the application.
I thought of several ways to do this:
I am sure that there are other ways, and each of them has its own consequences for the size of the database, performance, etc. I am just wondering what is the usually recommended way to do something like this?
source share