In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-22 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/02 Report--
This article mainly explains "What are the commonly used data types of Redis". The explanation content in this article is simple and clear, easy to learn and understand. Please follow the ideas of Xiaobian and go deep into it slowly to study and learn "What are the commonly used data types of Redis" together!
Five common data types in Redis
Reference: redisdoc.com/
1. String
String is the most basic type of redis, which can be understood as the same type as Memcached, where a key corresponds to a value.
String type is binary-safe, meaning redis string can contain any data. Such as ipg images or serialized objects.
String type is the most basic data structure of Redis. The string value in a Redis can be 512M at most.
2. Hash (hash, similar to Map in java)
Hash
A Redis hash is a collection of key pairs.
Redis hash is a mapping table of field and value of type string, hash is especially suitable for storing objects.
Similar to Map in Java
3. List
A Redis list is a simple list of strings, sorted in insertion order. You can add an element to the list either at the head (left) or at the tail (right).
The bottom layer is a linked list.
4. Set
A Set of Redis is an unordered, non-repeating set of type string. It is implemented through HashTable.
Zset (sorted set)
zset (ordered set)
Redis zset, like set, is a collection of string elements and does not allow duplicate members.
The difference is that each element is associated with a fraction of type double.
Redis uses scores to sort members of a collection from smallest to largest. The members of a zset are unique, but scores can be repeated.
Thank you for your reading. The above is the content of "What are the commonly used data types of Redis?" After studying this article, I believe everyone has a deeper understanding of what are the commonly used data types of Redis. The specific use situation still needs to be verified by practice. Here is, Xiaobian will push more articles related to knowledge points for everyone, welcome to pay attention!
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.