never_had_a_name
never_had_a_name

Reputation: 93286

Will MongoDB/CouchDB support transactions?

From MongoDB's webpage I understand that they are not supporting transactions fully, if any.

I wonder if they are ever going to support it in the future so that I can store financial information in them, instead of using a RDBMS for it.

And how is it with CouchDB, do they support transactions?

Upvotes: 4

Views: 2955

Answers (3)

Grigori Melnik
Grigori Melnik

Reputation: 4107

Major development: starting the next version, multi-document ACID transactions with snapshot isolation and all-or-nothing guarantees are supported by MongoDB.

See more in the announcement made by Eliot Horowitz, MongoDB's CTO and co-founder.

Upvotes: 0

rystsov
rystsov

Reputation: 1928

Yes, MongoDB does't support transaction out of the box, but you can implement optimistic transactions on your own. I wrote an example and some explanation on a GitHub page. I hope you'll find it useful.

Upvotes: 0

Anonym
Anonym

Reputation: 7735

Neither of these supports transactions in the sense of the more traditional RDMS - and it's unlikely they will - it's a tradeoff, supporting transactions in a distributed system is non-trivial and expensive.

MongoDB does not have ACID properties, and likely never will. CouchDB does give you ACID (I'm not sure if it does by default).

Both allows you to perform simple atomic operations on data, such as simple add/subtract on values though.

See also

Can I do transactions and locks in CouchDB?

MongoDB transactions?

On that note, this podcast with one of the MongoDB guys should give you an brief overview of the problems many NoSQL systems tries to solve, and the tradeoff they make.

Upvotes: 5

Related Questions