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
What is the purpose of the SADD command in Redis?
SADD
Adds an element to a set only if it doesn't already exist.
Adds an element to a sorted set.
Retrieves a value from a hash.
Adds an element to the beginning of a list.
Which Python package is commonly used to interact with a Redis database?
python-redis
redisdb
redis-py
pyredis
How do you establish a connection to a Redis server using redis-py?
redis.connect()
redis.Redis()
Redis.create_connection()
Redis.new()
What is the default port on which the Redis server listens for connections?
27017
6379
3306
80
You have a key with an expiration time set. If you overwrite this key with a new value using SET, what happens to the expiration?
SET
An error occurs because you cannot overwrite an expiring key.
The expiration time is retained.
The expiration time is reset to its default value.
The expiration time is removed, making the key persistent.
Which of these is NOT a common use case for Redis?
Storing large blobs of unstructured data
Leaderboards and real-time analytics
Session management
Caching
What does the TTL command return for a key that doesn't expire?
TTL
An error message
-2
0
-1
What is a potential drawback of using only RDB snapshots for persistence in Redis?
Slow write speeds
Potential data loss between snapshots
Complex configuration
High memory usage
Which command is used to remove a field from a hash in Redis?
SREM
DEL
HDEL
HGET