Tractability - ModifiedBy和CreatedBy [英] Tractability - ModifiedBy and CreatedBy

查看:98
本文介绍了Tractability - ModifiedBy和CreatedBy的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述





我刚开始一个新项目,我刚刚发现数据库实现了一个'易处理'要求,每个表都有ModifiedBy 和CreatedBy(和ModifiedWhen,CreatedWhen)列用于跟踪对特定用户的更改,这是标准做法。



但是,数据库设计师已严格执行此操作这些列通过外键约束与User表相关联。



实际上,整个数据库通过这些约束连接到User表。更糟糕的是,每个表有两个限制。



当我使用.NET EntityFramework接近数据库时,我遇到了大量在业务中毫无意义的关联条款。



在与数据库设计师讨论我的问题之后,我被告知必须保留正确的跟踪信息。



我看不出这是怎么回事。我认为这些列旨在促进并发和跟踪排序,但不是严格的跟踪,因为它只跟踪最后一个用户进行更改,这对数据取证无论如何都没什么帮助。并且,我认为重型跟踪应该由审计表使用触发器进行。



我错了吗?上面描述的那种易处理性是否可以接受数据架构?

Hi,

I have just started a new project, and, I have just discovered that the database implements a 'tractability' requirement whereby every table has "ModifiedBy" and "CreatedBy" (and ModifiedWhen, CreatedWhen) columns for tracing changes to particular Users, as is standard practice.

However, the database designer has implemented this strictly such that these columns are associated to the User table by Foreign Key constraints.

Effectively, the entire database is connected to the User table by these constraints. And worse than that, there are two constraints per table.

When I approach the database with .NET EntityFramework I was confronted by a mass of associations that were meaningless in business terms.

After speaking with the database designer regarding my concerns, I was told that this was necessary to retain correct tracing information.

I can't see how this is acceptable. I thought that these columns are intended to facilitate concurrency, and tracing of sorts, but not strict tracing, as it only traces the last user to make changes, which is of little help in data forensics anyway. And, I thought that heavy duty tracing ought to be conducted by Audit Tables using Triggers.

Am I wrong? Is the kind of 'tractability' described above acceptable data architecture?

推荐答案

这篇关于Tractability - ModifiedBy和CreatedBy的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