What is the primary effect of renaming a key in Redis?
Changes the data type of the key.
Changes the expiration time of the key.
Changes how the key is referenced.
Changes the value associated with the key.
What happens if you try to rename a key to a name that already exists in Redis?
The command is ignored.
The existing key is overwritten with the value of the renamed key.
Redis creates a new key with a unique name.
An error is returned, and the original key remains unchanged.
Which Redis persistence option offers a more durable approach, potentially reducing data loss?
AOF
Both are equally durable
RDB
Neither
Which command is used to decrease the value of a key by 1 in Redis?
SUB
MINUS
DECR
DECREMENT
Which method is used to check if a key exists in a Redis database using redis-py?
r.contains('mykey')
r.exists('mykey')
r.has_key('mykey')
r.check('mykey')
Which persistence option in Redis creates point-in-time snapshots of your data?
Replication
Redis Protocol
What is the primary difference between a Redis Set and a Redis List?
There is no difference
Sets are ordered, Lists are unordered
Sets do not allow duplicates, Lists allow duplicates
Sets allow duplicates, Lists do not
You want to store a list of a user's recent activity in chronological order. What Redis data type is suitable?
String
Set
List
Hash
How would you add an element 'apple' to a set named 'fruits' in Redis?
HSET fruits apple
SET fruits apple
SADD fruits apple
LPUSH fruits apple
How can you check if a key, like 'product_name', exists in Redis?
VERIFY product_name
EXISTS product_name
CONFIRM product_name
CHECK product_name