Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

share|improve this question

closed as off topic by Brent Pabst, Michael Hampton, Greg Askew, voretaq7 Dec 6 '12 at 2:55

Questions on Server Fault are expected to relate to server, networking, or related infrastructure administration within the scope defined by the community. Consider editing the question or leaving comments for improvement if you believe the question can be reworded to fit within the scope. Read more about reopening questions here.If this question can be reworded to fit the rules in the help center, please edit the question.

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. – Brent Pabst Dec 5 '12 at 20:09
Software design and development questions are WILDLY OFF TOPIC for Server Fault. We have both Stack Overflow and Programmers 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 '12 at 2:55

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.

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.