The difference between 2-3-NOSQL databases and now mainstream

Nosql stands for Not Only Sql

1. Storage: relational database is a table format. While the opposite is Nosql database, data is typically stored in the centralized

2. The storage structure: relational database is a structured data corresponding to, but more difficult to modify the data. Nosql the database based on dynamic structure, can easily adapt to changes in data types and structures.

3. Storage Specification: relational database storing data for a higher standardization, the data table is divided into a minimum to avoid duplication, streamlined space utilization is obtained. Although management it is very clear, but a single operation designed to more than one table, the data management becomes a bit of trouble. Nosql plane while the data stored in the data set, the data may be repeated often. Rarely separated single database, but stored into a whole, this data easier to read and write block

4. Storage expansion: a relational database is to scale up, that want to improve processing power, faster computers to use. The database is Nosql scale, its natural storage is distributed, you can share the load by adding more general to the database server resource pool.

Scale is the number of servers has been extended high concurrent processing (capacity enhancement processing service)

The configuration nginx reverse proxy, forwarding server (configured ip) treated for rotation traffic (load balancer may be added to the distribution request)

Longitudinal extension is to increase the processing capacity of single, generally increases the processing capacity of the cpu

5. query: relational database to operate the database (that is, we usually say that SQL) through Structured Query Language. SQL database support CURD operations is very powerful, is the industry standard usage. And Nosql query operation data in block units, using structured query language (UnQL), it is not standard.

6. Transaction

Relational database to follow the ACID rules, Nosql database follow the principle BASE (Basic available (Basically Availble), soft / flexible Affairs (Soft-state), eventual consistency (Eventual Consistency)). Because of the strong data consistency relational database, it is a good support for the transaction. Relational database support for fine-grained control over atomic affairs, and easy to roll back the transaction. The database is in Nosql (consistency, availability, partition tolerance) optionally two CAP, because based on a distributed system nodes, it is difficult to satisfy all, so the transaction support is not very good, although you can also use the transaction , but not Nosql bright spot.

7. Performance

  Relational database to maintain data consistency paid a heavy price, read and write performance is relatively poor. In the face of high concurrent read and write performance is very poor, in the face of massive data when the efficiency is very low. Nosql format is stored in the key-value type, and stored in memory, it is very easy to store, and the data consistency is the requirement weak. Nosql do not need to parse sql, improved read and write performance.

8. License

  Relational databases often have SQL Server, Mysql, Oracle. Mainstream Nosql database has redis, memcache, MongoDb. Most relational databases are paid and the price is expensive, the cost is large, but Nosql databases typically are open source.

 

Relational Database

advantage:

1. Transaction Processing - maintain data consistency

2. As standardized as the premise, the updated overhead data is very small (substantially the same field and only one);

3. You can perform complex queries Join and so on.

4. Based on rigorous mathematical

5. SQL standardization

6. Transaction

Shortcoming

1. Performance

2. longitudinal extension

3. Does your

 

nosql

advantage

1. A simple extension (clusters)

2. High performance (they can handle large amounts of data over): examples are the Redis mainly, because of its simple logic, and memory-operation, such that its performance is very good, a single node can handle more than 100,000 times per second read and write operations;

3. Low cost: This is the most common characteristics of a distributed database, because the main are open source software, no expensive License costs;

4. The flexible data model. Without prior establishment of a field to store data.

5. availability.

Disadvantages:

1. does not provide support for SQL is: If you do not support the industry standards such as SQL, will have a certain degree of learning and application migration costs to users;

2. does not support transactions

3. The existing products are not mature enough: most products are still in the start-up period, and relational database decades of improvement is quite different;

4. difficult to ensure data consistency

The more complex calculations can not support

6.NoSQL not entirely secure and stable, because it is based on memory, a power failure or machine malfunction data it is easy to lose data, its persistence capability is limited, and it is such a problem does not arise disk-based database

Published 137 original articles · won praise 2 · views 20000 +

Guess you like

Origin blog.csdn.net/m0_37302219/article/details/104856883