In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
What data types can be stored in a redis database? Many novices are not very clear about this. In order to help you solve this problem, the following editor will explain it in detail. People with this need can come and learn. I hope you can gain something.
Redis is an open source log database written in ANSI C language, complies with BSD protocol, supports network, can be memory-based and persistent, Key-Value database, and provides API in multiple languages.
Redis databases can access data types such as string (string), hash (hash), list (list), set (collection) and zset (sorted set).
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, and the value of the string type can store 512MB at most.
Hash (hash)
Redis hash is a collection of key-value pairs (key= > value).
Redis hash is a mapping table for field and value of type string, and hash is particularly suitable for storing objects.
List (list)
The Redis list is a simple list of strings sorted in the order in which they are inserted. You can add an element to the head (left) or tail (right) of the list.
Set (collection)
The Set of Redis is an unordered collection of type string.
The collection is implemented through a hash table, so the complexity of adding, deleting, and finding is all O (1).
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.
Is it helpful for you to read the above content? If you want to know more about the relevant knowledge or read more related articles, please follow the industry information channel, thank you for your support.
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.