Relational and non-relational databases

Do you know relational databases and non-relational databases are often asked during interviews?

Usually we use relational databases. This is the database leaderboard

Most are relational databases.

Advantages of relational databases :

1. Easy to understand: The two-dimensional table structure is a concept that is very close to the world we know, and the relational model is easier to understand than other models     

2. Easy to use: use sql to make it easy to operate.

3. Easy to maintain: rich integrity (entity integrity, referential integrity and user-defined integrity) greatly reduces the probability of data redundancy and data inconsistency

Disadvantages of relational databases :

1. High concurrent read and write requirements: tens of thousands of reads and writes per second are a big problem for hard disk I/O.

2. Efficient reading and writing of massive data: The query of massive data in one table is inefficient.

3. Scalability and availability: The fixed table structure makes it difficult for the database to expand.

4. In order to maintain consistency, poor reading and writing skills

 

Advantages of non-relational databases:

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.

Disadvantages of non-relational databases:

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;

 

Note 1: Database transactions must have ACID characteristics, ACID is Atomic atomicity, Consistency consistency, Isolation isolation, Durability persistence.

Note 2: The persistent storage of data, especially the persistent storage of massive data, still requires a relational database.

Guess you like

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