完全可审计数据模型的最佳实现? [英] Best implementation for fully auditable data model?

查看:94
本文介绍了完全可审计数据模型的最佳实现?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的要求是一个数据模型,其中保留了对每个对象的每个属性进行更改的完整审计跟踪。对象定义也是流畅的:新的属性可以随着时间的推移出现或消失。此审核跟踪将与原始数据库分开生成,因此基于触发器的审核模型将无法正常工作。

My requirement is for a data model where a full audit trail is retained for changes to every attribute of every object. Object definitions are also fluid: new attributes can appear or go away over time. This audit trail will live separately from the original databases, so a trigger-based auditing model won't work.

在关系数据库中,我可以使用单个大型ATTRIBUTE_HISTORY表可以记录每个属性的每个变化,具有适当的时间戳和责任字段。

In a relational database, I can implement this with a single large ATTRIBUTE_HISTORY table that records every individual change to each attribute, with appropriate timestamp and responsibility fields.

我的问题是:有任何更新的存储模型(BigTable,HBase,CouchDB ,RDF存储等)优于RDBMS?

My question: are any of the newer storage models (BigTable, HBase, CouchDB, RDF stores, etc.) superior to a RDBMS for this purpose?

推荐答案

如何存储数据的问题取决于它将如何被用于其他问题。我建议您使用一些您现在所理解的简单内容,测试您是否想到可能需要的负载。然后在将来进行必要的改进。

The question of how to store the data depends on how it is going to be used amongst other issues. I'd suggest going with something simple which you understand for now, testing if you have an idea of the likely load you expect. Then in future making improvements as necessary.

关于您的基于触发器的审核系统的问题,因为听起来您已经设置了在数据库级完成工作,我有一个建议。使用触发器将更改记录到数据库中的表,然后过夜(或者经常)处理表的内容,并在存储的任何位置创建审计跟踪,并清空数据库中的表的内容。这样,您可以在数据库级别捕获更改,但仍然满足您在其他地方存储实际审计跟踪的要求。

In relation to your issue with a trigger based auditing system, since it sounds like you're set on having the work done at the database level I've one suggestion. Use triggers to log changes to a table within the database, then overnight (or however frequently) process the contents of the table and create the audit trail wherever it is being stored and empty the contents of the table in the database. This way you can capture changes at the database level but still fulfil your requirement to store the actual audit trail elsewhere.

这篇关于完全可审计数据模型的最佳实现?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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