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

MOngoDB Inc developed MongoDB, which is an open-source database program. 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. MongoDB uses JSON (JavaScript Object Notation) dynamic schemas and is published under a combination of the GNU Affero General Public License and the Apache License, 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 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