When comparing MongoDB vs MySQL with InnoDB, the Slant community recommends MySQL with InnoDB for most people. In the question“What are the best ACID-compliant scalable databases?” MySQL with InnoDB is ranked 3rd while MongoDB is ranked 8th. The most important reason people chose MySQL with InnoDB is:
Some of these APIs include ODBC, Java (JDBC), Perl, Python, PHP, Ruby, and native C. Also, there are a number of third party APIs that are available for use to interact with the database
Specs
Ranked in these QuestionsQuestion Ranking
Pros
Pro Great speed
MongoDB queries can be very fast because the data is usually all in one place and can easily be retrieved in a single lookup. But this is true only when the data is truly a document. When it's trying to emulate a relational model it starts to become really slow because it may have to perform many independent queries to retrieve a single document.
Pro Perfect documentation and tutorials
Miles above other databases in educational resources.
Pro Uses JSON
As Node.js uses JavaScript there's no need to map the returned JSON data from MongoDB, as JavaScript is a superset of JSON. Essentially solving object-relational impedance mismatch by its very nature. Working with JSON is also easier overall as it more easily fits into how you would represent data on the client.
Pro Doesn't require a unified data structure
Mongo is very flexible in that it doesn't require a unified data structure across all objects. So it's rather easy to use.
Pro Easy to scale
MongoDB has powerful sharding and scaling capabilities for when the data stored in the database gets so large that a single machine may not be able to store all of it. Sharding solves this problem through horizontal scaling. Mongo gives developers the ability to easily and painlessly add or remove as many machines as needed.
Pro Multiple APIs
Some of these APIs include ODBC, Java (JDBC), Perl, Python, PHP, Ruby, and native C. Also, there are a number of third party APIs that are available for use to interact with the database
Pro Many applications available
There are a number of applications that are built with the focus of MySQL. Some of these include Drupal, Joomla, Wordpress and more.
Pro Scalable
Works well under simple operations or heavy tasks.
Pro Huge community support
Being the world's most popular open source database means there are tons of available examples and information for users' to access.
Cons
Con Reported to lose or corrupt data
MongoDB is famously known for leaking and losing data over time.
Con Document Stores may be not suited for relational data
MongoDB has no JOIN, all relations are supposed to be resolved client-size which entails additional requests to the server.
Con Need many search features
Though it is possible to index and search text in documents in MongoDB 4.0 in multiple languages. The indexing and search is not as powerful as for example Elastic Search. For instance not being able to search for only parts of words.
Con InnoDB is not fully configured
When you initially install MySQL, InnoDB needs to be configured to make it suite your needs and there are many issues you can come across.