Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 2

hKey-Value Database

Complete the following tasks using Redis DB


Insert the following key-value pairs and perform the required operations
177004 POLISETTY SAI NAGA MADHAV
177005 KUCHIPUDI NANDA PRANEETH
177011 EDUPUGANTI PRABHAT
177012 JULURI KALYAN VARDHAN
177014 TEJO VINAY POTTI
177020 KAKUMANI MOUNISH
177022 VENNAVALLI BHAGYA CHANDRA

1. Display the value of key “17BCD7011”


2. Append “Kumar” with 17BCD7020
3. Decrement id of TEJO VINAY by 5
4. Create “marks” key with “3344” value with expiration time of 30 sec
5. Find the length of value stored in key 177012
6. Rename 177005 as EDUPUGANTI PRABHAT
7. Insert the following values into a list and answer the queries
17BCD7041 PALADI SIVA RAMAKRISHNA
17BCD7042 SUNIL KUMAR SIVVA
17BCD7053 KOLLIPARA RAJAMANOHAR
17BCD7054 POLAKAM PAVAN SAI
17BCD7061 NETRA CHANDRASEKHAR

8. Find all the keys starting from P


9. Find all the keys ending with r
10. Find all the keys starting from P and ending with i

Insert the following values as list and answer the questions


Roles:
Professor
Assistant Professor
Staff
Designer
1. Insert “Dean” at the beginning of the list
2. Insert “students” at the end of the list
3. Insert “Associate Professor” at the second of the list
4. Display all the list values
5. Remove the last element in the list
6. Insert “Programmer” next to Assistant professor in the list
7. Display the 2nd element in the list
Insert the following values in sorted set and answer the questions:
Languages – sorted set name
Java 87
C++ 84
Python 90
C 70
1. Display all the set elements in reverse order
2. Find the score of java
3. Find the rank of python
4. Increment the C score by 10
5. Remove the elements which has the score between 80 to 90

You might also like