非 ACID 数据库合规性对现实世界有哪些影响? [英] What are some real world implications of non-ACID database compliance?

查看:10
本文介绍了非 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天全站免登陆