MongoDB and MySQL operation comparison table and the difference introduction _mongodb

Source: Internet
Author: User
Tags comparison table mongodb mysql in redis advantage

MySQL and MongoDB are open source common database, but MySQL is a traditional relational database, MongoDB is a relational database, also known as a document database, is a NoSQL database. They each have their own advantages, the key is to see where to use. So the SQL (full name structured Query Language) statement that we are familiar with does not apply to MONGODB, because SQL statements are standard languages for relational databases.

Take our project as an example, in the early projects, are using a relational database, used SQLSERVER,ORACLE,DB2, and then all turn to MySQL, the reason is simple: MySQL in good performance, with open source advantage. MySQL's transactional and high performance is our main consideration. Later, because the project to use the user system, that is, there will be a large number of user data to interact-mass storage, MySQL read and write speed will have a little bottleneck, so we think of the recent development of a strong nosql. With the development of the early memcache of NoSQL, there are many non relational databases, such as Redis,mongodb. After a period of testing, Redis and MongoDB read and write speed indeed than MySQL has a clear advantage. The write speed of MongoDB is approximately 2.5w/times per second.

MongoDB is stored in Bson structure (binary), which has obvious advantages to mass data storage. The following is a comparison of MongoDB's operating commands with MySQL.


Especially note: MongoDB Inserts multiple field syntax

> Db.user.insert ({id:1,name: ' Steve ', Sex: ' Male '}) correct
> Db.user.insert ({id:2},{name: ' Bear '},{sex: ' Female '}) error

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.