Overview of NoSQL non-relational databases

NOSQL concept

  NoSQL (NoSQL = Not Only SQL), which means "not just SQL", is a brand-new database concept that refers to non-relational databases . Redis is a typical representative of NOSQL non-relational databases


The difference between relational database and non-relational database:

  1. Characteristics of relational database (database represented by Mysql Oracle SqlServer)
  1. The data is composed of tables, and there is a relationship between these tables and tables (one-to-one, one-to-many, many-to-many)
  2. Data are present the hard disk on each visit, the required data is read from the hard disk into memory in
  1. Features of non-relational database (NOSQL) (Redis)
  1. Data is a key-value pair : key-value key-value form (can be understood as equivalent to a large Map)
  2. The data is stored in the memory . When the need is met, the data can also be stored on the hard disk (Redis persistence) (meeting the demand-the memory is fast enough, and it will be closed, and some data will be stored on the hard disk)

Why NoSQL is so important

  Compared with the three high problems of relational databases:

  1. High concurrency (when the amount of access per second is high, the performance of the relational database will encounter a bottleneck, at this time the database operation will become more time-consuming)
  2. High efficiency (slow reading and writing speed-reading data from the hard disk is slow)
  3. High expansion (not able to modify the table at will, when adding a field to the data, a lot of table structure needs to be changed)

  In order to solve the problem of relational database when NoSQL appeared, NoSQL database (Redis) can solve all the three high problems (support high concurrency, high efficiency (read directly from memory), high expansion (key-value pair form, simple data, data There is no relationship between them, so you can add or delete fields at any time))
NoSQL has the characteristics of high scalability, distributed computing, low cost, flexible architecture, semi-structured data, etc.

NoSQL application scenarios

  1. The data model is relatively simple
  2. Need for more flexible IT systems
  3. Higher database performance requirements
  4. No need for high data consistency
  5. For a given key, it is easier to map complex values ​​in the environment.

    In short, there is a small concurrent business volume, and both relational and non-relational types can be used. The business has complex data associations, and the relational database is just simple key-value data. NoSQL is better.

Guess you like

Origin blog.csdn.net/qq_40542534/article/details/108707784