Characteristics of relational and non-relational databases and their advantages and disadvantages

Types of characteristic advantage shortcoming





Relational Database

SQLite、Oracle、mysql


1. A relational database refers to a database that uses a relational model to organize data;

2. The biggest feature of relational databases is the consistency of transactions;
3. Simply put, the relational model refers to the two-dimensional table model, and a relational database is composed of two-dimensional tables and the connections between them. data organization.


1. Easy to understand: The two-dimensional table structure is a concept that is very close to the logical world, and the relational model is easier to understand than other models such as mesh and hierarchy;

2. Easy to use: the general SQL language makes it very convenient to operate relational databases;
3. Easy to maintain: rich integrity (entity integrity, referential integrity and user-defined integrity) greatly reduces data redundancy and data inconsistency The probability;

4, support SQL, can be used for complex queries.



1. The huge price paid for maintaining consistency is that its read and write performance is relatively poor;

2. Fixed table structure;
3. High concurrent reading and writing requirements;
4. Efficient reading and writing of massive data;



non-relational database

MongoDb、redis、HBase


1. Use key-value pairs to store data;

2. Distributed;
3. Generally, ACID features are not supported;

4. Non-relational database is not strictly a database, but a collection of data structured storage methods.



1. There is no need to parse through the sql layer, and the read and write performance is very high;

2. Based on key-value pairs, the data has no coupling and is easy to expand;
3. The format of data storage: the storage format of nosql is key, value form, document form, picture form, etc., document form, picture form, etc., while the relationship Type databases only support basic types.


1. No sql support is provided, and the cost of learning and use is high;

2. There is no transaction processing, and the support for additional functions such as bi and reports is not good;


注1:数据库事务必须具备ACID特性,ACID是Atomic原子性,Consistency一致性,Isolation隔离性,Durability持久性。

注2:数据的持久存储,尤其是海量数据的持久存储,还是需要一种关系数据库。


Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324947291&siteId=291194637