You are not logged in.
Pages: 1
Is possible to use transaction with mormot and mongodb? if it does, how can i do it?
Offline
Do you have any predictions of when they will be supported?
Offline
No plan yet.
But any source code input is welcome!
Note that IMHO transactions are not the way to use a NoSQL database like MongoDB.
You should rather use the "DDD aggregate document" or "denormalizing" concept, i.e. use the document as the boundaries of the transaction.
See our documentation about it.
If you want to use transactions in a way similar to what RDBMS do (i.e. to join writes on several tables) - just use a SQL database.
Offline
See what Percona states:
If you absolutely need a transaction in your application use it. But don’t use transactions only because they are cool, since in some cases a proper data model based on embedding documents in collections and denormalizing your data could be the best solution. MongoDB isn’t by its nature a relational database; as long as you are able to model your data keeping in mind that it’s a NOSQL database you should avoid using transactions. In specific cases, or if you already have a database with strong “informal relations” between the collections that you cannot change, then you could choose to rely on transactions.
https://www.percona.com/blog/2018/12/04 … nsactions/
I 100% agree with them.
Offline
I read all the content and realized that i really don't need to use transactions.
Thank you for your help and patience
Offline
Pages: 1