Common NoSQL Storage Methods

Source: Internet
Author: User

Reference: NoSQL databases have been released.

I. Key Value Storage
Its data is stored in the form of key values. Although its speed is very fast, it can only obtain data through completely consistent query of keys, data can be saved in either temporary or permanent mode.

(1) Temporary (memcached)
Temporary data may be lost. memcached stores all the data in the memory, which saves and reads the data very quickly. However, when memcached stops, the data does not exist. Because the data is stored in the memory, you cannot operate data that exceeds the memory capacity, and the old data will be lost.
To sum up:
1. Save data in memory
2. It can be saved and read very quickly.
3. data may be lost

(2) permanent (ROMA, Tokyo Tyrant, Flare)
The so-called permanent is that the data will not be lost. Here, the key-value storage stores the data on the hard disk. In comparison with the temporary, Because I/O operations on the hard disk are required, therefore, there is still a gap in performance, but data will not be lost is its biggest advantage.
To sum up:
1. Save data on the hard disk
2. It can be saved and read very quickly (but cannot be compared with memcached)
3. data will not be lost

(3) Both of them (Redis)
Redis is special, temporary, and permanent. Redis first stores data in the memory and meets specific conditions (the default value is more than 15 minutes, more than 10 keys within 5 minutes, and more than 10000 keys within 1 minute) when the data is written to the hard disk, this not only ensures the speed of data processing in the memory, but also can ensure the permanent data by writing to the hard disk, this type of database is especially suitable for processing data of the array type.
To sum up:
Store data on both memory and Hard Disk
1. It can be saved and read very quickly.
2. data stored on the hard disk will not disappear (can be recovered)
3. Suitable for processing array-type data


2. Document-oriented databases (MongoDB and CouchDB)
(1) The table structure is not defined.
Even if the table structure is not defined, it can be used like a table structure, saving the trouble of changing the table structure.

(2) complex query conditions can be used.
Different from key-value storage, document-oriented databases can obtain data through complex query conditions, although they do not have the processing capabilities of transaction processing and Join relational databases, however, other processing operations such as the first time can basically be implemented.


Iii. Column-oriented databases (Cassandra, HBase, and HyperTabl)

Due to the explosive growth of data volume in recent years, this type of NoSQL databases has attracted special attention.

Common relational databases store data in the unit of behavior. They are good at reading and processing data in the unit of behavior, such as acquiring data under specific conditions. Therefore, relational databases have become row-oriented databases. On the contrary, a column-oriented database stores data in column units and is good at reading data in column units.

Related Article

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.