Recently consider migrating order history data from Oracle database to NoSQL database for historical data query and analysis, one day tens data. Intended to use the MongoDB database. Use Nodejs to do the query and Statistics API, the demand for concurrent requests low, do not know if there is a predecessor such played. We now only use Mongodo to store log data for application failure analysis.
Suppose there are predecessors who do a similar historical database query and data analysis, can communicate under. Your choice of NoSQL libraries and upper-level development languages.
1.mongodb Introduction
MongoDB (named from "Humongous") is a scalable, high-performance. Open source, mode free, document-oriented database.
It is written using C + +. MongoDB Features:
A. Collection-oriented storage: suitable for storing objects and data in JSON form.
B. Dynamic query: MONGO supports rich query representations. Query directives use a JSON-style tag to easily query embedded objects and arrays in a document.
C. Full index support: Contains embedded objects and arrays in the document. The query optimizer of MONGO parses the query expression and generates an efficient query plan.
D. Query monitoring: MONGO includes a monitoring tool for analyzing database operational performance.
E. Replication and self-active failover: The MONGO database supports data replication between servers and supports replication between master-slave mode and server.
The primary purpose of replication is to provide redundancy and self-active failover.
F. Efficient traditional storage: supports binary data and large objects such as photos or pictures.
G. Self-active sharding to support cloud-level scalability: Self-active sharding supports a level of DB cluster, which dynamically joins additional machines.
2.mongo Use Cases
The main goal of MongoDB is to set up a bridge between key/value storage (which provides high performance and high scalability) as well as traditional RDBMS systems (rich functionality), combining the advantages of both. The MONGO is suitable for the following scenarios:
A. Site data: MONGO is ideal for real-time inserts, updates and queries, as well as the replication and high scalability required for site real-time data storage.
B. 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 built by MONGO can avoid overloading the underlying data sources.
C. Large-size, low-value data: Storing some data in a traditional relational database may be more expensive than before. Very many program apes tend to choose traditional files for storage.
D. Highly scalable scenario: MONGO is well suited for databases consisting of dozens of or hundreds of servers.
E. Storage for objects and JSON data: MONGO's Bson data format is ideal for storing and querying document formats.
Not suitable for the scene:
A. A highly functional system: such as a bank or accounting system. The traditional relational database is still more suitable for applications that require a large number of atomic complex transactions.
B. Traditional business intelligence applications: a BI database for a specific problem will produce highly optimized query methods.
For such applications, the Data warehouse may be a more appropriate choice.
C. A problem that requires SQL.
MongoDB applicable and non-applicable application scenarios