`active' flag or not?

后端 未结 18 1878
醉梦人生
醉梦人生 2020-12-25 14:21

OK, so practically every database based application has to deal with \"non-active\" records. Either, soft-deletions or marking something as \"to be ignored\". I\'m curious a

18条回答
  •  伪装坚强ぢ
    2020-12-25 15:01

    The situation really dictates the solution, methinks:

    If the table contains users, then several "flag" fields could be used. One for Deleted, Disabled etc. Or if space is an issue, then a flag for disabled would suffice, and then actually deleting the row if they have been deleted.

    It also depends on policies for storing data. If there are policies for keeping data archived, then a separate table would most likely be necessary after any great length of time.

提交回复
热议问题