Challenge: Basic Commands
You will work with user data using Redis as the storage system. The task includes the following steps:
- You will store the user's name in Redis under a unique key (
user:1
) with the nameJohn Doe
. - Ensure that the user with the given key exists before working with their data. Retrieve the value associated with the key.
- Update the user's name to a new value:
Jane Smith
. - Ensure that the changes were applied correctly.
Requirements
- Use only the
SET
,GET
, andEXISTS
commands to complete the task; - All actions will be performed in
Redis CLI
; - You are working with a single user, using their unique identifier as the key.
Create a new user by storing their name in Redis under a unique key:
Check if the user exists using the command:
Retrieve the user's data with the command:
Update the user's name with the new value:
Retrieve the data again to ensure the name was updated to Jane Smith
:
Дякуємо за ваш відгук!
Запитати АІ
Запитати АІ
Запитайте про що завгодно або спробуйте одне із запропонованих запитань, щоб почати наш чат
Can you explain what the EXISTS command returns in Redis?
What should I do if the EXISTS command returns 0?
How do I verify that the user's name was updated successfully?
Awesome!
Completion rate improved to 3.33
Challenge: Basic Commands
Свайпніть щоб показати меню
You will work with user data using Redis as the storage system. The task includes the following steps:
- You will store the user's name in Redis under a unique key (
user:1
) with the nameJohn Doe
. - Ensure that the user with the given key exists before working with their data. Retrieve the value associated with the key.
- Update the user's name to a new value:
Jane Smith
. - Ensure that the changes were applied correctly.
Requirements
- Use only the
SET
,GET
, andEXISTS
commands to complete the task; - All actions will be performed in
Redis CLI
; - You are working with a single user, using their unique identifier as the key.
Create a new user by storing their name in Redis under a unique key:
Check if the user exists using the command:
Retrieve the user's data with the command:
Update the user's name with the new value:
Retrieve the data again to ensure the name was updated to Jane Smith
:
Дякуємо за ваш відгук!