Since NoSQL databases like MongoDB hit the mainstream scene a few years ago, it’s not uncommon to come across numerous Stackoverflow and Quora posts from people asking if or how they should replace a MySQL database with X NoSQL database.
The reality of the situation is you should only make such decisions based on your needs. Blindly picking a database without first assessing whether or not you need too or if it’ll even fit your use-case is a dangerous position to find yourself in.
MySQL can easily scale
A constantly recurring myth that keeps on being perpetuated is that MySQL can’t be scaled and doesn’t work well for fast writes. This is false, MySQL is a battle tested database that can perform any task if in the hands of a skilled database architect/engineer to handle writes and reads at an acceptable rate.
This post from 2011 on Highscalability.com reveals Newrelic were collecting 20+ billion metrics per day using MySQL as their database of choice.
Arguably Newrelic was much smaller back then in 2011 and is probably storing twice the amount of metrics per day, but it does highlight one important thing: MySQL in the hands of the right team can be scaled even to handle billions of rows.
MySQL is reliable and mature
Just because MySQL has been around for a long time now and is older compared to the newer hip databases ,doesn’t mean it has dated. In environments where storing critical data is crucial to your business, taking your chances on MySQL is going to be a safer bet than choosing a NoSQL solution that is only a few years old. MySQL is a battle tested database that has proven its worth.
Most shortcomings within MySQL are known and have workarounds, I am not saying MySQL is perfect, but it does fit most cases and hasn’t really been superseded or replaced by the newer databases that have come out in the last few years.
NoSQL != Relational
There is one thing that NoSQL databases aka document databases should not be used for and that is relational data. Although you can make the likes of MongoDB work with relational data, it’s not meant for the task.
NoSQL databases are meant to be used for data that is constantly changing and cannot be defined within a schema. This is why they are called document databases because they’re undeniably great at storing document like data which is constantly changing and no two results have to be the same.
Conclusion
Don’t believe the hype. MySQL still has a place, even in 2014 and NoSQL has its place as well, but isn’t a drop-in replacement for MySQL or any other database unless you’re working with data that would suit a NoSQL database instead of MySQL.