maxxi
maxxi

Reputation: 307

Using MongoDB and Relational DB together

How to handle transaction issues in an environment where and databases work together?

I want to use for scalability and for transactions. (transactions are used in the inventory management system but product information is stored in a database)

Upvotes: 1

Views: 393

Answers (1)

Tim Biegeleisen
Tim Biegeleisen

Reputation: 522561

There is good news: As of Mongo version 4.2, multiple document ACID transactions are now fully supported:

For situations that require atomicity of reads and writes to multiple documents (in a single or multiple collections), MongoDB supports multi-document transactions.

As a general comment to your question, there is nothing wrong with having more than one data store in your architecture. However, keep in mind that business operations which would require both Mongo and MySQL for a single logical transaction/unit, there would probably be no way to make this atomic. If you are falling into this category, then you need to rethink your database design, and just stick with one database for each business operation.

Upvotes: 2

Related Questions