×

Multiple-Choice Questions

Web Technologies MCQs

Computer Science Subjects MCQs

Databases MCQs

Programming MCQs

Testing Software MCQs

Digital Marketing Subjects MCQs

Cloud Computing Softwares MCQs

AI/ML Subjects MCQs

Engineering Subjects MCQs

Office Related Programs MCQs

Management MCQs

More

Redis Multiple-Choice Questions (MCQs)

Redis is an in-memory data structure store, used as a distributed, in-memory key–value database, cache and message broker, with optional durability.

Redis MCQs: This section contains multiple-choice questions and answers on the various topics of Redis. Practice these MCQs to test and enhance your skills on Redis.

List of Redis MCQs

1. Redis is a NoSQL database, which stores the value in ____ format.

  1. Document format
  2. Key-value store
  3. Column-oriented
  4. Graph format

Answer: B) Key-value store

Explanation:

Redis is a NoSQL database, which stores the value in key-pair format.

Discuss this Question


2. Who was the man behind the Redis database?

  1. Raymond Boyce
  2. Donald Chamberlin.
  3. Salvatore Sanfilippo
  4. Dwight Merriman

Answer: C) Salvatore Sanfilippo

Explanation:

Salvatore Sanfilippo, is the man behind the Redis database.

Discuss this Question


3. When was the Redis database invented?

  1. 2001
  2. 2011
  3. 2010
  4. 2009

Answer: B) 2011

Explanation:

In 2011, Redis was founded.

Discuss this Question


4. Redis architecture contains how many processes?

  1. 4
  2. 5
  3. 3
  4. 2

Answer: D) 2

Explanation:

Redis architecture mainly consists of two processes which are known as Redis client and Redis server.

Discuss this Question


5. Which process in the Redis architecture is responsible for storing the data in memory and is also responsible for controlling every type of management?

  1. Redis client
  2. Redis server.

Answer: B) Redis server.

Explanation:

The redis server is the main part of the architecture, it is used to store the data in memory and is also responsible for controlling every type of management.

Discuss this Question


6. Which of the following data structures are supported by Redis?

  1. Bitmaps
  2. Hyper log
  3. Geospatial indexes
  4. Sorted sets
  5. All of the above

Answer: E) All of the above

Explanation:

Redis supports a variety of data structures which includes: hashes, sets, lists, sorted sets with range queries, bitmaps, hyper log, and geospatial indexes.

Discuss this Question


7. In which language, Redis has written?

  1. ANSI C language
  2. Python
  3. Java
  4. PHP

Answer: A) ANSI C language

Explanation:

Redis is written in the ANSI C language.

Discuss this Question


8. Does the concept of Sharding is supported by Redis?

  1. Yes
  2. No

Answer: A) YES

Explanation:

Redis supports the concept of sharding.

Discuss this Question


9. Does Redis support languages like Scala and Smalltalk?

  1. Yes
  2. No

Answer: A) YES

Explanation:

Redis supports a variety of languages such as C, C++, C#, Clojure, Common Lisp, D, Dart, Erlang, Go, Haskell, Haxe, Io, Java, JavaScript (Node.js), Julia, Lua, Objective-C, Perl, PHP, Pure Data, Python, R, Racket, Ruby, Rust, Scala, Smalltalk, and Tcl.

Discuss this Question


10. Among Redis and RDBMS, which of them stores the data in primary memory?

  1. RDBMS
  2. Redis

Answer: B) Redis

Explanation:

Redis stores almost everything in primary memory whereas RDBMS stores everything in secondary memory.

Discuss this Question


11. Among Redis and RDBMS, which of them takes the longest time in reading and writing operations?

  1. RDBMS
  2. Redis

Answer: A) RDBMS

Explanation:

RDBMS takes more time in comparison to Redis in reading and writing operations, RDBMS stores the data in secondary memory.

Discuss this Question


12. How many data types are there in Redis?

  1. 4
  2. 5
  3. 3
  4. 2

Answer: B) 5

Explanation:

There are 5 types of data types that Redis support:

  • Strings
  • Hashes
  • Lists
  • Sets
  • Sorted Sets

Discuss this Question


13. Which of the following commands is used in Redis to store a key name in the string format?

  1. Get
  2. Put
  3. Set
  4. Post

Answer: C) Set

Explanation:

Set command is used in Redis to store a key name in the string format.

Discuss this Question


14. Which data type in Redis are maps between string fields and string values?

  1. Strings
  2. Hashes
  3. Lists
  4. Sets
  5. Sorted Sets

Answer: B) Hashes

Explanation:

