MySQL is a relational database. MongoDB is NoSQL Database.
Following are the important differences between MySQL and MongoDB.
Sr. No. | Key | MySQL | MongoDB |
---|---|---|---|
1 | Owned/Developed By | MySQL is owned by Oracle. | MongoDB is developed by MongoDB Inc. |
2 | Data Storage | MySql stores data in tabular format as records in table. | MongoDB stores records as documents. |
3 | Language | SQL, Structured Query Language is used to query database. | Dynamic Schema. Predefined structure is defined for incoming data. |
4 | Design Objectives | No efficient replication and Sharding available. | High availability, Scalability, Replication and Sharding are inbuilt. |
5 | Terms | MongoDB uses Collection, Document, Field, Embedded Document, Linking etc. | MySQL uses Table, Row, Column, Joins etc. |
6 | Data Storage | MySQL stores data in forms of records in table. | MongoDB stores data in form of JSON like documents. |