About MongoDB Schema-free vs MySQL DDL

Source: Internet
Author: User
Tags json mongodb mysql

The document database (Document-orient db) supports Schema-free, and his one-line record format is: {"name": "Design", "value": "Straight"}}, is actually using key/ The MONGO of value storage uses Bson binary encoding, so space should be more than JSON, parsing in JSON. Each document contains metadata information, which is not forced to use the same format between documents, and they also support a variety of indexes, at a convenient level that is more triumphant than MySQL. On the MySQL table design and MongoDB scheme free design comparison, can refer to the following: http://blog.nosqlfan.com/html/2985.html however, due to the large number of metadata redundancy, space is very serious waste.

For MySQL, the typical relational database, the impact of DDL on Io can not be overlooked, which is often caused by the data storage format.

The Innodb storage engine is already trying to modify the level two index, which means that data cannot be copied during the DDL process, but the table is locked during this period. This is handy for using the online schema change OSC.

The common practice is to do DDL operations on the repository now, and then restore the original after the master-slave switch, and so on.

Is that the relational storage engine stores metadata and data separately, and some modifications to the metadata require that all data be modified. One way to avoid this problem is to put metadata and data together, which is the popular schema-free in the NoSQL field.

This column more highlights: http://www.bianceng.cn/database/MySQL/

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.