-1

From what I understand, it's generally best practice to design a system with user access to delete "records" to only hide/disable that record and not actually delete it. This typically ends up being (example) a flag in a database like "enabled" which gets changed to 0 when a user "deletes" a record. This doesn't just pertain to databases but things such as web systems, files and so on.

Is this generally true, and are there any good write-ups/papers on this matter?

2
  • This question is going to get closed for multiple reasons, check out the FAQ next time before posting. Regardless, I'll give my $0.02 below. Dec 5, 2012 at 20:09
  • Software design and development questions are WILDLY OFF TOPIC for Server Fault. We have both Stack Overflow and Software Engineering for this sort of discussion. That said, the answer to your question is this is generally a good way to design systems (it makes undeleting easier, and in the event a malicious user starts "deleting everything" recovery is as simple as flipping the bit back). Stack Exchange uses this principle for deleting things - A flag is set which makes them "invisible" to most users. If you have enough rep search for deleted:1 to see them.
    – voretaq7
    Dec 6, 2012 at 2:55

1 Answer 1

1

I personally prefer to disable records for the most part except for when the data is not important to the user. For instance, if I'm dealing in user accounts I would want to disable and only delete after a long period of time. However, if I'm dealing with something simple such as a list of codes or values I would probably delete them entirely.

The real answer: it depends with each system and the requirements behind the system.

Not the answer you're looking for? Browse other questions tagged .