MongoDB

MongoDB

Read Operations has 26 Questions

The order of documents returned by a query is not defined unless you specify a ______

sortfind()
sortelse()
sort()
None of the mentioned
Point out the correct statement :

Queries specify criteria, or conditions, that identify the documents that MongoDB returns to the clients
Write operations, or queries, retrieve data stored in the database
The selection limits the amount of data that MongoDB returns to the client over the network
All of the mentioned
In aggregation pipeline, the _______ pipeline stage provides access to MongoDB queries.

$catch
$match
$batch
All of the mentioned
Which of the following method returns one document ?

findOne()
findOne1()
selectOne()
All of the mentioned
Point out the wrong statement :

sort() modifier sorts the results by age in ascending order
Queries in MongoDB return all fields in all matching documents by default
To scale the amount of data that MongoDB sends to applications, include a projection in the queries.
None of the mentioned
Which of the following is second argument to projection ?

findOne()
findOne1()
selectOne()
find()
Which of the following query selects documents in the records collection that match the condition { "user_id"?: { $lt: 42 } } ?

db.records.findOne( { "user_id"?: { $lt: 42 } }, { "history"?: 0 } )
db.records.find( { "user_id"?: { $lt: 42 } }, { "history"?: 0 } )
db.records.findOne( { "user_id"?: { $lt: 42 } }, { "history"?: 1 } )
db.records.select( { "user_id"?: { $lt: 42 } }, { "history"?: 0 } )
Which of the following functionality is used for aggregation framework ?

$match
$project
$projectmatch
All of the mentioned
To suppress the _id field from the result set, specify _________ in the projection document.

_id: 1
_id: 0
_id: it
None of the mentioned
Which of the following is not a projection operator?

$slice
$elemMatch
$
None of the mentioned
Which of the following flag can be set by mongo shell ?

Timeout
noTimeout
Time
None of the mentioned
Point out the correct statement :

Intervening read operations on a document may result in a cursor that returns a document more than once if that document has changed
The MongoDB server returns the query results in batches
Subsequent batch size is 50 megabytes
None of the mentioned
Which of the following will display complete list of available cursor flags ?

cursor.Option()
cursor.addOption()
cursor.addOptions()
All of the mentioned
To describe the message structure, a __-like struct is used.

Pascal
C++
C
Java
Point out the wrong statement :

The MongoDB Wire Protocol is a simple socket-based, request-response style protocol
For queries that include a sort operation without an index, the server must load all the documents in memory to perform the sort before returning any results
Clients communicate with the database server through a regular TCP/IP socket
All of the mentioned
______________ specifies the number of documents to return in each batch of the response from the MongoDB instance.

cursor.batchSize(size)
cursor.Size(size)
cursor.batch(size)
All of the mentioned
The __________ method returns a document that includes a metrics field.

db.serverStats()
db.serverStatus()
db.status()
All of the mentioned
____________ is a client or database-generated identifier that uniquely identifies this message.

messageLength
responseTo
requestID
All of the mentioned
Which of the following operator is not very selective ?

$nine
$nin
$ain
None of the mentioned
An index cannot cover a query on a _______ collection when run against a mongos if the index does not contain the shard key.

vertical
sharded
horizontal
None of the mentioned
Which of the following operator is not very selective ?

$nine
$nin
$ain
None of the mentioned
An index cannot cover a query on a _______ collection when run against a mongos if the index does not contain the shard key.

vertical
sharded
horizontal
None of the mentioned
____________ is a client or database-generated identifier that uniquely identifies this message.

messageLength
responseTo
requestID
All of the mentioned
Which of the following operator is not very selective ?

$nine
$nin
$ain
None of the mentioned
Which of the following operator is not very selective ?

$nine
$nin
$ain
None of the mentioned
Which of the following operator is not very selective ?

$nine
$nin
$ain
None of the mentioned