Redis NoSQL database is to the

Copyright: Copyright Rights Reserved https://blog.csdn.net/weixin_39921821/article/details/89813488

First, the introduction to Redis NoSQL and products with the

1. we usually see is the relational database, such as: Oracle, Mysql, MS SQLserver these are by relational tables to store data, and NoSQL is through this data in your data stored in memory is certainly not to in the form of a table stored.

2. Because the usual Web App project or project will appear in the "three high" high concurrency, high load, high scalability so consider use NoSQL

① high demand on concurrent read and write to the database

web sites to be generated in real time according to the user personalized information and dynamic pages provide dynamic information, so basically can not use dynamic pages static technology, database concurrency load is very high, often reach thousands of times per second read and write requests. Relational database SQL query to cope with tens of thousands of times barely hold up, but thousands of times to deal with SQL data write request, the hard disk IO has been unable to afford them. In fact, for ordinary BBS site, often there is a demand for high concurrent write requests, such as real-time statistics site in Xi'an user state, number of clicks recorded popular posts, counting tickets, so this is a fairly common requirement.

② demand on efficient storage and access to vast amounts of data (high-load)

Similar to Facebook, twitter, Friendfeed such SNS sites, user-generated user dynamic mass every day to Friendfeed for example, a month reached 250 million users dynamically, for relational databases, in a 250 million record table inside SQL queries, efficiency is extremely low and even intolerable. Another example of large-scale web site user login system, such as Tencent, Shanda, at every turn hundreds of millions of accounts, it is difficult to deal with relational databases.

③ high demands on database scalability and high availability

Web-based architecture in which the database is the most difficult to scale, and when the amount of a user when the application system and increasing traffic, you have no way of database and app server as the web server as simply by adding more node hardware and services to extend performance and load capacity. For many sites need to provide 24-hour service, the database system upgrade and expansion is very painful, often require maintenance and downtime data migration, database Why can not continue to add server nodes to achieve the expansion miles?

  NoSQL database is generated in order to solve large-scale data collection of multiple data types of challenges brought about, especially in big data application problems.

 For example: Mainstream NoSQL database products

Four classification 3.NoSQL database is as follows:

  • Key (Key-Value) stored in the database

      Related Products: Redis , Tokyo Cabinet / Tyrant ...

      Typical applications: high access content caching, mainly used for processing large amounts of data load.

      Data model: a series of key-value pairs

      Advantage: Quick Query

      Weaknesses: The lack of structured data storage

  • Column-store database

      Related Products: HBase , Cassandra, Riak

      Typical applications: distributed file system

      Data Model: a column storage clusters, with the presence of the same row of data

      Advantages: Fast search speed, scalability, easier to distributed expansion

      Disadvantages: relatively limited functions

  • Document database

      Related Products: MongoDB , CouchDB

      Typical applications: Web Application (similar to the Key-Value, Value is structured)

      Data model: a series of key-value pairs

      Advantages: data structure is not strictly required

      Disadvantages: query performance is not high, and the lack of a unified query syntax

  • Graphics (Graph) database

      Relational database: Infinite Graph , Neo4J, Infogrid

      Typical applications: social networking

      Data Model: Structure FIG.

      Advantages: FIG structural correlation algorithm

      Disadvantages: need to do in order to calculate the outcome of the whole map, not easy to do a distributed clustering scheme

 Note: The relational database is a database based on relational tables, final data will be persisted to disk, and NoSQL database is based on the special structure, the data stored in the memory of the database. From a performance terms, NoSQL database is superior to the relational database, in terms of security from the relational database is better than nosql database, so use a project NoSQL and relational databases together in the actual development, and achieve performance ensure the safety of double

Second, with regard to the characteristics of NoSQL

On a large relational database data access with unmatched performance advantages, such as:

1. easy to expand

 NoSQL databases variety, but a common feature is removed relational characteristics of a relational database. No relationship between the data, so it is very easy to extend. Also between invisible, in the framework of the level of ability to bring scalable.

2. Large amount of data, high-performance

NoSQL databases are very high read and write performance, especially in the large amount of data, it is also outstanding. Thanks to its non-relational, simple structure of the database.

3. The flexible data model

NoSQL without prior establishment of field data to be stored, ready to store custom data formats. In a relational database, add or delete fields is a very troublesome thing. If a very large amount of data tables, increase the field it is simply a nightmare. This is Web2.0 era of large amounts of data in particular.

4. High Availability

NoSQL in the case do not affect performance, you can easily achieve high availability architecture. Such as Cassandra, HBase model, can be achieved by copying the model availability.

In summary:

  Philippine relations NoSQL characteristics make it the darling of the Web2.0 era, large-scale power Web2.0 site took off again, the database is a new revolutionary movement.

Guess you like

Origin blog.csdn.net/weixin_39921821/article/details/89813488