Five Common Data Types of Redis and five major redis Data Types
1. String (String)
The string type is binary secure. It means that the redis string can contain any data. For example, JPG images or serialized objects.
The string type is the most basic data type of Redis. The string value in a redis instance can be 512 MB at most.
2. Hash)
Redis hash is a set of key-value pairs.
Redis hash is a string-type field-value ing table. hash is especially suitable for storing objects.
Similar to Map <String, Object> in Java
3. List)
The Redis list is a simple string list sorted by insertion order. You can add a header (left) or tail (right) of the element import list ).
Its bottom layer is actually a linked list
4. Set)
Redis's Set is a unordered Set of the string type. It is implemented through HashTable,
5. zset (sorted set: ordered set)
Redis zset and set are also set of string elements, and repeated members are not allowed.
The difference is that each element is associated with a score of the double type.
Redis uses scores to sort members in a set from small to large. Zset members are unique, but scores can be repeated.