1.mongodb is document-based (BSON, JSON-like key-value pairs to store), not table-based, easy to scale horizontally, the internal related data can be put together to improve the operational performance of the database. If you want to create a new document type, you don't have to tell the database about the structure of the data in advance and store it directly in the database. Data that stores object types easily.
2. A significant difference from a relational database: the extensible table structure, which means that the fields owned by document (a row of records) in collection (table) can vary.
3. The supported query language is very powerful, and its syntax is somewhat similar to the object-oriented query language. MongoDB does not have a join statement.
A join operation in a traditional relational database may produce a virtual table with a Cartesian product that consumes more system resources, and MongoDB's collection of document objects is arbitrary structure, and we can design the data model of the delivery number to avoid such requirements as much as possible.
4. Support Cloud computing Features:
Native extensible architecture that provides the technology needed for cloud storage by enabling fragmentation and horizontal scaling;
It automates the management of "replica sets" to maintain data availability and integrity;
Aggregation operations, especially MapReduce, can be manipulated on a shard cluster to prepare for big data analysis.
5. Most NoSQL databases currently do not support transactions. Reason: , &N Bsp , &NB Sp , &NB Sp , &NB Sp , &NB Sp , &NB Sp &NBsp , &NB Sp
Most NoSQL systems have to be able to scale across multiple machines, and the data in the database is distributed across different machines. A write operation in one transaction may access data from multiple partitions (on multiple machines), which is "distributed transaction."
Ensuring atomicity in distributed transactions requires that the machines involved in the transaction work together. Each machine must be sure that the transaction can be successfully committed on the other machine. Also, a protocol is required to ensure that the machine involved in the transaction write operation does not fail until the state of the write data is stable.
This collaborative process not only consumes a lot of resources, but also increases database request latency. The bigger problem is that other operations cannot read the data written by the transaction until the collaboration process is complete. Concurrent transaction latencies cause other transaction delays that overlap the time of the deferred transaction, resulting in system "blocking (Cloggage)".
The distributed collaboration required for distributed transactions can severely affect the performance of the database system, including transaction throughput and transaction latency. As a result, most NOSQ systems have chosen not to support transactions
from
Replica sets and shards are the most distinctive features of MongoDB:
The ① replica set enables database backup and automatic failover.
At least include the primary node, the secondary node, the arbiter node (the quorum node) three nodes, the primary node is responsible for data read and write, secondary section backup primary node data. When the primary node fails, arbiter selects a node from the secondary node when the primary node.
② fragmented clusters for distributed storage and efficient read-write separation.
Each member of a replication set is a MongoDB instance, but when deployed on a shard, each slice is a copy set.
A shard is not on a machine. The overall principle of deployment is to make the primary node in each slice (replica set) separate from the secondary node and the Arbiter node and the configuration server, and when any of the machines goes down, the cluster will function properly.
MongoDB Introduction and Features