Transaction support in MongoDB

后端 未结 8 1763
刺人心
刺人心 2020-12-10 02:02

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

If I want to

8条回答
  •  佛祖请我去吃肉
    2020-12-10 02:59

    MongoDB does not support multi-document transactions.

    However, MongoDB does provide atomic operations on a single document. Often these document-level atomic operations are sufficient to solve problems that would require ACID transactions in a relational database.

    For example, in MongoDB, you can embed related data in nested arrays or nested documents within a single document and update the entire document in a single atomic operation. Relational databases might represent the same kind of data with multiple tables and rows, which would require transaction support to update the data atomically.

提交回复
热议问题