Google News
logo
Redis - Quiz(MCQ)
A)
NoSQL database
B)
End-user database
C)
Commercial database
D)
Relational database

Correct Answer :   NoSQL database


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.

A)
January 10, 2009
B)
March 10, 2009
C)
May 10, 2009
D)
September 10, 2009

Correct Answer :   May 10, 2009

A)
Brad Fitzpatrick
B)
Kevin Young
C)
Fabien Potencier
D)
Salvatore Sanfilippo

Correct Answer :   Salvatore Sanfilippo


Explanation : The project was developed and maintained by Salvatore Sanfilippo, starting in 2009. From 2015 until 2020, he led a project core team sponsored by Redis Labs. Salvatore Sanfilippo left Redis as the maintainer in 2020. It is open-source software released under a BSD 3-clause license.

A)
Graph format
B)
Key-value store
C)
Document format
D)
Column-oriented

Correct Answer :   Key-value store


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

A)
2
B)
3
C)
4
D)
5

Correct Answer :   2


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

A)
Redis client
B)
Redis server.
C)
Both (A) and (B)
D)
None of the above

Correct Answer :   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.

A)
Redis
B)
MongoDB
C)
Aerospike
D)
ElasticSearch

Correct Answer :   Aerospike


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

A)
Redis
B)
MongoDB
C)
Memcached
D)
ElasticSearch

Correct Answer :   ElasticSearch


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

A)
Redis is an open source
B)
Redis advanced key-value store
C)
Redis scalable web applications
D)
All of the above

Correct Answer :   All of the above


Explanation : Redis is an open source, advanced key-value store and an apt solution for building highperformance, scalable web applications.

A)
10000
B)
110000
C)
111000
D)
1000000

Correct Answer :   110000


Explanation : Redis is very fast and can perform about 110000 SETs per second, about 81000 GETs per second.

A)
Bitmaps
B)
Hyper log
C)
Geospatial indexes
D)
All of the above

Correct Answer :   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.

A)
PHP
B)
Java
C)
ANSI C language
D)
Python

Correct Answer :   ANSI C language


Explanation : Redis is written in the ANSI C language.

A)
JAVASCRIPT
B)
LUA
C)
JAVA
D)
ANSI C

Correct Answer :   JAVASCRIPT


Explanation : MongoDB uses JAVASCRIPT as its scripting language.

A)
C++
B)
Java
C)
Python
D)
ANSI C language

Correct Answer :   C++


Explanation : MongoDB is written in the C++ language.

A)
Graph store model
B)
Document store model
C)
Key-value store model
D)
Column-oriented store model

Correct Answer :   Document store model


Explanation : MongoDB supports a document store model.

A)
CONFIG PUT CONFIG_SETTING_NAME
B)
CONFIG SET CONFIG_SETTING_NAME
C)
CONFIG GET CONFIG_SETTING_NAME
D)
All of the above

Correct Answer :   CONFIG GET CONFIG_SETTING_NAME


Explanation : The basic syntax of Redis CONFIG command : CONFIG GET CONFIG_SETTING_NAME

A)
CONFIG put command
B)
CONFIG set command
C)
CONFIG alter command
D)
CONFIG update command

Correct Answer :   CONFIG set command


Explanation : To update configuration, you can edit redis.conf file directly or you can update configurations via CONFIG set command.

A)
redis.set
B)
redis.txt
C)
redis.conf
D)
redis.config

Correct Answer :   redis.conf


Explanation : In Redis, there is a configuration file (redis.conf) available at the root directory of Redis.

A)
Yes
B)
No
C)
Can not say
D)
--

Correct Answer :   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.

A)
RDBMS
B)
Redis
C)
Both (A) and (B)
D)
None of the above

Correct Answer :   Redis


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

A)
Memcached
B)
Redis
C)
Both (A) and (B)
D)
None of the above

Correct Answer :   Memcached


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

A)
Memcached is an in-memory document store.
B)
Memcached is an in-memory graph store.
C)
Memcached is an in-memory column-oriented store.
D)
Memcached is an in-memory key-value store.

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

A)
Range Partitioning
B)
Hash Partitioning
C)
Both (A) and (B)
D)
None of the above

Correct Answer :   Hash Partitioning


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

A)
3
B)
4
C)
5
D)
6

Correct Answer :   5


Explanation : Redis supports 5 types of data types : Strings, Hashes, Lists, Sets, Sorted Sets.

A)
128
B)
256
C)
512
D)
1024

Correct Answer :   512


Explanation : A string value can be at max 512 megabytes in length.

A)
Set
B)
Get
C)
Put
D)
Post

Correct Answer :   Set


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

A)
Hashes
B)
Sets
C)
Lists
D)
Sorted Sets

Correct Answer :   Hashes


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

A)
Set
B)
HMSET
C)
Get
D)
HMGET

Correct Answer :   HMSET


Explanation :

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

A)
Hash Partitioning
B)
Range Partitioning
C)
Both (A) and (B)
D)
None of the above

Correct Answer :   Range Partitioning


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

30 .
Which of the following is a key in string?
 
SET name "freetimelearn" 
A)
set
B)
get
C)
name
D)
None of the above

Correct Answer :   name


Explaination : SET and GET are Redis commands, name is the key used in Redis and tutorialspoint is the string value that is stored in Redis.

