JOBSEEKERS
Login
Sign Up
Jobseeker
Employer
Staffing Firm
Direct Client
MongoDB interview questions part 37
MongoDB interview questions part 37
Back
Take as many assements as you can to improve your validate your skill rating
Total Questions: 20
1. A rollback reverts _______ operations on a former primary when the member rejoins the replica set after a failover.
A. read
B. write
C. view
D. secondary
Show Correct Answer
Correct Answer is :
write
2. A priority __ member is a secondary that cannot become primary.
A. 0
B. 1
C. 2
D. None of the mentioned
Show Correct Answer
Correct Answer is :
0
3. Point out the correct statement :
A. Elections does not occur when the primary becomes unavailable and the replica set members autonomously select a new primary
B. A priority 1 member maintains a copy of the data set, accepts read operations, and votes in elections
C. In a two-member replica set, in one data center hosts the primary and a secondary.
D. None of the mentioned
Show Correct Answer
Correct Answer is :
Elections does not occur when the primary becomes unavailable and the replica set members autonomously select a new primary
4. A second data center hosts one priority 0 member that cannot become :
A. primary
B. write
C. view
D. Secondary
Show Correct Answer
Correct Answer is :
primary
5. A ______ member maintains a copy of the primary’s data set but is invisible to client applications.
A. primary
B. delayed
C. hidden
D. none of the mentioned
Show Correct Answer
Correct Answer is :
hidden
6. _________ is used to read the contents of the rollback files.
A. bsondumpdata
B. bsondp
C. bsondump
D. none of the mentioned
Show Correct Answer
Correct Answer is :
bsondump
7. The db.________ method does not display hidden members.
A. isPrima ry()
B. isMaster()
C. Master()
D. none of the mentioned
Show Correct Answer
Correct Answer is :
isMaster()
8. In a sharded cluster, _______ do not interact with hidden members.
A. mongod
B. mongos
C. mongostore
D. all of the mentioned
Show Correct Answer
Correct Answer is :
mongos
9. The order of documents returned by a query is not defined unless you specify a ______
A. sortfind()
B. sortelse()
C. sort()
D. none of the mentioned
Show Correct Answer
Correct Answer is :
sort()
10. Point out the correct statement :
A. Queries specify criteria, or conditions, that identify the documents that MongoDB returns to the clients
B. Write operations, or queries, retrieve data stored in the database
C. The selection limits the amount of data that MongoDB returns to the client over the network
D. All of the mentioned
Show Correct Answer
Correct Answer is :
Queries specify criteria, or conditions, that identify the documents that MongoDB returns to the clients
11. In aggregation pipeline, the _______ pipeline stage provides access to MongoDB queries.
A. $catch
B. $match
C. $batch
D. All of the mentioned
Show Correct Answer
Correct Answer is :
$match
12. Which of the following method returns one document?
A. findOne()
B. findOne1()
C. selectOne()
D. all of the mentioned
Show Correct Answer
Correct Answer is :
findOne()
13. Point out the wrong statement :
A. sort() modifier sorts the results by age in ascending order
B. Queries in MongoDB return all fields in all matching documents by default
C. To scale the amount of data that MongoDB sends to applications, include a projection in the queries.
D. None of the mentioned
Show Correct Answer
Correct Answer is :
To scale the amount of data that MongoDB sends to applications, include a projection in the queries.
14. Which of the following is second argument to projection ?
A. findOne()
B. findOne1()
C. selectOne()
D. find()
Show Correct Answer
Correct Answer is :
find()
15. Which of the following query selects documents in the records collection that match the condition { “user_id”: { $lt: 42 } } ?
A. db.records.findOne( { “user_id”: { $lt: 42 } }, { “history”: 0 } )
B. db.records.find( { “user_id”: { $lt: 42 } }, { “history”: 0 } )
C. db.records.findOne( { “user_id”: { $lt: 42 } }, { “history”: 1 } )
D. db.records.select( { “user_id”: { $lt: 42 } }, { “history”: 0 } )
Show Correct Answer
Correct Answer is :
db.records.find( { “user_id”: { $lt: 42 } }, { “history”: 0 } )
16. Which of the following functionality is used for aggregation framework ?
A. $match
B. $project
C. $projectmatch
D. All of the mentioned
Show Correct Answer
Correct Answer is :
$project
17. To suppress the _id field from the result set, specify _________ in the projection document.
A. _id: 1
B. _id: 0
C. _id: it
D. None of the mentioned
Show Correct Answer
Correct Answer is :
_id: 0
18. Which of the following is not a projection operator ?
A. $slice
B. $elemMatch
C. $
D. None of the mentioned
Show Correct Answer
Correct Answer is :
None of the mentioned
19. Which of the following flag can be set by mongo shell ?
A. Timeout
B. noTimeout
C. Time
D. None of the mentioned
Show Correct Answer
Correct Answer is :
noTimeout
20. Point out the correct statement :
A. Intervening read operations on a document may result in a cursor that returns a document more than once if that document has changed
B. The MongoDB server returns the query results in batches
C. Subsequent batch size is 50 megabytes
D. None of the mentioned
Show Correct Answer
Correct Answer is :
The MongoDB server returns the query results in batches
Similar Interview Questions
Search for latest jobs
Find Jobs