0
0
Redisquery~10 mins

Why data modeling differs in Redis - 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'
A123
B"Hello"
CHello
Dnil
Attempts:
3 left
💡 Hint
Common Mistakes
Using quotes around string values causes errors.
Using nil which is not a valid value.
2fill in blank
medium

Complete the code to add a member to a Redis set.

Redis
SADD myset [1]
Drag options to blanks, or click blank then click option'
Amyvalue
B123
C"myvalue"
Dnil
Attempts:
3 left
💡 Hint
Common Mistakes
Adding quoted strings unnecessarily.
Using nil which is not a valid member.
3fill in blank
hard

Fix the error in the command to get a hash field value.

Redis
HGET myhash [1]
Drag options to blanks, or click blank then click option'
Afield1
Bnil
C1
D"field1"
Attempts:
3 left
💡 Hint
Common Mistakes
Using quoted field names unnecessarily.
Using numeric or nil values incorrectly.
4fill in blank
hard

Fill both blanks to create a sorted set with a member and score.

Redis
ZADD myzset [1] [2]
Drag options to blanks, or click blank then click option'
A10
B"member1"
Cmember1
Dscore
Attempts:
3 left
💡 Hint
Common Mistakes
Swapping score and member order.
Quoting the member string unnecessarily.
5fill in blank
hard

Fill all three blanks to create a Redis hash with a field and value.

Redis
HSET [1] [2] [3]
Drag options to blanks, or click blank then click option'
Amyhash
B"field1"
C"value1"
Dfield1
Attempts:
3 left
💡 Hint
Common Mistakes
Quoting field unnecessarily.
Using unquoted value with spaces causing errors.