Redis supports several data types:
- String: Binary-safe strings up to 512MB
- Hash: Field-value pairs, like objects
- List: Ordered collection of strings
- Set: Unordered collection of unique strings
- Sorted Set (ZSet): Set ordered by a score
- Bitmap: String treated as bit array
- HyperLogLog: Probabilistic data structure for cardinality estimation
- Geospatial: Longitude/latitude coordinates
- Stream: Log-like data structure for message queues
SET mykey "hello" # String
HSET user:1 name "John" # Hash
LPUSH mylist "item1" # List
SADD myset "member1" # Set
ZADD myzset 1 "item1" # Sorted Set