Directing a profile

What is the mongo

MongoDB is a cross-platform, document-oriented database that is one of the most popular NoSQL database products. It is between relational database and non-relational database, the most feature-rich non-relational database, the most like relational database products. It supports a very loose data structure in the JSON-like BSON format, so it can store complex data types.

MongoDB is a database based on distributed file storage. Written in C++ language. Designed to provide scalable high-performance data storage solutions for WEB applications.

MongoDB is a product between relational database and non-relational database. Among non-relational databases, it has the most rich functions and is the most like relational database.

The official MongoDB website is http://www.mongodb.org/

 

Mongo characteristics

The biggest feature of MongoDB is that the query language it supports is very powerful. Its syntax is similar to object-oriented query language, and it can almost achieve most of the functions similar to single table query of relational database, and also supports the establishment of index to data. It is a collection – oriented, schema – free document database.

The specific characteristics are summarized as follows:

(1) Collection oriented storage, easy to store object type data

(2) Mode freedom

(3) Support dynamic query

(4) Support full index, including internal objects

(5) Support replication and fault recovery

(6) Use efficient binary data storage, including large objects (like videos, etc.)

(7) Automatic handling of fragments to support cloud level scalability

(8) Support Python, PHP, Ruby, Java, C, C#, Javascript, Perl and C++ language driver, community also provided for Erlang and. NET and other platform drivers

(9) File storage format is BSON (an extension of JSON)

MongoDB architecture

The logical structure of MongoDB is a hierarchical structure. Is mainly composed of:

Document, collection and database are composed of three parts. The logical structure is user-oriented

The logical structure is used by users to develop applications using MongoDB.

(1) document of MongoDB, equivalent to a row of records in a relational database.

(2) Multiple documents form a collection, which is equivalent to the tables of a relational database.

(3) Multiple collections, logically organized together, is the database.

(4) A MongoDB instance supports multiple databases.

The hierarchical structure of document, collection and database is shown as follows:

  

The following table compares the logical structure concepts of MongoDB and MySQL databases

MongoDb Relational database Mysql
Database (databases) Database (databases)
Collection (collections) Table (table)
The document (the document) Row (row)

References:

www.runoob.com/mongodb/mon…