wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Mongodb

Total questions: 22

Worksheet time: 14mins

Name
Class
Date
1.

Point out the correct statement

a)

MongoDB is classified as a NoSQL database

b)

MongoDB favors XML format more than JSON

c)

MongoDB is column oriented database store

d)

All of the mentioned

2.

MongoDB is a _________ database that provides high performance, high availability, and easy scalability.

a)

Graph

b)

Key value

c)

Document

d)

All of the mentioned

3.

NoSQL databases is used mainly for handling large volumes of ______________ data.

a)

Unstructured

b)

Structured

c)

Semi-structured

d)

All of the mentioned

4.

Collection is a group of MongoDB ___________?

a)

Database

b)

Document

c)

Row

d)

Table

5.

How to get the list of databases in your system?

a)

display dbs

b)

db

c)

show db

d)

show dbs

6.

How to create a database in mongodb?

a)

create databaseName

b)

new databaseName

c)

use databaseName

d)

None of the above

7.

After starting the mongo shell, your session will use the (a)   database by default.

8.

method is used to query documents in collections?

(a)  

9.

Which of the following operation adds a new document to the users collection?

a)

add

b)

insert

c)

truncate

d)

drop

10.

Which of the following is not a NoSQL database?

a)

SQL Server

b)

MongoDB

c)

Cassandra

d)

couchDB

11.

What is the interactive shell for MongoDB called?

a)

Mongo

b)

dbmong

c)

mongosh

d)

mongodb

12.

Which of the following line skips the first 5 documents in the bios collection and returns all remaining documents?

a)

db.bios.find().limit( 5 )

b)

db.bios.find().skip( 1 )

c)

db.bios.find().skip( 5)

d)

db.bios.find().sort( 5 )

13.

The __________ method limits the number of documents in the result set.

a)

limit

b)

limitOf

c)

limitBy

d)

None of the Above

14.

Which of the following method corresponds to Order by clause in SQL?

a)

sort()

b)

order()

c)

orderby()

d)

All the above

15.

____________ method renders the document in a JSON-like format.

a)

displayjson

b)

print

c)

printjson

d)

printdoc

16.

MongoDB is a _________ database that provides high performance, high availability, and easy scalability.

a)

Graph

b)

Key-Value

c)

Document

d)

All the above

17.

What is the equivalent command in MongoDB for the following SQL query?

SELECT * FROM posts WHERE author like "%john%"

a)

db.posts.find( { author: /john/ } )

b)

db.posts.find( { author: {$like: /john/} } )

c)

db.posts.find( { $like: {author: /john/} } )

d)

db.posts.find( { author: /^john^/ } )

18.

Which language is MongoDB written in?

a)

C++

b)

Java

c)

Python

d)

MongoC

19.

which of the following will display only students name and GPA?

a)

db.Students.find({},{"sName":1, "GPA":1})

b)

db.Students.find({},{"sName":1, "GPA":1, "_id":0})

c)

db.Students.find({},{"sName":1, "GPA":0})

d)

db.Students.find({"sName":1, "GPA":1, "_id":0})

20.

Which of the following will display details of sName "Sumit"?

a)

db.Students.find({sName: "Sumit"})

b)

db.Students.find({sName: "Sumit"},{"sName":1, "GPA":1, "_id":0})

c)

db.Students.find({sName: "Sumit"},{"sName":1, "GPA":0})

d)

db.Students.find({sName: Sumit})

21.

Which of the following will display the number of students having GPA greater than 3.7?

a)

db.Students.find({})

b)

db.Students.find({GPA:3.7})

c)

db.Students.find({GPA:{$gt:3.7}})

d)

db.Students.find({$gt:{GPA:3.7}})

22.

(a)   is the command use to check current database mounted in mongodb.