How do you establish a connection to a Redis server using redis-py?
Redis.new()
Redis.create_connection()
redis.Redis()
redis.connect()
Which data type would you use to implement a leaderboard where scores are constantly updated?
Hash
Set
List
Sorted Set
Which command is used to download and install Redis on a Debian-based Linux system?
yum install redis
wget redis.com
brew install redis
apt-get install redis
What is the correct way to set a key-value pair named 'mykey' with the value 'myvalue' using redis-py?
r.assign('mykey', 'myvalue')
r.insert('mykey', 'myvalue')
r.set('mykey', 'myvalue')
r.put('mykey', 'myvalue')
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.
Adds an element to a set only if it doesn't already exist.
Retrieves a value from a hash.
What file extension is typically used for Redis's Append-Only File?
.aof
.log
.rdb
.redis
Which command is used to remove the expiration time from a key, making it persistent?
UNEXPIRE
PERSIST
REMOVE
DELETE
Which persistence option in Redis creates point-in-time snapshots of your data?
Replication
Redis Protocol
RDB
AOF
How do you retrieve the value associated with the key 'mykey' in redis-py?
r.read('mykey')
r.retrieve('mykey')
r.fetch('mykey')
r.get('mykey')
What will Redis return if you execute 'GET score' and the 'score' key does not exist?
Null
0
False
Error