Which statement best describes how Redis stores data in its key-value model?
Think about the flexibility Redis offers beyond simple strings.
Redis supports multiple data types for values, including strings, lists, sets, hashes, and sorted sets, making it versatile for different use cases.
Given a Redis-like key-value store where keys represent user IDs and values represent user roles, which DAX measure correctly counts unique user IDs?
UniqueUsers = DISTINCTCOUNT('UserRoles'[UserID])Counting unique keys means counting distinct user IDs.
Using DISTINCTCOUNT counts unique values in the UserID column, which matches counting unique keys.
You have a Redis database with keys that have different expiry times. Which visualization best shows the distribution of key expiry times to help monitor key lifetimes?
Think about how to show frequency distribution of expiry times.
A histogram groups expiry times into ranges and shows how many keys fall into each range, making it ideal to see distribution.
You want to model user sessions in Redis using key-value pairs. Each session has a unique session ID, user ID, and expiration time. Which Redis data structure and key design is best for efficient session lookup and expiry?
Consider how Redis expiry works and how to store multiple fields per session.
Hashes allow storing multiple fields per key efficiently, and Redis key expiry can automatically remove sessions after timeout.
Which Redis command usage will cause an error when trying to set a key with expiry?
Options:
Check the correct syntax for setting expiry with SET command.
Option C uses an invalid syntax 'EXPIRE' inside SET command, which causes an error. The correct syntax uses 'EX' or 'PX' without 'EXPIRE'.