First, relational database
The most typical data structure of a relational database is a table, which consists of a two-dimensional table and the linkage between them.
Advantages:
1, easy to maintain: all use the table structure, the format is consistent;
2, easy to use: SQL language Common, can be used for complex queries;
3. Complex operations: Supports SQL, can be used for a table and a very complex query between multiple tables.
Disadvantages:
1, poor reading and writing performance, especially the high efficiency of large data read and write;
2, fixed table structure, the flexibility of a little owed;
3, high concurrent reading and writing requirements, traditional relational database, hard disk I/O is a big bottleneck.
Second, non-relational database
Non-relational database is strictly not a kind of database, it should be a collection of data structure storage method, can be document or key value equivalence.
Advantages:
1, the format is flexible: The format of storing data can be key,value form, document form, picture form and so on, document form, picture form and so on, use flexibly, the application scene is wide, and relational database only supports basic type.
2, Fast: NoSQL can use hard disk or random memory as a carrier, and relational database can only use hard disk;
3, high scalability;
4, Low cost: NoSQL database deployment is simple, basically open source software.
Disadvantages:
1, do not provide SQL support, learning and use of high cost;
2, no transaction processing;
3, the data structure is relatively complex, complex query aspect slightly owes.
Classification and comparison of non-relational databases:
1. Document Type
2, Key-value type
3. Column-type database
4. Graphic database
Comparison of relational database and non-relational data