The key data structures supported by Redis are:

1. Strings: Strings are the most basic data structure in Redis and are used to store text-based data. For example, a key-value pair of “name” and “John” would be stored as a string in Redis.

2. Hashes: Hashes are used to store a collection of key-value pairs. For example, a key-value pair of “name” and “John” could be stored as a hash with the key “person” and value of “name: John”.

3. Lists: Lists are used to store a collection of ordered values. For example, a list of names could be stored as a list with the values “John”, “Mary”, and “Bob”.

4. Sets: Sets are used to store a collection of unordered values. For example, a set of numbers could be stored as a set with the values “1”, “2”, and “3”.

5. Sorted Sets: Sorted sets are used to store a collection of ordered values. For example, a set of numbers could be stored as a sorted set with the values “1”, “2”, and “3”, where they are sorted by their numerical value.

Leave a Reply

Your email address will not be published. Required fields are marked *