Collectives™ on Stack Overflow

Find centralized, trusted content and collaborate around the technologies you use most.

Learn more about Collectives

Teams

Q&A for work

Connect and share knowledge within a single location that is structured and easy to search.

Learn more about Teams

How does MYSQL Cluster (NDB) compare against MongoDB? It seems that while both NDB and Mongo supports scale out over commodity machine nodes, NDB also provides all the relational capabilities such as JOINs, transactions, etc...

Therefore, under what situations would one choose Mongo over NDB?

There are many ways to scale traditional MySQL horizontally. Personally, I wouldn't use any of the current NoSQL's available - they're all unstable and lack transactions. N.B. Jan 3, 2012 at 16:50 So I am wrong but Mongo still doesn't support transactions? I know that some technologies are appealing, such as Mongo - but SADLY it isn't a stable data storage. It lacks transactions, therefore you won't develop financial systems using Mongo. We can go on about this the whole day - Mongo is quick due to the fact it doesn't do as much as RDBMS but relational databases are "slow" for a reason. N.B. Jan 4, 2012 at 9:13 @N.B. Agreed, you won't see Mongo being used in mission-critical applications such as trading, finance, etc, where multiple rows need to be updated in a single transaction and data integrity is of the utmost importance, but it does not change the fact that Mongo DOES support single document atomic updates..so you need to stop saying Mongo does not support transactions because it does to a certain extent. raffian Jan 4, 2012 at 17:13 @RaffiM - database transactions are well defined. Please don't misuse the term when it suits your needs. MongoDB hasn't got transactions . You can call something "document atomic update" or whatever, but it isn't a database transaction - they are two completely different terms doing different things. Misleading people who'll read your comment might prove dangerous since it might lead one to believe that MongoDB actually has transactions similar to the ones of MySQL when - surprise - it doesn't. N.B. Jan 5, 2012 at 11:35

Even though MYSQL Cluster NDB is a shared-nothing approach that scales a relational database across commodity machines, there are limitations and impacts to performance. You can read the full details at the link below, but some of the more important features are just not supported in NDB, such a foreign keys, which may make you question why you would cluster a RDBMS in the first place if you have to give up some of the features you're expecting to leverage.

18.1.5.1 Differences Between the NDB and InnoDB Storage Engines

What are the limitations of implementing MySQL NDB Cluster?

I come from a relational background, and things like MongoDB did not initially click with me, but after tinkering with it for a few weeks, I was surprised at how much is possible while not being subject to traditional schema guidelines and transactional overhead that comes with relational databases. If you really want true, horizontal scalability and are willing to give up the luxury of joins and foreign keys, you should seriously consider using Mongo or something similar that falls under the NoSQL category.

You can scale MySQL horizontally. Surprising advice from someone coming from relational background, the reason I'm not using NoSQL is because they lack transactions. Oh yes, every single one of them is unstable. Anyone claiming they're stable enough to be used in production, please show me a deployment of medium web-scale without any faults and I'll admit I'm terribly wrong. N.B. Jan 3, 2012 at 16:48 Sorry but I'm not wrong. Also, google why other "big" websites haven't moved to NoSQL data storage and why - because it's unstable. Especially mongo. N.B. Jan 4, 2012 at 9:11 @N.B. : Take a look at Trello, it is big (not Google big but still), they are using MongoDB, read all about it here: blog.fogcreek.com/the-trello-tech-stack Radu Maris Sep 20, 2012 at 7:35 MongoDB isn't meant to be a replacement for relational databases like MySQL anywayz. It's designed for big data, which suits archiving use-cases mostly, which is why it doesn't have transactions. That's not to say you can't use it as an RDB replacement (I do) but you have to give up a few things. I don't miss transactions. In fact it's made me a more conscientious developer. And if you think Craiglist, The New York Times, Foursquare, Disney, etc, are not large companies, then you're on crack. Jamie Carl Sep 26, 2012 at 0:25 @JamieCarl Agreed....I understand that Mongo isn't meant to be a replacement for RDBMS, but let's be clear on transactions....a transaction is defined as an update that supports ACID properties, whether it's an update for a single record, table, multiple records, records across databases, or anything that is XA-compatible and can participate in a distributed transaction. raffian Sep 26, 2012 at 3:20

Thanks for contributing an answer to Stack Overflow!

  • Please be sure to answer the question . Provide details and share your research!

But avoid

  • Asking for help, clarification, or responding to other answers.
  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers .