[2024] Pass MongoDB C100DBA Exam in First Attempt Easily [Q27-Q52]

Share

[2024] Pass MongoDB C100DBA Exam in First Attempt Easily

The Most Efficient C100DBA Pdf Dumps For Assured Success 

NEW QUESTION # 27
Which of the tags in a replica set configuration specify the operations to be read from the node with the least network latency?

  • A. primaryPreferred
  • B. nearest
  • C. netLatency
  • D. secondaryPreferred

Answer: B


NEW QUESTION # 28
MongoDB is a schema-less design.

  • A. False
  • B. True

Answer: B


NEW QUESTION # 29
In mongodb how do you update a document partially?

  • A. $set
  • B. $modify
  • C. $update
  • D. $project

Answer: A


NEW QUESTION # 30
What read preference should your application use if you want to read from the primary under normal circumstances but allow reads from secondaries when a primary is unavailable?

  • A. nearest
  • B. primary
  • C. primaryPreferred
  • D. Secondary
  • E. secondaryPreferred

Answer: C


NEW QUESTION # 31
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, b :1, c:l, d:l})
  • B. db.test.ensurelndex( { c:l, a: 1})
  • C. CH db.test.ensurelndex( { a :1, c:l})
  • D. db.test.ensurelndex( { a : 1, c: 1, d: 1, b : 1})

Answer: C,D


NEW QUESTION # 32
Consider the following posts document:

Which of the following queries will return the documents but with only the first two tags in the tags array?

  • A. db.posts.find({author:"Tom"}.limit({tags:2})
  • B. db.posts.find({author:"Tom">,{tags:{$slice:2})
  • C. db.posts.find({author:"Tom"}.limit($slice:{tags:2>)
  • D. Both "db.posts.find({author:"Tom"},{tags:{$slice:2}})" and
    "db.posts.find({author:"Tom"}).limit($slice: {tags:2})" are valid. $slice works both with projection and limit.

Answer: B


NEW QUESTION # 33
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 : { $gt : 100, $lt : 200 > > );
  • B. db.posts.find({ likes : { $gte : 100, $lt : 200 } } );
  • C. db.posts.find({ likes : { $gt : 100 , $lte : 200 } } );
  • D. db.posts.find({ likes : { $gte : 100 , $lte : 200 } } );

Answer: D


NEW QUESTION # 34
Given a collection posts as shown below having a document array comments, which of the following command will create an index on the comment author descending?

  • A. db.posts.createIndex({comments.$.author": {$desc:l>});
  • B. db.posts.createIndex({commerits.$.author":-l});
  • C. db.posts.createIndex({comments.author":-l});

Answer: C


NEW QUESTION # 35
In which of the following scenarios is sharding not the correct option. Select all that apply.

  • A. The collection is a read intensive collection with less working set
  • B. The write operations on the collection are very high
  • C. The write operations on the collection are low
  • D. The working set in the collection is expected to grow very large in size

Answer: A,C


NEW QUESTION # 36
Given a collection posts as shown below having a document array comments, which of the following command will create an index on the comment author descending?

  • A. db.posts.createIndex({^comments.$.author":-l});
  • B. db. posts.createIndex({^comments.author" :1});
  • C. db.posts.createIndex({^commerits.author";-!});

Answer: C


NEW QUESTION # 37
Which of the following aggregate commands in MongoDB uses a pipeline approach with the goals of improving the aggregation performance?

  • A. All of the above
  • B. mapReduce
  • C. group
  • D. aggregate

Answer: D


NEW QUESTION # 38
What does the following aggregate query perform?

  • A. Groups the posts by number of likes (101, 102, 103.) by adding 1 every time
  • B. Fetches the posts with likes between 100 and 200 and sets their _id as null
  • C. Fetches the posts with likes between 100 and 200, sets the _id of the first document as null and then increments it 1 every time
  • D. Calculates the number of posts with likes between 100 and 200

Answer: D


NEW QUESTION # 39
Which of the following is a valid insert statement in mongodb? Select all valid.

  • A. db.test.insert({x:2},{y:"apple"})
  • B. db.test.push({x:2,y:"apple"})
  • C. db.test.insert{"x":2, "y":"apple"})
  • D. db.test.insert({x:2,y:"apple"})

Answer: C,D


NEW QUESTION # 40
What does the following aggregate query perform?

  • A. Groups the posts by number of likes (101, 102, 103.) by adding 1 every time
  • B. Fetches the posts with likes between 100 and 200 and sets their _id as null
  • C. Fetches the posts with likes between 100 and 200, sets the _id of the first document as null and then increments it 1 every time
  • D. Calculates the number of posts with likes between 100 and 200

Answer: D


NEW QUESTION # 41
Given a collection posts as shown below having a document array comments, which of the following command will create an index on the comment author descending?

  • A. db.posts.createIndex({comments.$.author": {$desc:l>});
  • B. db.posts.createIndex({commerits.$.author":-l});
  • C. db.posts.createIndex({comments.author":-l});

Answer: C


NEW QUESTION # 42
What is the maximum size of Index Key Limit and Number of Indexes per collection?

  • A. 12 mega bytes and 64 indexes
  • B. 1024 bytes and unlimited indexes
  • C. 1024 bytes and 64 indexes
  • D. 64 bytes and 1024 indexes

Answer: C


NEW QUESTION # 43
Consider the following example document from the sample collection. All documents in this collection have the same schema.

Which of the following queries will replace this with the document.

  • A. db.sample.update( { "_id" : 3 > , { "_id" : 7 , "c" : 4 > , { "justOne" : true > ) / This operation cannot be done with a single query.
  • B. db.sample.update( { "_id" : 3 > , { "_id" : 7 , "c" : 4 , { "$unset" : [ "a" , "b" ] } } )
  • C. db.sample.update( { "_id" : 3 } , { "$set" : { "_id" : 7 , "c" : 4 > > )
  • D. db.sample.update( { "_id" : 3 > , { "_id" : 7 , "c" : 4 > )

Answer: B


NEW QUESTION # 44
In a sharded replica set environment, the w Option provides ability for write concern and j Option provides ability for the data to be written on disk journal. Consider that we have a seven member replica set and we want to assure that the writes are committed to journal. What should be the value of j?

  • A. 0
  • B. 1
  • C. 2
  • D. 3

Answer: B


NEW QUESTION # 45
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: { $fieldtype: null } } )
  • B. db.posts.find( { post_timestamp: { $fieldtype: 10 } } )
  • C. db.posts.find( { post_timestamp: { $type: null } } )
  • D. db.posts.find( { post_timestamp : { $type; 10 > > )

Answer: C


NEW QUESTION # 46
Which of the following are valid json documents? Select all that apply.

  • A. {"name":"Fred Flintstone";"occupation":"Miner";"wife":"Wilma"}
  • B. { }
  • C. {"city":"New York", "population", 7999034, boros:{"queens", "manhattan", "staten island", "the bronx", u "brooklyn"}}
  • D. {"a":l, "b":{"b":l, "c":"foo", "d":"bar", "e":[l,2,4]}}

Answer: B,D


NEW QUESTION # 47
Which of the following is supported by MongoDB?

  • A. Journaling
  • B. Relationships between Collections (Primary Key Foreign Key)
  • C. ACID Transactions
  • D. Transaction Management

Answer: A


NEW QUESTION # 48
Below is a sample document of "orders" collection

  • A. $sort

Answer: A


NEW QUESTION # 49
The oplog (operations log) is a special capped collection that keeps a rolling record of all operations that modify the data stored in your databases. All the replica set members contain a copy of the oplog in the following collection:

  • A. oplog.rs
  • B. <database>..oplog.rs
  • C. local.oplog.rs
  • D. <replicasetid>.oplog.rs

Answer: C


NEW QUESTION # 50
Consider the following document:
> db.c.find()
{ "_id" : 12, b : [ 3, 5, 7, 2, 1, -4, 3, 12 ] }
Which of the following queries on the "c" collection will return only the first five elements of the array in the
"b"
field? E.g.,
Document you want returned by your query:
{ "_id" : 12, "b" : [ 3, 5, 7, 2, 1 ] >

  • A. db.c.find( { > , { b : [ 0, 1, 2, 3, 4, 5 ] > )
  • B. db.c.find( { b : [ 0 , 5 ] > )
  • C. db.c.find( { > , { b : { $substr[ 0 , 5 ] > > )
  • D. db.c.find( { > , { b : [ 0 , 5 ] > )
  • E. db.c.find( { > , { b : { $slice : [ 0 , 5 ] } } )

Answer: E


NEW QUESTION # 51
Which type of indexes does MongoDB support?

  • A. Compound Indexes
  • B. All of the above
  • C. Geospatial Indexes
  • D. Multikey Indexes

Answer: B


NEW QUESTION # 52
......

We offers you the latest free online C100DBA dumps to practice: https://examcollection.prep4king.com/C100DBA-latest-questions.html