Which Python package is commonly used to interact with a Redis database?
python-redis
pyredis
redisdb
redis-py
Which command is used to remove a field from a hash in Redis?
HDEL
HGET
DEL
SREM
You set a key with EXPIRE mykey 10. What does the value '10' represent in this command?
EXPIRE mykey 10
Hours
Seconds
Minutes
Milliseconds
Which AOF configuration option tells Redis to rewrite the AOF file periodically to reduce its size?
aof_rewrite_threshold
aof_optimize
aof_compact_size
aof_rewrite_frequency
How can you check if a key, like 'product_name', exists in Redis?
VERIFY product_name
EXISTS product_name
CHECK product_name
CONFIRM product_name
What is the purpose of the SADD command in Redis?
SADD
Adds an element to a sorted set.
Adds an element to the beginning of a list.
Retrieves a value from a hash.
Adds an element to a set only if it doesn't already exist.
What data type does Redis primarily use to store values?
Boolean
Float
String
Integer
Which command adds a new element to the beginning of a list in Redis?
ZADD
LPUSH
RPUSH
What does the following redis-py code do: r.incr('mycounter')?
r.incr('mycounter')
Adds a new key 'mycounter' with the value 1
Increments the numeric value stored at 'mycounter' by 1
Checks if the key 'mycounter' exists and creates it if not
Retrieves the value at 'mycounter' and converts it to an integer
What is a potential drawback of using only RDB snapshots for persistence in Redis?
Potential data loss between snapshots
High memory usage
Complex configuration
Slow write speeds