Redis MCQ Questions And Answers
Redis MCQs : This section focuses on "Basics" of Redis. These Multiple Choice Questions (MCQ) should be practiced to improve the Redis skills required for various interviews (campus interviews, walk-in interviews, company interviews), placements, entrance exams and other competitive examinations.
1. Redis is a?
A. NoSQL database
B. Relational database
C. End-user database
D. Commercial database
View Answer
Ans : A
Explanation: Redis is a type of database that's commonly referred to as No SQL or non-relational . In Redis, there are no tables, and there's no database-defined or -enforced way of relating data in Redis with other data in Redis.
2. Redis Developer?
A. C. Redis
B. P. Redis
C. Redis Labs
D. Z. Redis
View Answer
Ans : C
Explanation: Developer: Redis Labs
3. Redis is very fast and can perform about ___________ SETs per second?
A. 10000
B. 110000
C. 1000000
D. 111000
View Answer
Ans : B
Explanation: Redis is very fast and can perform about 110000 SETs per second, about 81000 GETs per second.
4. To update configuration, you can edit redis.conf file directly or you can update configurations via?
A. CONFIG update command
B. CONFIG put command
C. CONFIG alter command
D. CONFIG set command
View Answer
Ans : D
Explanation: To update configuration, you can edit redis.conf file directly or you can update configurations via CONFIG set command.
5. How many types of data types redis supports?
A. 3
B. 4
C. 5
D. 6
View Answer
Ans : C
Explanation: Redis supports 5 types of data types : Strings, Hashes, Lists, Sets, Sorted Sets.
6. Which of the following is a key in string?
SET name "letsfindcourse"
A. name
B. get
C. set
D. None of the above
View Answer
Ans : A
Explanation: SET and GET are Redis commands, name is the key used in Redis and tutorialspoint is the string value that is stored in Redis.
7. What is time complexity for sets in redis?
A. O(N)
B. O(N*N)
C. O(NLOGN)
D. O(1)
View Answer
Ans : D
Explanation: In Redis, you can add, remove, and test for the existence of members in O(1) time complexity.
8. Which of the following basic syntax of Redis client?
A. $redis-client
B. $redis cli
C. $redis-cli
D. $redis client
View Answer
Ans : C
Explanation: Following is the basic syntax of Redis client : $redis-cli
9. The below command is used to?
DEL letsfindcourse
A. The command used to delete the command.
B. The command is used to delete the key.
C. The command is used to set the keys.
D. None of the above
View Answer
Ans : B
Explanation: DEL is the command, while letsfindcourse is the key. If the key is deleted, then the output of the command will be (integer) 1, otherwise it will be (integer) 0.
10. Which of the following command is used to Changes the key name?
A. RENAME key newkey
B. RANDOMKEY
C. RENAMENX key newkey
D. TYPE key
View Answer
Ans : A
Explanation: RENAME key newkey : Changes the key name.
Discussion