Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and beauty - How many data types does Redis support?
How many data types does Redis support?
Redis supports five data types: string (string), hash (hash), list (list), set (set) and zset (ordered set).

A string indicating that redis can contain any data. For example, a jpg image or a serialized object, and a value of type string can be stored at most 5 12MB.

Redihash is a mapping table of fields and values of string type, and hash is especially suitable for storing objects.

Redis list is a simple list of strings, sorted by insertion order. You can add elements to the head (left) or tail (right) of the list.

The collection of Redis is an unordered collection of string type, and the collection is realized by a hash table, so the complexity of adding, deleting and searching is O( 1).

Redizset, like set, is a collection of elements of type string, and duplicate members are not allowed unless each element is associated with a score of type double. Redis sorts the members of the collection from small to large by scores.