I do not think I'm thinking about this. What do you usually practice about database behavior? Do you prefer to delete a record physically from the database? Or is it better to flag or record the record with the "deleted" flag or boolean column to denote the record?
It definitely depends on the actual content of your database. If you are using it to store session information, then immediately wipe the session off (or off) in all ways, you do not want the garbage to lie. As really can not be used again for any practical purposes.
Actually, you need to ask yourself, can I need to restore this information? Like the questions given on SO, they should definitely mark 'deleted' because we are actively allowing the cancellation of one.
If you are not actively trying to restore the data completely, but you still want to maintain it, then we also have to select users to display it Has the option. Monitoring (or similar) purpose I suggest that you understand a set plan (possibly according to data), and close it in another table. This will keep your primary table clean from 'deleted' data, as well as maintain your secondary table optimized for monitoring purposes (or whatever is in your mind).
For temporal data, see:
Comments
Post a Comment