Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Lära Challenge: Managing User Profiles | Data Types in Redis
Introduction to Redis
course content

Kursinnehåll

Introduction to Redis

Introduction to Redis

1. Redis Fundamentals
2. The Essential Redis Commands
3. Data Types in Redis
4. Advanced Features and Security
5. Caching with Redis and Spring Boot

book
Challenge: Managing User Profiles

You need to create and manage user data using hashes in Redis. Each user is represented as a hash containing their name, age, and email.

Steps

  1. Create a hash for user:1001 with the following data: name"Alice", age30, and email"alice@example.com";

  2. Retrieve and verify the data for user:1001;

  3. Update the age of user:1001 to 31 and remove their email;

  4. Add two new users:

    • user:1002 (name: "Bob", age: 25, email: "bob@example.com");

    • user:1003 (name: "Carol", age: 29, email: "carol@example.com").

  5. Retrieve the age of all users;

  6. Deleteusers whose age is less than 28;

  7. Add a new fieldstatus with the value"active" for the remaining users.

1. Create a hash for user:1001:

python

2. Retrieve and verify data from the hash user:1001:

python

3. Update data in the hash user:1001:

python

4. Create hashes for two new users:

python

5. Retrieve the ages of all users:

python

6. Delete users with an age less than 28:

python

7. Add a new field status for the remaining users:

python

Var allt tydligt?

Hur kan vi förbättra det?

Tack för dina kommentarer!

Avsnitt 3. Kapitel 8

Fråga AI

expand
ChatGPT

Fråga vad du vill eller prova någon av de föreslagna frågorna för att starta vårt samtal

course content

Kursinnehåll

Introduction to Redis

Introduction to Redis

1. Redis Fundamentals
2. The Essential Redis Commands
3. Data Types in Redis
4. Advanced Features and Security
5. Caching with Redis and Spring Boot

book
Challenge: Managing User Profiles

You need to create and manage user data using hashes in Redis. Each user is represented as a hash containing their name, age, and email.

Steps

  1. Create a hash for user:1001 with the following data: name"Alice", age30, and email"alice@example.com";

  2. Retrieve and verify the data for user:1001;

  3. Update the age of user:1001 to 31 and remove their email;

  4. Add two new users:

    • user:1002 (name: "Bob", age: 25, email: "bob@example.com");

    • user:1003 (name: "Carol", age: 29, email: "carol@example.com").

  5. Retrieve the age of all users;

  6. Deleteusers whose age is less than 28;

  7. Add a new fieldstatus with the value"active" for the remaining users.

1. Create a hash for user:1001:

python

2. Retrieve and verify data from the hash user:1001:

python

3. Update data in the hash user:1001:

python

4. Create hashes for two new users:

python

5. Retrieve the ages of all users:

python

6. Delete users with an age less than 28:

python

7. Add a new field status for the remaining users:

python

Var allt tydligt?

Hur kan vi förbättra det?

Tack för dina kommentarer!

Avsnitt 3. Kapitel 8
Vi beklagar att något gick fel. Vad hände?
some-alt