English 中文(简体)
删除数据或仅仅标明删除数据?
原标题:Delete data or just flag it as deleted?

我建造一个网站,让人们吸取词汇。 在创造教训时,制作新闻节目时,参考教训。 当另一个用户使用这个教训时,用户也把参考与实践结果放在一起。

我的问题是,用户何时决定取消教训?

我所审议的备选办法是:

  • Actually delete the lesson from the database and remove all referencing news items, practise results etc.
  • Just flag it as deleted and exclude the link from referencing news items, results etc.

你们的想法是什么? 是否应当删除数据? 是否应当一起避免提及?

顺便提一下,使用谷歌应用发动机的Im(python/datastore)。 A db. 只要我能看到,在删除提及对象时,不考虑任何情况?

感谢!

最佳回答

如果需要审计数据的变化,则删除的标识数据(aka“软删除”)将大有助益,特别是如果你记录使用者采取行动删除的时间和时间。 它还使数据易于“删除”。

指出没有理由防止将“硬删除”作为行政职能,以帮助消除错误。

问题回答

将数据标记为“删除”是最简单的。 如果你目前不使用这一工具,就会使贵国数据库的所有内容都非常简便,并容易增加新的功能。

另一方面,如果你重新做一些事情,如显示用户的“词汇点”来自哪里,或者它们所积累的多少经验教训,那么提及软性删除项目可能是必要的。

我首先要谈第一个问题,如果你需要的话,稍后会改变。 因此:

  • If you re not using soft deletes, assume they won t work in the way that future requests actually want them to. You ll have to rewrite them anyway.
  • If you are using them, assume that nobody is using the feature which uses them. Now you ve done a lot of work and tied yourself into maintenance of something nobody cares about.
  • If you create them, you ll find yourself creating a feature to use them. See the above.
  • If you don t create them, you can always create them later, once you have better knowledge about what the users of your system really want.

Not 产生软性删除使你有更多的选择可以向前推进。 备选办法具有价值。 备选办法到期。 除非你知道为什么





相关问题
How to make logging.debug work on Appengine?

I m having a tough time getting the logging on Appengine working. the statement import logging is flagged as an unrecognized import in my PyDev Appengine project. I suspected that this was just an ...

gqlQuery returns object, want list of keys

Is there a way to convert the GqlQuery object to an array of keys, or is there a way to force the query to return an array of keys? For example: items = db.GqlQuery("SELECT __key__ FROM Items") ...

Integrating Google AppEngine with a Thick Client

I want to make a multi-user client-server solution with Java Swing thick client as a front-end and Google AppEngine (Java one) as a back-end. The problem is that GAE provides only web-based forms for ...

sorl.thumbnail : thumbnail is not a valid tag library?

I am trying to install sorl.thumbnail but am getting the following error message: thumbnail is not a valid tag library: Could not load template library from django.templatetags.thumbnail, No module ...

热门标签