Hashes data types in Redis are maps between string fields and string values.

Discuss this Question


15. Which of the following commands is used to set the specified fields to their particular values in the hash stored at the key?

  1. Set
  2. Get
  3. HMSET
  4. HMGET

Answer: C) HMSET

Explanation:

HMSET command is used to set the specified fields to their particular values in the hash stored at the key.

Discuss this Question


16. Which of the following data types are usually known as the unordered collection of strings?

  1. Strings
  2. Hashes
  3. Lists
  4. Sets
  5. Sorted Sets

Answer: D) Sets

Explanation:

Sets are usually known as the unordered collection of strings in the Redis Database.

Discuss this Question


17. Which of the following commands is used to delete a key?

  1. Del
  2. Dump
  3. Expire
  4. Delete

Answer: A) Del

Explanation:

To delete a key in Redis DEL command is used.

Discuss this Question


18. Which of the following commands will you use if you are asked to find all keys matching the specified pattern?

  1. Like pattern
  2. Keys pattern
  3. Like keys Pattern

Answer: B) Keys pattern

Explanation:

If you are asked to find all keys matching with the specified pattern, then the keys pattern is the command you will use.

Discuss this Question


19. Which of the following commands is used to check whether the key exists or not?

  1. Is_there
  2. Is_key
  3. Exist key
  4. Key_exist

Answer: C) Exist key

Explanation:

Exist key command is used to check whether the key exists or not.

Discuss this Question


20. Does the DUMP key command and DEL key command both work the same?

  1. Yes
  2. No

Answer: B) NO

Explanation:

DEL key command is used to delete the key, whereas the DUMP key command is used to return a serialized version of the value stored at the specified key.

Discuss this Question


21. Which of the following commands is used when you want to retrieve the value of a key?

  1. SET
  2. GET
  3. GETSET
  4. GETRANGE

Answer: B) GET

Explanation:

GET command is used when you want to retrieve the value of a key.

Discuss this Question


22. Which of the following data types is known to be the perfect data type to represent objects in Redis?

  1. Strings
  2. Hashes
  3. Lists
  4. Sets
  5. Sorted Sets

Answer: B) Hashes

Explanation:

Hashes in Redis are known to be the perfect data type to represent objects.

Discuss this Question


23. Which of the following commands is used when you want to retrieve the value of a key?

  1. SET
  2. GET
  3. GETSET
  4. GETRANGE

Answer: B) GET

Explanation:

GET command is used when you want to retrieve the value of a key.

Discuss this Question


24. Which of the following commands is used to get the number of fields in a hash?

  1. HDEL key field2 [field2]
  2. HKEYS key
  3. HVALS key
  4. HLENS key

Answer: D) HLENS key

Explanation:

HLENS key command is used to get the number of fields in a hash.

Discuss this Question


25. Suppose you want to get the value of a hash field stored at the specified key, which of the following commands will you use?

  1. HGET key field
  2. HKEYS key
  3. HVALS key
  4. GET key

Answer: A) HGET key field

Explanation:

HGET Key field command is used if you want to get the value of a hash field stored at the specified key.

Discuss this Question


26. Which of the following commands is used to add the element to a set?

  1. ADD
  2. SADD key member1 [member2]
  3. SADD KEY
  4. ADDSET KEY

Answer: B) SADD key member1 [member2]

Explanation:

SADD key member1 [member2] command is used when you want to add an element to a set.

Discuss this Question


27. Suppose you are asked to intersect multiple sets and store the resulting set in a key, in this situation which of the following commands will you use?

  1. INTERSECTSTORE destination key1 [key2]
  2. SINTERSECT destination key1 [key2]
  3. SINTERSTORE destination key1 [key2]
  4. SSTOREINTER destination key1 [key2]

Answer: C) SINTERSTORE destination key1 [key2]

Explanation:

SINTERSTORE destination key1 [key2] is the command you will use in a situation where you are asked to intersect multiple sets and store the resulting set in a key.

Discuss this Question


28. Which of the following commands will give you the index of a member in a sorted set?

  1. INDEXSORTED KEY MEMBER
  2. SINDEX KEY
  3. ZINDEX KEY
  4. ZRANK KEY MEMBER

Answer: D) ZRANK KEY MEMBER

Explanation:

ZRANK Key member command will give you the index of a member in a sorted set.

Discuss this Question


29. What are transactions in Redis?

  1. A transaction in Redis allows a group of commands to be executed at once.
  2. A transaction in Redis is a group of properties that are commonly known as ACID properties.
  3. A transaction in Redis allows a group of commands to be executed at multiple steps.

