PDF File

Latest MongoDB C100DBA Practice Questions BY Berg

Question 1

Consider the following document from the products collection:

What does the following query using $elemMatch return? db.products.find( { product_code: "345678" }, { variations: { $elemMatch: { size: ^L^ } } } )

  • A. Returns the complete document but retrieves only the size field from the array
  • B. Returns the document but with only one element in the variations array (corresponding to size L)
  • C. Returns the complete document since MongoDB does not support partial array retrieval
  • D. Returns the complete document but retrieves only the size field from the array and also with only one element in the variations array (corresponding to size L)
Question 2

In a sharded cluster, from which node does one stop the balancer process before initiating backup?

  • A. Any node
  • B. replicaset primary node
  • C. config server node
  • D. mongos node