MongoDB

MongoDB

SQL to Aggregation Mapping Chart has 20 Questions
__________ references the root document, i.e. the top-level document, currently being processed in the aggregation pipeline stage.

CURRENT
ROOT
PRUNE
All of the mentioned
Point out the wrong statement

Variables can hold any BSON type data
Aggregation expressions can use both user-defined and system variables
To access the value of the variable, use a string with the variable name prefixed with double dollar signs ($$)
None of the mentioned
Which of the operator is similar to order by clause in RDBMS ?

$sort
$match
$sortby
None of the mentioned
Which of the following provides similar functionality to join ?

$unwindelem
$unwind
$unwin
None of the mentioned
Point out the wrong statement:

CURRENT references the start of the field path being processed in the aggregation pipeline stage
All stages start with CURRENT the same as ROOT
DESCENDING is one of the allowed results of a $let expression
None of the mentioned
________ limits the number of documents in result set

$project
$geo
$limit
None of the mentioned
COUNT function is provided by _________ in MongoDB

$end
$sum
$max
All of the mentioned
____________ works similar to HAVING clause in SQL

$setcon
$group
$match
None of the mentioned
_______ groups documents by some specified expression and outputs to the next stage a document for each distinct grouping.

$setcon
$group
$match
None of the mentioned
Which of the following is used to retrieve like SELECT clause in SQL ?

$reduce
$select
$project
None of the mentioned
When you query a collection, MongoDB returns a ________ object that contains the results of the query.

row
cursor
colums
None of the mentioned
Point out the correct statement:

A database is a set of key-value pairs
A MongoDB deployment hosts a number of databases
A document holds a set of collections
All of the mentioned
Which of the following method returns true if the cursor has documents ?

hasMethod()
hasNext()
hasDoc()
All of the mentioned
Point out the wrong statement:

Documents have static schema in MongoDB
Eventually-consistent reads can be distributed over replicated servers
Indexes can include keys from embedded documents and arrays.
None of the mentioned
____________ method renders the document in a JSON-like format.

displayjson
print
printjson
printdoc
Which of the following line skips the first 5 documents in the bios collection and returns all remaining documents

db.bios.find().limit( 5 )
db.bios.find().skip( 1 )
db.bios.find().skip( 5 )
db.bios.find().sort( 5 )
The __________ method limits the number of documents in the result set.

limit()
limitOf()
limitBy()
None of the mentioned
Which of the following method corresponds to Order by clause in SQL?

sort()
order()
orderby()
All of the mentioned
The mongo shell and the drivers provide several cursor methods that call on the cursor returned by the _______ method to modify its behavior

cursor()
find()
findc()
None of the mentioned
Which of the following method is called while accessing documents using the array index notation ?

cur.toArray()
cursor.toArray()
doc.toArray()
All of the mentioned