Answer: A) A transaction in Redis allows a group of commands to be executed at once.

Explanation:

A transaction in Redis allows a group of commands to be executed at once.

Discuss this Question


30. Does Redis support all the ACID properties?

  1. Yes
  2. No

Answer: B) NO

Explanation:

No, Redis does not support all the ACID properties as it is not able to accomplish consistency and durability.

Discuss this Question


31. Do Redis transactions are atomic in nature?

  1. Yes
  2. No

Answer: A) YES

Explanation:

Yes, Redis transactions are atomic in nature which means all the commands will be processed or none will be processed.

Discuss this Question


32. In Redis, which of the following commands is used to initiate the transaction?

  1. START
  2. MULTI
  3. SET
  4. GO

Answer: B) MULTI

Explanation:

MULTI command is used to initiate the transaction in Redis.

Discuss this Question


33. In Redis, which of the following commands is used to execute the particular command?

  1. EXECUTE
  2. EXE
  3. EXEC
  4. START

Answer: C) EXEC

Explanation:

EXEC command in Redis is used to execute a particular command.

Discuss this Question


34. Scripts in Redis are written in which language?

  1. ANSI C
  2. LUA
  3. DART
  4. JAVA

Answer: B) LUA

Explanation:

Scripts in Redis are actually written in LUA language.

Discuss this Question


35. Which of the following commands is used for scripting in Redis?

  1. SCRIPT
  2. SCI
  3. EVAL

Answer: C) EVAL

Explanation:

EVAL is the command which is used for scripting in Redis.

Discuss this Question


36. Which of the following commands is used to validate the server whether it is running or not?

  1. VALIDATE
  2. PONG
  3. PING
  4. ECHO

Answer: C) PING

Explanation:

PING command is used to validate the server whether it is running or not.

Discuss this Question


37. Which of the following commands is used to close the connection?

  1. CLOSE
  2. QUIT
  3. DISCLOSE
  4. VACATE

Answer: B) QUIT

Explanation:

QUIT command is used to close the connection.

Discuss this Question


38. Suppose you are asked to remove all the keys from all databases, which of the following commands will you use?

  1. FLUSHKEY
  2. FLUSHALLKEY
  3. FLUSHALL
  4. FLUSHDB

Answer: C) FLUSHALL

Explanation:

FLUSHALL will remove all the keys from all databases.

Discuss this Question


39. Suppose you are asked to remove all the keys from the current database, which of the following commands will you use?

  1. FLUSHKEY
  2. FLUSHALLKEY
  3. FLUSHALL
  4. FLUSHDB

Answer: D) FLUSHDB

Explanation:

FLUSHALL will remove all the keys from the current databases.

Discuss this Question


40. Which of the following commands create a backup of a current Redis database?

  1. BACKUP
  2. BG
  3. SAVE

Answer: C) SAVE

Explanation:

SAVE command is used to create a backup of a current Redis database.

Discuss this Question


41. Which of the following files is created by executing the SAVE command?

  1. Backup.rdb
  2. Backup.redis
  3. Save.rdb
  4. Dump.rdb

Answer: D) Dump.rdb

Explanation:

Dump.rdb file is created when we execute the SAVE command for the backup.

Discuss this Question


42. Dump.rdb file will be created in ____?

  1. Redis directory
  2. Redis client side
  3. Redis backup folder

Answer: A) Redis directory

Explanation:

In the Redis directory, Dump.rdb file will be created.

Discuss this Question


43. Which of the following commands is the alternative command to create a backup?

  1. BACKUP
  2. BG
  3. BACKUPSAVE
  4. BGSAVE

Answer: D) BGSAVE

Explanation:

BGSAVE command is the other alternative command which will help us to create a backup in Redis.

Discuss this Question


44. A ____ test is a method of assessing Redis performance by running multiple (n) commands simultaneously.

  1. Redis security
  2. Redis performance
  3. Redis benchmark
  4. Redis Latency

Answer: C) Redis benchmark

Explanation:

A Redis benchmark test is a method of assessing Redis performance by running multiple (n) commands simultaneously.

Discuss this Question


45. Which of the following commands closes a given client connection?

  1. CLIENT CLOSE
  2. CLOSE
  3. CLIENT QUIT
  4. CLIENT KILL

Answer: D) CLIENT KILL

Explanation:

With the help of CLIENT KILL command the client connection is closed.

Discuss this Question


46. On which of the following protocols does the Redis server run?

  1. RESP (Redis Serialization Protocol)
  2. User Datagram Protocol (UDP)
  3. Post office Protocol (POP)

Answer: A) RESP (Redis Serialization Protocol)

