relational database NOSQL
Function:
Nosql
Simple function
Basically only primary key queries are supported, and some NoSQL supports non-primary key queries (although non-primary key queries are slow to perform), and few NoSQL support two-level indexes
Correlated queries are not supported, and NoSQL cannot support the need for complex correlated queries
does not support acid, only supports single record level atomic operation, if there are high consistency requirements of the scene, NoSQL difficult to support
No schema multiple records can have a different number of fields, storage convenience
It is convenient to expand the partition by itself
relational database
Complex function
Supports primary key queries and other field queries (build Level two index)
Support for Correlated queries
Supports acid
Have schema constraints
Self-sharding-free function
Performance:
Nosql
High performance ratio
relational database
Performance is low, because it to ensure transactional consistency to do a lot of checks, locking and other operations, so very slow, and the associated query is also very complex, resulting in low efficiency, often query business does not go index, query speed is very slow, mainly because of the complexity of the performance of the lower
Summary
Choosing a nosql requires the following 2 prerequisites:
1. No acid required
2. No correlation query required
If you need the above two functions, you cannot select NoSQL
Here are the full criteria for choosing a nosql:
1 table structure is not fixed "because the relational database table structure is fixed, this is the only point that NoSQL has a better ability than a relational database (the author's personal knowledge, because NoSQL's high performance is at the expense of consistency, etc.)"
relational databases and NoSQL comparisons