Overall overview
Redis is a database, like a structured data server . As compared to the rows in the MySQL action table, the MongoDB operations document in the collection is accessed in such a way that Redis accesses the data by key . It is a key-value type of NoSQL database. Because the data is stored in memory, access is fast. (Of course, for the sake of some data security, you can also back up the data to the database or write the operation of the data to the record file). J in short, it is a memory database that supports persistence .
After learning about Redis, I was impressed by the intersection, the set, and the difference operation, which looked simple. Because Redis is nosql and there is no table structure, there is no need to add a column or delete a list of troublesome operations when there is a lot of data. So it has a very high scalability to the data.
Data type
Here we summarized and summed up the five types of data, how to use, we use the time to check on it.
Strings string
Hashed Hash
Lists List
Can be thought of as a stack or queue.
DataSet set
Ordered data set sorted set
The above operation is for some operations within each data type.
There are also operations on the data type, as well as operations on the database.
Advanced Features
and MongoDB comparison
The document structure in Redis is always flat. Unlike MongoDB, nested data structures are supported.
Data is persisted in different ways. The Redis design is designed for memory storage, with a configurable disk persistence concept, so it's fast.
Summarize
This article is only a summary of the basic knowledge of Redis, the application of its advanced features is still in practice ....
"NoSQL Redis" (a)--uncovering the veil of Redis