Explanation:

Clients in Redis basically use RESP (Redis Serialization Protocol) to communicate with servers.

Discuss this Question


47. Does Redis follow UDP for connection?

  1. Yes
  2. No

Answer: B) NO

Explanation:

Redis follows TCP for connection.

Discuss this Question


48. With____, multiple commands can be executed simultaneously without waiting on the results of each one.

  1. Redis Benchmark
  2. Redis Pipelining
  3. Redis Security
  4. Redis Latency

Answer: B) Redis Pipelining

Explanation:

With Redis pipelining, multiple commands can be executed simultaneously without waiting on the results of each one.

Discuss this Question


49. With ____, your Redis data is split between multiple Redis instances so that each one only contains a subset of your keys.?

  1. Redis Benchmark
  2. Redis Pipelining
  3. Redis Security
  4. Redis Latency
  5. Redis Partitioning

Answer: E) Redis Partitioning

Explanation:

With partitioning, your Redis data is split between multiple Redis instances so that each one only contains a subset of your keys.

Discuss this Question


50. How many types of partitioning are provided by Redis?

  1. 2
  2. 3
  3. 4
  4. 5

Answer: A) 2

Explanation:

Two types of partitioning are provided by Redis:

  • Range Partitioning
  • Hash Partitioning

Discuss this Question


51. In which type of partitioning, specific Redis instances are mapped to ranges of objects?

  1. Range Partitioning
  2. Hash Partitioning

Answer: A) Range Partitioning

Explanation:

In Range Partitioning, specific Redis instances are mapped to ranges of objects.

Discuss this Question


52. In which type of partitioning, data is stored in different Redis instances using hashed keys to convert them into numbers?

  1. Range Partitioning
  2. Hash Partitioning

Answer: B) Hash Partitioning

Explanation:

In hash partitioning, data is stored in different Redis instances using hashed keys to convert them into numbers.

Discuss this Question


53. What is Memcached?

  1. Memcached is an in-memory key-value store.
  2. Memcached is an in-memory document store.
  3. Memcached is an in-memory column-oriented store.
  4. Memcached is an in-memory graph store.

Answer: A) Memcached is an in-memory key-value store.

Explanation:

Memcached is an in-memory key-value store.

Discuss this Question


54. Does Memcached support replication?

  1. Yes
  2. No

Answer: B) NO

Explanation:

Memcached does not support replication.

Discuss this Question


55. Among Memcached and Redis, which is more efficient in handling the traffic?

  1. Memcached
  2. Redis

Answer: A) Memcached

Explanation:

Memcached is good at handling traffic whereas Redis cannot handle heavy traffic.

Discuss this Question


56. Is Redis a NoSQL DB or a Relational management database?

  1. NoSQL
  2. Relational management database

Answer: A) NoSQL

Explanation:

Redis is a NoSQL DB.

Discuss this Question


57. Which type of value-storing model does MongoDB support?

  1. Key-value store model
  2. Document store model
  3. Column-oriented store model
  4. Graph store model

Answer: B) Document store model

Explanation:

MongoDB supports a document store model.

Discuss this Question


58. In which language, MongoDB has been written?

  1. ANSI C language
  2. Python
  3. Java
  4. C++

Answer: D) C++

Explanation:

MongoDB is written in the C++ language.

Discuss this Question


59. Which server-side scripting language does MongoDB use?

  1. ANSI C
  2. LUA
  3. JAVASCRIPT
  4. JAVA

Answer: C) JAVASCRIPT

Explanation:

MongoDB uses JAVASCRIPT as its scripting language.

Discuss this Question


60. Which of the following DB purposes is to store and analyze data?

  1. Redis
  2. MongoDB
  3. Memcached
  4. ElasticSearch
  5. Aerospike

Answer: D) ElasticSearch

Explanation:

Elasticsearch is a tool whose purpose is to store and analyze data.

Discuss this Question


61. Which of the following DB is known to be a flash-optimized in-memory NoSQL Database?

  1. Redis
  2. MongoDB
  3. Memcached
  4. ElasticSearch
  5. Aerospike

Answer: E) Aerospike

Explanation:

Aerospike is known to be a flash-optimized in-memory NoSQL Database.

Discuss this Question


62. Which type of value-storing model does Aerospike support?

  1. Key-value store model
  2. Document store model
  3. Column-oriented store model
  4. Graph store model

Answer: A) Key-value store model

Explanation:

Aerospike supports the Key-value store model.

Discuss this Question




Comments and Discussions!

Load comments ↻





Copyright © 2024 www.includehelp.com. All rights reserved.