MongoDB DBA Quiz Questions and Answers

Which features of relational database management systems were deliberately omitted in MongoDB and help us to obtain horizontal scalability? Check all that apply.

Answer :
  • Multi-statement transactions
  • Joins

The following aggregation option is used to specify the specific fields that needs to be passed to the next stage of the aggregation pipeline:

Answer :
  • $project

In a collection that contains 100 post documents, what does the following command do? db. posts. find().skip(5).limit(5)

Answer :
  • Skips the first five documents and returns the next five

Which of the following is supported by MongoDB?

Answer :
  • Journaling

Aggregation Pipelines have a limit of:

Answer :
  • 16 MB document and 100 MB RAM

If the value of totalKeysExamined is 30000 and the value of totalDocsExamined is 0, which of the following option is correct?

Answer :
  • The query used an index to fetch the results

Which option should be used to update all the documents with the specified condition in the MongoDB query?

Answer :
  • specify {multi: true} as the third parameter of update command

In order to ensure that you can maintain high availability in the face of server failure, you should implement which of the following?

Answer :
  • Replication

The MongoDB explain() method does not support which of the following verbosity mode:

Answer :
  • executionStats

Consider a collection posts which has fields: Jd, post_text, post_author, post_timestamp, post_tags etc. Which of the following query retrieves ONLY the key named post_text from the first document retrieved?

Answer :
  • db.posts.finOne({},{_id:0, post_text:1})