Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

MYSQL Cluster (NDB) versus MongoDB

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?

like image 431
archmeta Avatar asked Oct 03 '11 09:10

archmeta


2 Answers

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.

like image 151
raffian Avatar answered Oct 11 '22 12:10

raffian


If you want to keep your sql/ relational database structure then go with NDB. If you want to build data that is a little more heirarchial in structure you should go with mongodb.

like image 32
Tommie Jones Avatar answered Oct 11 '22 13:10

Tommie Jones