What data type does Redis primarily use to store values?
Integer
Float
String
Boolean
What does the following redis-py code do: r.incr('mycounter')?
r.incr('mycounter')
Increments the numeric value stored at 'mycounter' by 1
Retrieves the value at 'mycounter' and converts it to an integer
Adds a new key 'mycounter' with the value 1
Checks if the key 'mycounter' exists and creates it if not
Which command is used to remove a field from a hash in Redis?
HDEL
HGET
SREM
DEL
Which Redis configuration setting controls the interval (in seconds) for saving RDB snapshots?
save_interval
snapshot_frequency
rdb_save_seconds
rdb_snapshot_time
How do you set a key to expire after 20 seconds in Redis?
TIMEOUT key 20
PERSIST key 20
SETEX key 20 value
EXPIRE key 20
How do you establish a connection to a Redis server using redis-py?
redis.connect()
Redis.new()
Redis.create_connection()
redis.Redis()
Which of these is NOT a common use case for Redis?
Leaderboards and real-time analytics
Caching
Storing large blobs of unstructured data
Session management
You need to store a leaderboard with scores for players. Which Redis data type is most appropriate?
List
Hash
Set
Sorted Set
What is the result of executing 'INCR counter' if the 'counter' key does not exist in Redis?
Null
1
Error: Key not found
0
Which command is used to download and install Redis on a Debian-based Linux system?
apt-get install redis
brew install redis
yum install redis
wget redis.com