[Q54-Q71] Dumps for Free MongoDB C100DBA Practice Exam Questions [Apr 21, 2024]

Share

Dumps for Free MongoDB C100DBA Practice Exam Questions [Apr 21, 2024] 

C100DBA Dumps PDF And Certification Training

NEW QUESTION # 54
Write the command(s) are correct to enable sharding on a database "testdb" and shard a collection "testCollection" with _id as shard key.

Answer:

Explanation:
sh.enableSharding("testdb") & sh.shardCollection("testdb.testCollection", {_id : 1 }, true )


NEW QUESTION # 55
Below is a sample document in a given collection test.
{ a : 5, b : 3, c: 2, d : 1 >
Given a compound index { a: 1, b:l, c:l, d:l}, Which of the below query will not use in-memory sorting? Select all valid.

  • A. db.test.find( { a: 5, b: 3 } ).sort( { c: 1, d : 1 } )
  • B. db.test.find( { a: 5, b: 3 } ).sort( { a: 1} )
  • C. db.test.find( { a: 5, b: 3 } ).sort( {c: 1 } )
  • D. db.test.find( { a: 5, b: 3 } ).sort( { a: 1, b: 1, c: 1 > )

Answer: A,C


NEW QUESTION # 56
Which of the following index would be optimum for the query?
Select all valid. db.test.find( { a : 5, c : 2 })

  • A. db.test.ensurelndex( { a : 1, c: 1, d: 1, b : 1})
  • B. CH db.test.ensurelndex( { a :1, c:l})
  • C. db.test.ensurelndex( { a: 1, b :1, c:l, d:l})
  • D. db.test.ensurelndex( { c:l, a: 1})

Answer: A,B


NEW QUESTION # 57
What does the following $slice query return using the following command? db.posts.find( {}, { comments: {
$slice: [ -10, 5 ] } } )

  • A. Returns 10 comments, beginning with the first
  • B. Returns 5 comments, beginning with the last 10 items
  • C. Returns 5 comments, beginning with the first 10 items
  • D. Returns 10 comments, beginning with the last

Answer: B


NEW QUESTION # 58
Which of the following is true about sharding?

  • A. Sharding is enabled at the database level
  • B. Creating a sharded key automatically creates an index on the collection using that key
  • C. We cannot change a shard key directly/automatically once it is set up
  • D. A sharded environment does not support sorting functionality since the documents lie on various mongod instances

Answer: C


NEW QUESTION # 59
What does the following $slice query return using the following command? db.posts.find( {}, { comments: { $slice: [ -10, 5 ] } } )

  • A. Returns 10 comments, beginning with the first
  • B. Returns 5 comments, beginning with the last 10 items
  • C. Returns 5 comments, beginning with the first 10 items
  • D. Returns 10 comments, beginning with the last

Answer: B


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

  • A. Skip and limit nullify each other. Hence returning the first five documents.
  • B. Skips the first five documents and returns the sixth document five times
  • C. Skips the first five documents and returns the next five
  • D. Limits the first five documents and then return them in reverse order

Answer: C


NEW QUESTION # 61
What does the output x of the following MongoDB aggregation query result into; db.posts.aggregate( [ { $group: { _id; "$author", x: { $sum: $likes } } } ] )

  • A. Average of likes on all the posts of an author, grouped by author
  • B. Sum of likes on all the posts by all the authors
  • C. Number of posts by an author
  • D. Sum of likes on all the posts by an author, grouped by author

Answer: D


NEW QUESTION # 62
In a replicated cluster, which of the following node would only be used during an election?

  • A. primary
  • B. secondary
  • C. hidden
  • D. arbiter

Answer: D


NEW QUESTION # 63
Which of the following commands will return all the posts with number of likes greater than 100 and less than 200, both inclusive?

  • A. db.posts.find({ likes : { $gte : 100, $lt : 200 } } );
  • B. db.posts.find({ likes : { $gte : 100 , $lte : 200 } } );
  • C. db.posts.find({ likes : { $gt : 100, $lt : 200 > > );
  • D. db.posts.find({ likes : { $gt : 100 , $lte : 200 } } );

Answer: B


NEW QUESTION # 64
What is the on-premise solution having functionality equivalent to cloud manager?

  • A. Journaling
  • B. Ops Manager
  • C. Replica Manager
  • D. Service Manager

Answer: B


NEW QUESTION # 65
What is the use of mongodump and mongorestore tools?

  • A. audit mongodb deployment
  • B. performance tune mongodb deployment
  • C. replicate mongodb deployments
  • D. backup mongodb deployment

Answer: D


NEW QUESTION # 66
What does the following query do when performed on the posts collection? db.posts.update({_id:l},{Title:This is post with ID 1"})

  • A. Replaces the complete document with _id as 1 with the document specified in second parameter
  • B. Updating a document is possible only with $set
  • C. Syntax error
  • D. Updates the Title of the post

Answer: A


NEW QUESTION # 67
The________operator can be used to identify an element in the array to be updated without explicitly specifying the position of the element.

  • A. $slice
  • B. $ elemMatch
  • C. Updating an array field without knowing its index is not possible.
  • D. $

Answer: D


NEW QUESTION # 68
In what format does mongodump creates backup files?

  • A. JSON
  • B. SOAP
  • C. XML
  • D. BSON

Answer: D


NEW QUESTION # 69
What is the output of the following program?

  • A. 60 s
  • B. 100 s
  • C. 1s
  • D. 100 ms

Answer: A


NEW QUESTION # 70
Which of the following commands finds all the documents in the posts collection with post timestamp field as null?

  • A. db.posts.find( { post_timestamp : { $type; 10 > > )
  • B. db.posts.find( { post_timestamp: { $type: null } } )
  • C. db.posts.find( { post_timestamp: { $fieldtype: null } } )
  • D. db.posts.find( { post_timestamp: { $fieldtype: 10 } } )

Answer: A


NEW QUESTION # 71
......

Check your preparation for MongoDB C100DBA On-Demand Exam: https://testking.vceengine.com/C100DBA-vce-test-engine.html