Introduction to NoSQL Databases

Source: Internet
Author: User
Tags memcached

Objective

Nosql:not only SQL (not no SQL), it means using a relational database when the relational database is applied, but using a different database where it is not suitable for a relational database. The emergence of NoSQL is mainly to make up for the deficiency of relational database, it can be regarded as a supplement of relational database. It must be understood, however, that NoSQL is not meant to replace relational databases, nor can it replace relational databases, which have advantages over relational databases.

Comparison with relational databases

To explain the NoSQL database, we must first talk about the traditional relational database. The benefits of a relational database:

1, general-purpose, high-performance. Relational databases are designed to solve most of the application needs.

2, data consistency.

3, the data update cost is small.

4, can join (join refers to table connection)

The lack of a relational database:

1. Write a large amount of data.

2, the data update may cause the table structure change. Relational database is to define a good table in advance, so once the data structure is changed, it is necessary to change the entire table, and related indexes, etc., the cost is very high.

3, the field is not fixed application. If the character of an app is not deterministic, it can be tricky to design a database table.

4, simple query. The relational database undergoes a number of complex operations for each query, which obviously results in poor performance for some simple queries.

The advantages of NoSQL:

1, easy to disperse the data.

2. It is easier to improve performance by increasing scale. NoSQL makes it easier to build clusters from multiple inexpensive servers, reducing costs.

So it's easy to implement a high-performance, more flexible database system with NoSQL databases.

Classification

Below is a description of the following NoSQL categories. NoSQL can be broadly divided into the following three categories:

1, key value storage. The most common type, which is to store data by key-value pairs. This category can be divided into temporary (memcached), permanent (flare, etc.), both (Redis) three classes. The temporary is to store the data in memory so that if the machine restarts the data it will be lost. Persistence allows data to be stored on persistent storage media such as disks.

2. Document-oriented database. This database is characterized by the ability to store data directly without the need to define a table structure, while supporting complex query conditions. MongoDB belongs to this type.

3, column-oriented database. The main is compared with the line-oriented comparison (now the mainstream database, such as relational database is line-oriented), has the advantages of extensibility, in the processing of large amounts of data when there is a comparative advantage. But this type of database is more difficult to apply. HBase is this type of database.

Case

The following is a brief introduction to several NoSQL database use cases.
1, memcached. The most common usage of memcached is as a cache. Memcached can be used as the middle tier between relational databases and applications, and the data commonly used in relational databases is stored in memcached. At the same time, memcached can also be used as a cache for files such as music files.
2, Redis. Unlike Memcached,redis, it can be used as a complete database. A typical application of Redis is the Weibo system, where Redis enables high-speed data reading and writing, while data storage is highly flexible and ideal for applications such as Weibo. Sina Weibo has used Redis. The application of Redis in micro-blogging system can be consulted: http://blog.csdn.net/l1902090/article/details/36203749


Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.