Latest Tutorials| Questions and Answers|Ask Questions?|Site Map



Home Databases What is the difference between MongoDB and MySql?

Related Tutorials


 
 

Share on Google+Share on Google+

What is the difference between MongoDB and MySql?

Advertisement
The difference between MongoDB and MySql is that the in former one whole document is read while in latter rows and columns are read. If one is using a simple database where everything is indexed properly than MySql will work perfectly but if a data is complex and you want to store serialized arrays or JSON objects then MongoDB is advised.

The difference between MongoDB and MySql is that the in former one whole document is read while in latter rows and columns are read.

Embedded documents, schema-less database, horizontal scalability by anti-sharding are the features of MongoDB.

If one is using a simple database where everything is indexed properly than MySql will work perfectly but if a data is complex and you want to store serialized arrays or JSON objects then MongoDB is advised.

MySql has JOIN operation, which allows it to work across multiple tables while MongoDB does not support JOIN operation.

In MySql data model is relational while in MongoDB data model is document based.

MySql represents data in tables and rows on the other hand MongoDB represents data as collections of JSON documents.

MySql supports transactions whereas MongoDB does not support transactions.

MySql is slow in process while MongoDB is blazingly quick.

MongoDB uses object querying while whereas in MySql one has to put together a string in the query language that is parsed by the database system.

In MySql one can perform queries across multiple tables while in MongoDB embedding is used where one document is placed inside other.

In MySql one must define rows and columns in which you are working, whereas is MongoDB schema is not defined.

MongoDB is better for unstructured data, whereas MySql is better for structured data.

In MongoDB Data Types are string, int, double, boolean, date, bytearray, object, array, others whereas in MySql Data types are link.

MongoDB Dynamic query method uses object-based query language on the other hand MySql Dynamic query method uses SQL (Structured Query Language).

MongoDB requires a greater memory and disk space then MySql.

MongoDB requires huge RAM and it consumes a lot of disk space because it keeps as much data in RAM as possible. MySql on the other hand has less RAM usage.

Advertisements

If you enjoyed this post then why not add us on Google+? Add us to your Circles



Liked it!  Share this Tutorial


Follow us on Twitter, or add us on Facebook or Google Plus to keep you updated with the recent trends of Java and other open source platforms.

Posted on: April 18, 2013

Related Tutorials

Discuss: What is the difference between MongoDB and MySql?  

Post your Comment


Your Name (*) :
Your Email :
Subject (*):
Your Comment (*):
  Reload Image
 
 
Comments:0
DMCA.com