MongoDB 中的事务支持 [英] Transaction support in MongoDB

查看:19
本文介绍了MongoDB 中的事务支持的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是 MongoDB 的新手.我在 http:///docs.mongodb.org/manual/faq/fundamentals/.

I am new to MongoDB. I read that MongoDB does not support multi-document transactionshere http://docs.mongodb.org/manual/faq/fundamentals/.

如果我想以原子方式将数据保存在两个集合(A 和 B)中,那么我不能使用 MongoDB 来做到这一点,即如果在 B 的情况下保存失败,A 仍然会有数据.这不是一个很大的缺点吗?

If I want to save data in two collections(A and B) atomically, then i can't do that using MongoDB i.e. if save fails in case of B, still A will have the data. Isn't it a big disadvantage?

不过,人们仍在使用 MongoDB 而不是 RDBMS.为什么?

Still, people are using MongoDB rather than RDBMS. Why?

推荐答案

MongoDB 4.0 现在增加了对多文档 ACID 事务的支持.以供参考参见参考

MongoDB 4.0 adds support for multi-document ACID transactions now. For reference See Refrence

这篇关于MongoDB 中的事务支持的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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