One, the key value store
Its data is stored in the form of a key value, although it is very fast, but basically only through the key of the full consistent query to obtain data, according to the data storage can be divided into temporary, permanent and both three kinds.
(1) temporary (memcached)
The so-called temporary is that the data is likely to be lost, memcached all the data in memory, so save and read very quickly, but when the memcached stopped, the data will not exist. Because the data is stored in memory, the data that exceeds the memory capacity cannot be manipulated, and the old data is lost.
In summary:
1. Save data in memory
2, can be very fast to save and read processing
3, the data may be lost
(2) Permanent (ROMA, Tokyo tyrant, Flare)
The so-called permanent is the data will not be lost, the key store here is the data stored on the hard disk, compared with the temporary, due to the inevitable to the hard disk IO operation, so there is still a gap in performance, but the data will not be lost is its biggest advantage.
In summary:
1, save the data on the hard disk
2, can be very fast save and read processing (but not compared with memcached)
3, the data will not be lost
(3) both (Redis)
Redis are special, temporary and permanent. Redis first saves the data in memory and writes it to the hard disk when it satisfies certain conditions (the default is 15 minutes or more, more than 10 in 5 minutes, and 10,000 or more keys change in 1 minutes), which ensures the processing speed of the data in memory, It is also possible to write hard disks to ensure that the data is permanent, and this type of database is particularly suitable for handling data of array types.
In summary:
Save data on both memory and hard drives at the same time
1, can be very fast to save and read processing
2, the data stored on the hard disk will not disappear (can be restored)
3, suitable for processing array types of data
Second, document-oriented database (MongoDB, CouchDB)
(1) Do not define table structure
Even if you do not define a table structure, you can use it as if you were defining a table structure, which eliminates the hassle of altering the table structure.
(2) You can use complex query conditions
Unlike key-value storage, document-oriented databases can obtain data through complex query conditions, although they do not have the processing power of transactional and join relational databases, but the initial processing is largely achievable.
Iii. column-oriented databases (Cassandra, HBase, HYPERTABL)
This type of NoSQL database is particularly notable because of the explosive growth of data volumes in recent years.
The ordinary relational database is the behavior unit to store the data, is good at the behavior unit's reading processing, for instance the specific condition data obtains. Therefore, a relational database is also a row-oriented database. In contrast, a column-oriented database is used to store data as a unit, and is good at reading data in columns.