a) db.bios.find().limit( 5 ) b) db.bios.find().skip( 1 ) c) db.bios.find().skip( 5 ) d) db.bios.find().sort( 5 ) Answer: c Explanation: The ...
View QuestionThe __________ method limits the number of documents in the result set.
a) limit() b) limitOf() c) limitBy() d) none of the mentioned Answer: a Explanation: limit() corresponds to ...
View QuestionWhich of the following method corresponds to Order by clause in SQL?
a) sort() b) order() c) orderby() d) all of the mentioned Answer: a Explanation: The sort() method orders ...
View QuestionThe mongo shell and the drivers provide several cursor methods that call on the cursor returned by the _______ method to modify its behavior.
a) cursor() b) find() c) findc() d) none of the mentioned Answer: b Explanation: The method iterates ...
View QuestionWhich of the following method is called while accessing documents using the array index notation?
a) cur.toArray() b) cursor.toArray() c) doc.toArray() d) all of the mentioned Answer: b Explanation: The toArray() ...
View QuestionPoint out the wrong statement.
a) Documents have static schema in MongoDB b) Eventually-consistent reads can be distributed over replicated servers c) Indexes can ...
View Question____________ method renders the document in a JSON-like format.
a) displayjson b) print c) printjson d) printdoc Answer: c Explanation: printjson() operation displays all documents.
View QuestionWhich of the following method returns true if the cursor has documents?
a) hasMethod() b) hasNext() c) hasDoc() d) all of the mentioned Answer: b Explanation: hasNext() returns true if the ...
View QuestionPoint out the correct statement.
a) A database is a set of key-value pairs b) A MongoDB deployment hosts a number of databases
View QuestionWhen you query a collection, MongoDB returns a ________ object that contains the results of the query.
a) row b) cursor c) colums d) none of the mentioned Answer: b Explanation: The mongo shell then iterates over the ...
View Question