哪些数据存储系统允许查询系统过去的状态?
我正在设计一个系统,其中诸如“在特定时间匹配特定条件的所有记录的总和是多少”之类的问题很重要。
多值并发控制 (MVCC) 似乎是一种可行的方法,因为它可以永远保留审计跟踪。
然而,如果数据存储能够为我处理这个问题,而不是用其他数据库功能将其拼凑在一起,那就太好了。现在,Oracle 和 CouchDB 其他数据库引擎都使用 MVCC,但只是在幕后。他们使用它来解决冲突或决定当长时间运行的查询遇到最近更新的数据时要做什么。但我不知道有哪个系统允许你明确地说“在2009年1月20日17:00的系统状态下,这个查询返回什么”。那么有这样的系统吗?理想情况下,开源?
I'm designing a system where questions like "what was the sum of all records matching certain criteria, at a certain time" are important.
Multi-value concurrency control (MVCC) seems like the way to go here, since it keeps an audit trail forever.
However, it would be nice if the data storage could handle this for me, rather than cobbling it together out of other database features. Now, Oracle and CouchDB other database engines use MVCC, but only behind the scenes. They use it to resolve conflicts or to decide what to do when a long-running query encounters recently updated data. But I don't know of any systems that allow you to explicitly say "in the system state of 17:00 January 20 2009, what does this query return". So are there such systems out there? Ideally, open source?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
看一下 Oracle 的闪回查询。
Take a look at flashback queries with Oracle.
据我所知,MVCC 不保证早期版本行的持续时间。其目标是事务的并发控制;当行“x”的所有事务都已提交时,MVCC 不需要保留该行的早期版本。
您正在考虑时态数据库。 Snodgrass 的旧书用 SQL 开发面向时间的数据库应用程序值得一读,特别是现在它以 PDF 形式提供。如果我必须再次从头开始创建时态数据库,我还会阅读 Temporal Data & Temporal Data & Time。关系模型,以及任何其他涉及 6NF 的内容。 (其中“6NF”<>“DKNF”。)
As far as I know, MVCC doesn't guarantee the duration of earlier versions of rows. Its target is concurrency control for transactions; when all transactions for row 'x' have been committed, there's no real need for MVCC to keep earlier versions of that row.
You're thinking of Temporal Databases. Snodgrass's old book Developing Time-Oriented Database Applications in SQL is worth skimming, especially now that it's available as a PDF. If I had to do a temporal database from scratch again, I'd also read Temporal Data & the Relational Model, and anything else dealing with 6NF. (Where '6NF' <> 'DKNF'.)