A)
Sets
B)
Lists
C)
Hashes
D)
Strings

Correct Answer :   Sets


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

A)
Dump
B)
Expire
C)
Delete
D)
Del

Correct Answer :   Del


Explanation : To delete a key in Redis DEL command is used.

A)
Like pattern
B)
Like keys Pattern
C)
Keys pattern
D)
None of the above

Correct Answer :   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.

A)
Is_key
B)
Is_there
C)
Key_exist
D)
Exist key

Correct Answer :   Exist key


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

A)
2
B)
3
C)
4
D)
5

Correct Answer :   2


Explanation :

Two types of partitioning are provided by Redis :
 
* Range Partitioning
* Hash Partitioning

A)
Redis Latency
B)
Redis Partitioning
C)
Redis Security
D)
Redis Pipelining

Correct Answer :   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.

A)
leaf
B)
Head
C)
Tail
D)
Both (B) and (C)

Correct Answer :   Both (B) and (C)


Explanation : You can add elements to a Redis List on the head or on the tail.

A)
O(1)
B)
O(N)
C)
O(N*N)
D)
O(NLOGN)

Correct Answer :   O(1)


Explanation : In Redis, you can add, remove, and test for the existence of members in O(1) time complexity.

A)
Lists
B)
Strings
C)
Sets
D)
Sorted Sets

Correct Answer :   Sets


Explanation : Redis Sets are an unordered collection of strings.

A)
$redis cli
B)
$redis-cli
C)
$redis client
D)
$redis-client

Correct Answer :   $redis-cli


Explanation : Following is the basic syntax of Redis client : $redis-cli

A)
Post office Protocol (POP)
B)
User Datagram Protocol (UDP)
C)
Redis Serialization Protocol (RESP)
D)
All of the above

Correct Answer :   Redis Serialization Protocol (RESP)


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

A)
CLOSE
B)
CLIENT QUIT
C)
CLIENT CLOSE
D)
CLIENT KILL

Correct Answer :   CLIENT KILL


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

A)
Redis benchmark
B)
Redis Latency
C)
Redis security
D)
Redis performance

Correct Answer :   Redis benchmark


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

A)
help
B)
ping
C)
redis-server
D)
redis-connect

Correct Answer :   ping


Explanation : We connect to Redis server running on the local machine and execute a command PING, that checks whether the server is running or not.

45 .
The below command is used to?
 
DEL freetimelearn
A)
The command is used to set the keys.
B)
The command is used to delete the key.
C)
The command used to delete the command.
D)
None of the above

Correct Answer :   The command is used to delete the key.


Explaination : 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.

A)
SET
B)
GETSET
C)
GET
D)
GETRANGE

Correct Answer :   GET


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

A)
HLENS key
B)
HVALS key
C)
HKEYS key
D)
HDEL key field2 [field2]

Correct Answer :   HLENS key


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

A)
GET key
B)
HVALS key
C)
HKEYS key
D)
HGET key field

Correct Answer :   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.

A)
ADD
B)
SADD KEY
C)
ADDSET KEY
D)
SADD key member1 [member2]

Correct Answer :   SADD key member1 [member2]


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

A)
EXISTS key
B)
EXPIRE key seconds
C)
EXPIREAT key timestamp
D)
PEXPIRE key milliseconds

Correct Answer :   EXPIRE key seconds


Explanation : EXPIRE key seconds : Sets the expiry of the key after the specified time.

A)
TYPE key
B)
RANDOMKEY
C)
RENAME key newkey
D)
RENAMENX key newkey

Correct Answer :   RENAME key newkey


Explanation : RENAME key newkey : Changes the key name.

A)
SSTOREINTER destination key1 [key2]
B)
SINTERSTORE destination key1 [key2]
C)
SINTERSECT destination key1 [key2]
D)
INTERSECTSTORE destination key1 [key2]

Correct Answer :   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.

A)
SINDEX KEY
B)
ZINDEX KEY
C)
ZRANK KEY MEMBER
D)
INDEXSORTED KEY MEMBER

Correct Answer :   ZRANK KEY MEMBER


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

A)
BG
B)
BACKUP
C)
BACKUPSAVE
D)
BGSAVE

Correct Answer :   BGSAVE


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

A)
Dump.rdb
B)
Save.rdb
C)
Backup.rdb
D)
Backup.redis

Correct Answer :   Dump.rdb


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

A)
FLUSHDB
B)
FLUSHKEY
C)
FLUSHALL
D)
FLUSHALLKEY

Correct Answer :   FLUSHDB


Explanation : FLUSHALL will remove all the keys from the current databases.

A)
FLUSHDB
B)
FLUSHALL
C)
FLUSHKEY
D)
FLUSHALLKEY

Correct Answer :   FLUSHALL


Explanation : FLUSHALL will remove all the keys from all databases.

A)
VACATE
B)
CLOSE
C)
QUIT
D)
DISCLOSE

Correct Answer :   QUIT

A)
GO
B)
SET
C)
START
D)
MULTI

Correct Answer :   MULTI


Explanation : MULTI command is used to initiate the transaction in Redis.

A)
EXE
B)
EXEC
C)
START
D)
EXECUTE

Correct Answer :   EXEC


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