Tuesday 20 June 2017

MongoDB Vs MySQL : STORAGE WARS



Data storage enthusiasts have varied opinions when it comes to MySQL vs MongoDB. Although MySQL and MongoDB represents two sides of the argument concerning data storage, they both are open source products distributed under a version of the GNU GPL. The only difference is while MySQL is tried and tested relational databased MongoDB is non-relational or No SQL database.

To understand the arguments, we need to under the basic difference i.e. the relational and non-relational database. Relational database has been here for quite some time and works well with relational data sets such as the intersection point defined by Venn diagram. For example, one may use the famous select statement to find those students who have scored more than 80% from all the sections on a specific subject in the last two years.

On the other hand, non-relational database encompasses a wide variety of different database technologies that were developed in response to the demands presented in building modern applications. Data is stored in Key-value pairs, rather than the traditional table. For example

Student_name Stephanie Chan

Student_gender Female

Student_Total_Percentag 82%

As you can see in NoSQL database, the field and its value are stored as one record and enables faster retrieval. NoSQL databases are good at scaling and poor at data integrity while Relational Databases tends to perform poorly over huge volume of data yet good with data integrity. 


Imagine Amazon, Google or other popular sites, they prefer quick response and availability to security and integrity. That doesn’t mean one is better than the other. What NoSQL / MongoDB did was address the scalability need which has not met by relational databases such as MySQL. 

souce:developer.com

MongoDB, the document-oriented and open source database stores documents with the help of dynamic schemas, unlike the relational databases that make use of rows and tables for storing the document. While it is still new in the data storage industry when compared to other traditional databases, like MySQL, it has drawn a good attention for its ability to calculate MapReduce and distributed key value store.

MySQL is a relational database originally developed by MySQL AB, now owned by Oracle. MySQL is mostly used in to store data for web applications, typically as part of the popular LAMP stack (Linux, Apache, MySQL, PHP/ Python/ Perl). MySQL has over the years added various features so that it is today a full-featured RDBMS. In addition to the standard features such as tables, indexes, stored procedures it also offers updatable views, triggers, cursors, query caching, partitioned tables and clustering.

Source:Gitbook


Conclusion:

When compared to relational databases, NoSQL/ MongoDB databases are more scalable and provide superior performance, and their data model addresses several issues that the relational model is not designed to address:

  • Large volumes of rapidly changing structured, semi-structured, and unstructured data
  • Agile sprints, quick schema iteration, and frequent code pushes
  • Object-oriented programming that is easy to use and flexible
  • Geographically distributed scale-out architecture instead of expensive, monolithic architecture
The important aspect is to keep in mind that a non-relational database is not better than a relational one. If the database in question has a lot of relations and normalization, it might make little sense to use something like MongoDB. It's all about finding the right tool for the project. 

Source:Hackernoon
Instead of jumping into MongoDB just because it’s on the edge rather than the actual need for the project would be an unwise decision. If you have questions regarding Database Management, Data warehousing, Data migration or simply wondering whether to choose MySQL or MongoDB, please contact us here. Thank you for stopping by and have a fantastic day!


   Srivatsan Aravamudan

   General Enquiries:info@psibertech.com.sg
   Sales Enquiries:sales@psibertech.com.sg
   Telephone:+65 62689551
   Fax:+65 62689858
   Business Analyst - Snr Software Consultant.

  LinkedIn

No comments :

Post a Comment

Related Posts Plugin for WordPress, Blogger...

Share Buttons