非ACID数据库合规性的一些现实世界的含义是什么? [英] What are some real world implications of non-ACID database compliance?

查看:322
本文介绍了非ACID数据库合规性的一些现实世界的含义是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

具体来说有一些数据可能丢失的风险?我正在看着运行一个密集的事务处理系统,其中关键的是什么都不丢失。在任务关键型应用程序中是否有任何使用NoSQL的示例,例如银行事务处理?

Specifically is there some risk that data can be lost? I'm looking at running an intensive transaction processing system where it is critical that nothing be lost. Are there any examples of NoSQL being used in mission critical applications such as banking transaction processing?

推荐答案

ACID意味着你不能保证原子性,一致性,隔离或持久性。

Without being flippant, the absence of ACID means you get no guarantees of atomicity, consistency, isolation, or durability.

没有原子性,你不能保证必须成功或失败的多个动作。例如,如果您的交易要求您借记一个帐户并一次性信用另一个帐户,在没有原子交易的情况下,您必须滚动您自己的解决方案,或接受您可能从一个帐户借记,而不需要相应信用。

Without atomicity, you get no guarantee that multiple actions that must either succeed or fail together do so. For instance, if your transactions require you to debit one account and credit another in one go, in the absence of atomic transactions, you either have to roll your own solution, or accept that it's possible for you to debit one account, without making the corresponding credit.

如果没有一致性,就不能保证你的事务的副作用在关系数据库中工作,例如触发触发器或外部级联关键关系。因此,如果您需要某种自动递增您的交易的唯一标识符,则不能保证您将获得一个。

Without consistency, there's no guarantee that "side effects" of your transactions work - in relational databases, that's things like the firing of a trigger, or the cascading of a foreign key relationship. So, if you need some kind of auto-incrementing unique identifier for your transaction, there's no guarantee that you will get one.

没有隔离,没有办法保证两个进程不会同时影响数据。例如,一个进程可能会增加一个字段的值,而第二个进程可能递减它 - 谁赢了?

WIthout isolation, there's no way to guarantee that two processes don't affect the data at the same time. For instance, one process might be incrementing the value of a field, and a second one might be decrementing it - who wins?

没有耐用性,硬件故障可能离开数据库在不同于您期望的状态下 - 例如,您可能认为更改已写入数据存储,但它已在某些内部缓冲区中排队,如果出现电源故障,则会消失在较薄的空间中。

Without durability, hardware failure could leave the database in a different state than you expect - for instance, you may believe that a change was written to the data store, but it was queued in some internal memory buffer, and disappear into thin air if there's a power failure.

可能可以在NoSQL上构建一个解决方案,该方案可以解决ACID合规问题,但是工作量很大,你几乎肯定不会做一个好工作写关系数据库的人。

It's probably possible to build a solution on NoSQL which works around the absence of ACID compliance, but the level of effort would be huge, and you almost certainly won't do as good a job as the guys who write relational databases....

这篇关于非ACID数据库合规性的一些现实世界的含义是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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