What are the differences between MongoDB and MySQL?

devquora
devquora

Posted On: Feb 22, 2018

 

The various differences between MongoDB and MySQL are listed below:
  • In terms of data representation– in MySQL, we represent data in the form of tables and rows. Whereas, in MongoDB data is represented as collections of JSON documents.
  • Querying– in SQL, we put together a string in the query language which is then parsed by the database system. Whereas, in MongoDB, object querying is used.
  • Relationships– in MySQL, the relational database is only the Join operation which allows us to perform queries across multiple tables. Whereas MongoDB does not support join operation but can support multi-dimensional data types such as arrays, etc. in this, embedding is a process in which we place one document inside the other.
  • Transactions– MySQL supports atomic transactions which are the ability to contain multiple operations within a transaction. Whereas, MongoDB does not support transactions.
  • Schema definition– in MySQL, you need to define your tables and columns before storing anything. Whereas, in MongoDB, you don’t need to define a schema.

    Related Questions

    Please Login or Register to leave a response.

    Related Questions

    MongoDB Interview Questions

    What do you know about MongoDB?

    MongoDB is a cross-platform document-oriented database program which is open source and free in nature. It can also be..

    MongoDB Interview Questions

    List the important features of MongoDB.

    The important features of MongoDB are listed below: –Aggregation framework– it uses aggregation framework for the..

    MongoDB Interview Questions

    Which all languages can be used with MongoDB?

    Here goes a list of the languages which can be used with MongoDB: – C C++ C# Java Node.js Perl PHP Python Ruby Scala..