MongoDB vs. MySQL: How to choose

MongoDB and MySQL are the leading open source NoSQL and relational databases, respectively. Which is best for your application?

During the dot-com bubble in the 1990s, one common software stack for web applications was LAMP, which originally stood for Linux (OS), Apache (web server), MySQL (relational database), and PHP (server programming language). MySQL was the preferred database mostly because it was free open source and had good read performance, which fit well with “Web 2.0” apps that dynamically generated sites from the database.

Later the MEAN stack, which stood for MongoDB (document database), Express (web server), AngularJS (front-end framework), and Node.js (back-end JavaScript runtime), came to prominence. The MEAN stack was attractive, among other reasons, because the only language you needed to know was JavaScript. It also needed less RAM than an equivalent LAMP stack.

What is MySQL/MariaDB?

Monty Widenius and David Axmark of MySQL AB originally developed MySQL starting in 1994. The “My” in the product name refers to Widenius’ daughter, not the English word “my.” MySQL was designed to be API-compatible with mSQL (a.k.a. Mini SQL), with the addition of a SQL query layer and an open source license (actually a dual license, both proprietary and GPL). Public MySQL releases started at the end of 1996, and continued every year or two. MySQL is currently the most popular relational database.

To continue reading this article register now