Advantages and disadvantages of relational database
Advantages:
- Can do transaction processing, so as to ensure the consistency of data;
- Can be a join, such as multi-table query;
- Because of SQL standardization, the cost of data updates is small (the same fields are basically only one place).
Disadvantages:
- The write processing of large amount of data is not easy;
- If the table data volume is too large, it is not easy to do index or table structure update;
- When the field is not fixed, the application will be difficult;
- Not fast enough for simple query processing;
- Expansion costs are expensive.
The pros and cons of NoSQL databases
Advantages:
- Cost: NoSQL databases are simple and easy to deploy, basically open source software, and do not need to spend a lot of money like Oracle to purchase, compared with the relational database price is cheap;
- Query speed: NoSQL database stores data in cache, relational database stores data in hard disk, natural query speed is far less than NoSQL database;
- Format for storing data: NoSQL storage format is key,value form, document form, picture form and so on, so can store the basic type and object or the collection of various formats, and the database only supports the basic type;
- NoSQL databases are distributed and easy to scale.
Disadvantages:
- No transaction processing;
- No support for SQL is provided;
- Although disk scanning is reduced, it also results in redundancy of the data.
Summarize
relational databases and NoSQL databases are not opposites but complementary relationships, that is, using relational databases in general, and using NoSQL databases when it is appropriate to use NoSQL, to make up for the lack of a relational database for NoSQL databases.
relational database and NoSQL database