1,MONGODB introduction;
MongoDB is a high-performance, open-source, modeless document-based database that is a popular one in the current NoSQL database. It can be used in many scenarios to replace the traditional relational database or key/value storage methods. MONGO using C + + development
Characteristics:
- High performance, easy to deploy, easy to use, easy to store data. The main features are:
- For collection storage, easy to store data for object types.
- Mode of freedom.
- Supports dynamic queries.
- Supports full indexes, including internal objects.
- Support Queries.
- Supports replication and recovery.
- Use efficient binary data storage, including large objects such as video.
- Automatically process fragmentation to support scalability at the cloud level
- Drivers for Python,php,ruby,java,c,c#,javascript,perl and C + + languages are supported, and drivers for Erlang and. NET platforms are also available in the community.
- The file storage format is Bson (an extension of JSON).
- can be accessed over the network.
Function:
- Collection-oriented storage: suitable for storing objects and data in JSON form.
- Dynamic Query: The MONGO supports rich query expressions. Query directives use a JSON-style tag to easily query objects and arrays embedded in the document.
- Full index support: includes embedded objects and arrays in the document. The query optimizer of MONGO parses the query expression and generates an efficient query plan.
- Query monitoring: MONGO contains a monitoring tool for analyzing the performance of database operations.
- replication and automatic failover: The MONGO database supports data replication between servers and supports replication between master-slave mode and server. The primary goal of replication is to provide redundancy and automatic failover.
- Efficient Traditional storage: supports binary data and large objects (such as photos or pictures)
- Auto-sharding to support cloud-scale scalability: automatic sharding supports a level of database clustering, adding additional machines dynamically.
Applicable occasions:
- Website data: MONGO is ideal for real-time inserts, updates and queries, as well as the replication and high scalability required for real-time data storage on the site.
- Caching: Because of its high performance, MONGO is also suitable as a caching layer for the information infrastructure. After the system restarts, the persistent cache layer built by MONGO can avoid overloading the underlying data sources.
- Large, low-value data: Storing some data in a traditional relational database can be expensive, and many times programmers often choose traditional files for storage.
- Highly scalable scenario: The MONGO is ideal for databases made up of dozens of or hundreds of servers. Built-in support for the MapReduce engine is already included in the roadmap for MONGO.
- Storage for objects and JSON data: The MONGO Bson data format is ideal for storing and querying in a document format.
2,nosql
NOSQL, the full name is not-only Sql, refers to the non-relational database. The next generation of databases mainly solves several key points: non-relational, distributed, open-source, horizontally extensible. The original goal was for large-scale Web applications, which began in the early 2009 with features such as freedom of mode, support for simple replication, simple APIs, eventual consistency (non-acid), high-capacity data, and so on. NoSQL is the most used when the number of key-value storage, of course, there are other document-type, column storage, graph database, XML database and so on.
MongoDb Windows Linux Platform Environment installation