What is the default port on which the Redis server listens for connections?
80
6379
3306
27017
Which persistence option in Redis creates point-in-time snapshots of your data?
RDB
Redis Protocol
AOF
Replication
What type of data structures does Redis support?
Only key-value pairs
Only strings
Strings, lists, sets, and hashes
Exclusively JSON documents
What is the primary difference between a Redis Set and a Redis List?
Sets are ordered, Lists are unordered
Sets do not allow duplicates, Lists allow duplicates
There is no difference
Sets allow duplicates, Lists do not
What is the result of executing 'INCR counter' if the 'counter' key does not exist in Redis?
Error: Key not found
1
Null
0
Which Redis configuration setting controls the interval (in seconds) for saving RDB snapshots?
rdb_snapshot_time
rdb_save_seconds
snapshot_frequency
save_interval
After installing Redis, what command is commonly used to start the Redis server?
start redis
run redis
redis-server
execute redis
What does the following redis-py code do: r.incr('mycounter')?
r.incr('mycounter')
Increments the numeric value stored at 'mycounter' by 1
Adds a new key 'mycounter' with the value 1
Retrieves the value at 'mycounter' and converts it to an integer
Checks if the key 'mycounter' exists and creates it if not
What is the correct syntax to set a key-value pair in Redis where the key is 'name' and the value is 'John'?
SET name John
PUT name John
CREATE name John
STORE name John
What is the purpose of the SADD command in Redis?
SADD
Adds an element to the beginning of a list.
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.