Which command would you use to retrieve the value associated with the key 'username' in Redis?
SET username
LPUSH username
HGET username
GET username
Which persistence option in Redis creates point-in-time snapshots of your data?
Redis Protocol
RDB
Replication
AOF
What is the correct syntax to set a key-value pair in Redis where the key is 'name' and the value is 'John'?
STORE name John
PUT name John
SET name John
CREATE name John
Which configuration file is commonly used to modify Redis server settings?
config.redis
redis.ini
redis.conf
settings.redis
How does Redis differ from a traditional relational database like MySQL?
Redis is schema-less, while MySQL enforces a strict schema
Redis is optimized for complex joins and queries, while MySQL is not
Redis is not suitable for storing persistent data, while MySQL is
Redis is primarily disk-based, while MySQL is in-memory
What is the primary difference between a Redis Set and a Redis List?
Sets do not allow duplicates, Lists allow duplicates
There is no difference
Sets are ordered, Lists are unordered
Sets allow duplicates, Lists do not
How would you add an element 'apple' to a set named 'fruits' in Redis?
LPUSH fruits apple
HSET fruits apple
SADD fruits apple
SET fruits apple
Which command is used to remove a field from a hash in Redis?
HDEL
DEL
SREM
HGET
What is the correct way to set a key-value pair named 'mykey' with the value 'myvalue' using redis-py?
r.insert('mykey', 'myvalue')
r.set('mykey', 'myvalue')
r.put('mykey', 'myvalue')
r.assign('mykey', 'myvalue')
Which command adds a new element to the beginning of a list in Redis?
SADD
LPUSH
RPUSH
ZADD