What are the differences between MySql and MongoDb?

MySQL

MySQL (My Structures Query Language) is an open- source relational database management (RDBMS). It is owned and developed by Oracle Corporation which has source code and is available under the terms of the General Public License and also under a variety of patented contracts. It’s firstly introduced in 1995 which is under the GNU GPL License.

MySQL gained popularity in the web application world due to its LAMP. LAMP (Linux-Apache-MySQL-PHP) is a software stack which can be found in several web applications. MySQL uses SQL (Structured Query Language) for database access and pre-define the database schema, which is based on requirements and make rules to manage the relationships between fields in tables.

MongoDB

It is one of the most popular NoSQL solutions, which is used to help in data storage and the solution can certainly store documents on the World Wide Web. It was founded or established in the year 2007 by Eilot Horowitz, Dwight Merriman, and Kelvin Ryan This type of database was first introduced or released in February in the year 2009 and the renamed of the company is MongoDB Inc in the year 2013.

The main feature of MongoDB is data storage in a dynamic schema, which is as opposed to the tabular DB characteristic of SQL. It is mainly based on JSON (Java Script Object Notation) format, which is used for the transfer of data between web applications and servers using a human readable format, which was designed with high availability and scalability.

Differences between MySQL and MongoDB

There are several differences between MySQL and MongoDB, which are discussed below –

  1. The main difference is in the representation of data in two databases. MySQL represents the data in tables and rows while MongoDB represents the data in a collection of JSON documents.
  2. If using a MySQL then make one table for comments and another for posts to make a blog while in MongoDB, there is only one array of comments and one collection of posts within a post.
  3. The main benefit in MySQL is the JOIN operation. This operation is used for the querying across several tables. MongoDB does not use this operation and supports multi-dimensional data types.
  4. The performance of MongoDB is better than MySQL due to MongoDB give up JOINS and has outstanding presentation analysis tools whereas in MySQL, its poor performance particularly in ORM application.
  5. In MySQL, it may use several operations within a transaction and also used in a single operation and also supports atomic transactions while MongoDB does not support atomic transactions and single operation is occurred.
  6. The function of RDBs on a paradign, which is called as ACID (Atomicity, Consistency, Isolation, and Durability) in MySQL while it is not present in MongoDB database.

4 Comments Add yours

  1. Nabeela's avatar Nabeela says:

    I am hearing these terms for the first time….

    Liked by 1 person

    1. daneelyunus's avatar daneelyunus says:

      Thanks for reading my post

      Liked by 1 person

  2. SeekersFinders's avatar Blanca says:

    I am currently studying mongodb, cassandra and redis. Thanks for sharing this.
    You provide such a wide range of topics im glad i came accross your blog

    Liked by 1 person

    1. daneelyunus's avatar daneelyunus says:

      Most welcome, thanks for visiting my website and reading my post

      Liked by 1 person

Leave a Reply