0
0
Redisquery~10 mins

Why strings are Redis's simplest type - Test Your Understanding

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to set a string value in Redis.

Redis
SET mykey [1]
Drag options to blanks, or click blank then click option'
ADEL
B123
CGET
DHello
Attempts:
3 left
💡 Hint
Common Mistakes
Using a command like GET or DEL instead of a string value.
2fill in blank
medium

Complete the code to retrieve the string value stored in Redis.

Redis
GET [1]
Drag options to blanks, or click blank then click option'
Amyvalue
Bmykey
Cvalue
Dstring
Attempts:
3 left
💡 Hint
Common Mistakes
Using the value instead of the key name.
3fill in blank
hard

Fix the error in the command to append to a string value in Redis.

Redis
APPEND [1] " World"
Drag options to blanks, or click blank then click option'
Amykey
Bmyvalue
Cvalue
Dstring
Attempts:
3 left
💡 Hint
Common Mistakes
Using the value or wrong key name instead of the key.
4fill in blank
hard

Fill both blanks to increment a numeric string value in Redis.

Redis
INCRBY [1] [2]
Drag options to blanks, or click blank then click option'
Acounter
B5
C10
Dmykey
Attempts:
3 left
💡 Hint
Common Mistakes
Using a non-numeric value for increment.
Using wrong key name.
5fill in blank
hard

Fill all three blanks to set a string with expiration time in Redis.

Redis
SET [1] [2] EX [3]
Drag options to blanks, or click blank then click option'
Asession_id
Babc123
C300
Duser_token
Attempts:
3 left
💡 Hint
Common Mistakes
Not using quotes for string value.
Using wrong key or expiration time.