Apsaradb for MongoDB basic series-Introduction to apsaradb for MongoDB

Source: Internet
Author: User
The first two articles reprinted the nosql article, which introduced the benefits of nosql and analyzed the advantages and disadvantages between nosql and relational databases.


In fact, nothing is absolutely good, absolutely bad; as long as it is appropriate, it is good. When appropriate, use the appropriate technology, that is, OK [if you are well off, it will be sunny]
Starting from this article, we will be familiar with nosql, a simple database-MongoDB. From the table in the previous blog, we can see that MongoDB is a nosql database and also a document storage database. Mongdb is a product between relational databases and non-relational databases. Here, bson, a data organization similar to JSON, is used, but bson has data types not available in JSON. Features of mongdb:
* It is designed for set storage and is easy to store object-type data. * Free mode. * Supports dynamic query. * Full indexes are supported, including internal objects. * Query is supported. * Supports replication and fault recovery. * Use efficient binary data storage, including large objects (such as videos ). * Automatic fragment processing to support the scalability at the cloud computing level. * Supports Ruby, Python, Java, C ++, PHP, C #, and other languages. * The file storage format is bson (a json extension ). * It can be accessed through the network.

Oriented to set storage: In MongoDB, there is no concept of tables and rows in relational databases. In relational databases, we usually operate on the data in the tables Table. For example, retrieve a row of records or the data of the entire table. MongoDB does not exist, but we have mentioned that MongoDB is like a relational database. Therefore, the storage structure of apsaradb for MongoDB can be understood by the relational database thinking team. Collections integrated in MongoDB can store multiple documents. Each document is similar to a row in a relational database. Collections are similar to data tables in relational databases. MongoDB. Collection = relational database. Table mongodb.collection.doc ument = relational database. Table. Record
Free mode: The Data Structure Stored in MongoDB is random. A document can be an integer, a document can be a string, and a document can also be text. However, in a relational database, fields in a table are fixed. If the first field is an integer, you must enter an integer instead of a common string (except a numeric string]

The storage format: during the operation, we use the bson format, similar to the JSON format, in the form of key-value pairs; for example: {"ID": 2, "name ": "James "}
The multi-language driver mongdb is C ++, But it supports drivers in multiple languages. Download the corresponding driver to use the Dongdong in mongdb.
Index features: I see an article on the Internet. If mongdb does not use indexes, the operation efficiency is not as efficient as that of relational databases. However, once an index is added, it is much more efficient than adding an index to a relational database. I did not personally practice the comparison between them. I can see from the Internet that I only emphasize the characteristics of his index here;
Comparison between MongoDB and Oracle (from network)

Compare MongoDB with MySQL (from the Network), insert 1 million records and perform concurrent queries for 100 users. MySQL drops the table every time, and MongoDB deletes the data directory every time. During the query, records are recorded three times in a row starting from the second query.








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.