In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)05/31 Report--
This article introduces the relevant knowledge of "what are the five data types of Redis". In the operation of actual cases, many people will encounter such a dilemma. Next, let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!
The five big data types of Redis
String (string)
String is the most basic type of redis, which you can understand as exactly the same type as Memcached, with a key corresponding to a value.
The string type is binary safe. It means that the string of redis can contain any data. Such as jpg images or serialized objects.
The string type is the most basic data type of Redis. The string value in a redis can be up to 512m.
Hash (hash, similar to Map in java)
Redis hash is a collection of key-value pairs.
Redis hash is a mapping table for field and value of type string, and hash is particularly suitable for storing objects.
Similar to Map in Java
List (list)
The Redis list is a simple list of strings sorted in the order in which they are inserted. You can add a header (left) or tail (right) of the element guide list.
Its underlying layer is actually a linked list.
Set (collection)
The Set of Redis is an unordered collection of type string. It is implemented through the HashTable implementation.
Zset (sorted set: ordered set)
Redis zset, like set, is a collection of elements of type string, and duplicate members are not allowed.
The difference is that each element is associated with a score of type double.
Redis sorts the members of the collection from small to large by scores. The members of the zset are unique, but the score can be repeated.
This is the end of the content of "what are the five data types of Redis". Thank you for reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.