MongoDB interview questions part 37

MongoDB interview questions part 37

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.

Correct Answer is : write

2. A priority __ member is a secondary that cannot become primary.

Correct Answer is : 0

3. Point out the correct statement :

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 :

Correct Answer is : primary

5. A ______ member maintains a copy of the primary’s data set but is invisible to client applications.

Correct Answer is : hidden

6. _________ is used to read the contents of the rollback files.

Correct Answer is : bsondump

7. The db.________ method does not display hidden members.

Correct Answer is : isMaster()

8. In a sharded cluster, _______ do not interact with hidden members.

Correct Answer is : mongos

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

Correct Answer is : sort()

10. Point out the correct statement :

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.

Correct Answer is : $match

12. Which of the following method returns one document?

Correct Answer is : findOne()

13. Point out the wrong statement :

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 ?

Correct Answer is : find()

15. Which of the following query selects documents in the records collection that match the condition { “user_id”: { $lt: 42 } } ?

Correct Answer is : db.records.find( { “user_id”: { $lt: 42 } }, { “history”: 0 } )

16. Which of the following functionality is used for aggregation framework ?

Correct Answer is : $project

17. To suppress the _id field from the result set, specify _________ in the projection document.

Correct Answer is : _id: 0

18. Which of the following is not a projection operator ?

Correct Answer is : None of the mentioned

19. Which of the following flag can be set by mongo shell ?

Correct Answer is : noTimeout

20. Point out the correct statement :

Correct Answer is : The MongoDB server returns the query results in batches

Similar Interview Questions

    Search for latest jobs

    Icon
    Icon