Middleware (3) NoSQL and middleware nosql
The most common interpretation of NoSQL is non-relational or not only SQL. It can be seen from the field meaning that it refers to a general term of non-relational databases.
Background of the emergence of NoSQL
With the development of the distributed architecture of large websites, traditional relational databases are insufficient in the following aspects:
1. High-concurrency read/write to the database
With the popularity of distributed architecture and microservices, the database load is very high. If the query requirement is +/s, however, for write operations of +/s, the performance of relational databases is very low.
2. Storage and query of massive data
When hundreds of millions of data records are generated every day, for relational databases, the query performance is very low in a data table with hundreds of millions of records.
3. high scalability and availability
For relational databases, upgrading and scaling are very difficult.
The emergence of NoSQL addresses the above issues.
NoSQL Classification
NoSQL has four types: key/value databases, document databases, column-store databases, and graph databases.Key/value databases represented by Memcached and redis, and document databases represented by MongoDb are the most commonly used in the project.
Key/value database representatives: Memcached and Redis.
Representative of document-type Database: MongoDb.
Advantages of NoSQL
Since NoSQL makes up for the shortcomings of relational databases, its advantages are very obvious:
1. process massive data.
2. It is easy to expand because of its non-relational nature.
3. High Availability. For example, redis can form a cluster and provide service.
So does NoSQL have no disadvantages? No, for example, it does not have relational data transactions.
Summary
1. NoSQL cannot replace relational databases. It can only be said to make up for the shortcomings of relational databases. The core business still needs to use relational databases due to its ACID characteristics.
2. ElasticSearch can be a better framework for big data processing ).