What's the best way to store changes to database records that require approval before being visible?

前端 未结 8 1700
说谎
说谎 2020-12-07 13:44

I need to store user entered changes to a particular table, but not show those changes until they have been viewed and approved by an administrative user. While those chang

8条回答
  •  不知归路
    2020-12-07 14:32

    Definitely store them in the main table with a column to indicate whether the data is approved or not.

    When the change is approved, no copying is required. The extra work to filter the unapproved data is the sort of thing databases are supposed to do, when you think about it. If you index the approved column, it shouldn't be too burdensome to do the right thing.

提交回复
热议问题