soft delete feature

Post Reply
drmovi
User
Posts: 53

soft delete feature

Post by drmovi »

i suggest making a soft delete i.e. record is not actually deleted from database instead a field named "is_deleted" for example modify its value to be 1 and the record does not appear in record table
i know that it can be done in code but making it as a feature will save a lot of time and effort
my point is sometimes we want to use the deleted record as a history so instead of moving it to another table we can simply use them in their current locatrions


mobhar
User
Posts: 11721

Post by mobhar »

Soft delete or fake delete should be done easily either using "Row_CustomAction" + "Page_Load" server events OR "Multi-Update" feature from "Table" setup.

You can update by flagging the record(s) based on the related field in that table, so that they will be identified as "deleted".


digitalphotoworld
User
Posts: 416
Location: Nürnberg/Germany

Post by digitalphotoworld »

If you have big tables, a delete-flag is not a good idea, because it slow's down select-querys. For a similar problem, I use a trigger that did a copy of the record to a "delete-table" before deleting the record from the original table.


mobhar
User
Posts: 11721

Post by mobhar »

If you have big tables, then you should index your field(s) that often to be used in your SQL SELECT statement.


Post Reply