The difference between relational and non-relational databases

Since I haven't understood a thing from the conceptual level for a long time, most of the people who understand the database now focus on performance issues. Of course, it is very important. Sometimes it is more important to understand the concept. 

                                                                                                                                        ---Foreword

Reprint address:  Reprint source

1. Relational databases establish the relationship between tables through foreign key associations. 
2. Non-relational databases usually refer to data stored in the database in the form of objects, and the relationship between objects is through the attributes of each object itself. to decide



database
type
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 a relational database is the consistency of transactions;
3. Simply put, a relational model refers to a two-dimensional table model,
while a A relational database is a data organization composed of two-dimensional tables and the connections between them.
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 the probability of data redundancy and data inconsistency;
4. Supports SQL, which can be used for complex queries.
1. The huge price paid for maintaining consistency is its poor read and write performance;
2. Fixed table structure;
3. High concurrent read and write requirements;
4. Efficient read and write 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. It does not need to go through the analysis of 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
; Image form, etc., document form, image form, etc., while relational 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;


Guess you like

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