Database: To delete or not to delete records

前端 未结 8 805
一个人的身影
一个人的身影 2020-12-07 08:41

I don\'t think I am the only person wondering about this. What do you usually practice about database behavior? Do you prefer to delete a record from the database physically

相关标签:
8条回答
  • 2020-12-07 09:22

    For user-entered/managed data I've used the flag method you describe and given the user an "empty the trash" interface to actually delete items if they choose to.

    0 讨论(0)
  • 2020-12-07 09:30

    There are also legal issues either way if personal data is involved. I think it greatly depends on where you are (or where the database is), and what the terms of use are.

    In some cases people can ask to be removed from your system, in which case a hard delete is needed (or at least clearing out all of the personal information).

    I would check with your legal department before you adopt a strategy either way if personal information is involved.

    0 讨论(0)
提交回复
热议问题