C100DBA PDF Exam Material 2021 Realistic C100DBA Dumps Questions
Updated MongoDB C100DBA Dumps – PDF & Online Engine
NEW QUESTION 38
You are in a sharded cluster. What will you do prior to initiating backup in sharded cluster?
- A. sh.stopserverQ
- B. db.stopserver()
- C. sh.stopBalancer()
- D. db.stopBalancer()
Answer: C
NEW QUESTION 39
Which of the following is a valid Replica Set configuration if you want:
1-Have 3 copies of everything
2- That RS3 is never primary
2- That RSI and RS2 can be primary?
You had to see the different configurations, RS3 could be hidden or priority 0 (But not a referee because we need
3 replicas), while RSI and RS2 could NOT have priority 0 or be hidden or anything like that In a 4-member RS RSO , RSI, RS2 and RS3 + Referee, RSO (primary) falls after some write operations that have replicated RSI and RS2 (but NOT RS3), who can get up as the new primary?
The configuration comes and in it we see that RS2 has a hidden: true (or a priority: 0, (I don't remember)
- A. O arbiter
- B. RSO
- C. ORS3
- D. ORS1
- E. ORS2
Answer: D
NEW QUESTION 40
In a collection that contains 100 post documents, what does the following command do? db. posts.
find().skip(5).limit(5)
- A. Skips the first five documents and returns the next five
- B. Limits the first five documents and then return them in reverse order
- C. Skips the first five documents and returns the sixth document five times
- D. Skip and limit nullify each other. Hence returning the first five documents
Answer: A
NEW QUESTION 41
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 42
Consider that our posts collection contains an array field called tags that contains tags that the user enters. {
Which of the following commands will find all the posts that have been tagged as tutorial.
- A. db.posts.find( { $array : {tags: "tutorial") > );
- B. db.posts.find( { tags : ["tutorial"] } );
- C. db.posts.find( { tags : "tutorial" } );
- D. db.posts.findInArray( { tags : "tutorial" > );
Answer: C
NEW QUESTION 43
What is the equivalent command in MongoDB for the following SQL query?
SELECT * FROM posts WHERE author like "%john%"
- A. db.posts.find( { author: /John/ } )
- B. db.posts.find( { $like: {author: /John/} } )
- C. db.posts.find( { author: /AjohnA/ > )
- D. db.posts.find( { author: {$like: /John/} } )
Answer: A
NEW QUESTION 44
In mongodb how do you update a document partially?
- A. $set
- B. $update
- C. $project
- D. $modify
Answer: A
NEW QUESTION 45
Consider that the posts collection contains an array called ratings which contains ratings given to the post by various users in the following format:
Which of the following query will return all the documents where the ratings array contains elements that in some combination satisfy the query conditions?
- A. db.inventory.find( { ratings: { ratings.$: { $gt: 5, $lt: 9 } } } )
- B. db.inventory.find( { ratings: { $elemMatch: { $gte: 3, $lte: 6 } } } )
- C. db.inventory.find( { ratings: { $elemMatch: { $gt: 3, $lt: 6 }
- D. db.inventory.find( { ratings: { ratings: { $gt: 5, $lt: 9 } } } )
Answer: D
NEW QUESTION 46
Which of the following is true about sharding?
- A. We cannot change a shard key directly/automatically once it is set up
- B. Sharding is enabled at the database level
- C. Creating a sharded key automatically creates an index on the collection using that key
- D. A sharded environment does not support sorting functionality since the documents lie on various mongod instances
Answer: A
NEW QUESTION 47
Which type of indexes does MongoDB support?
- A. Multikey Indexes
- B. Compound Indexes
- C. All of the above
- D. Geospatial Indexes
Answer: C
NEW QUESTION 48
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: null } } )
- B. db.posts.find( { post_timestamp: { $fieldtype: 10 } } )
- C. db.posts.find( { post_timestamp: { $fieldtype: null } } )
- D. db.posts.find( { post_timestamp : { $type; 10 > > )
Answer: D
NEW QUESTION 49
You have a replicated cluster with 1 primary, 3 secondary, 1 arbiter. One of the secondary is hidden. What is the replication factor of this replicated cluster?
- A. 06
- B. 04
- C. 0
- D. 03
Answer: B
NEW QUESTION 50
Addding the index {a:l} can potentially decrease the speed of which of the following operations? Check all that apply.
- A. db.collection.insert( { a:341})
- B. db.collection.find( {a : 232} )
- C. db.collection.update({b:456>, {$inc: {a:l> })
Answer: A,C
NEW QUESTION 51
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 > )
- B. db.sample.update( { "_id" : 3 > , { "_id" : 7 , "c" : 4 > , { "justOne" : true > ) / This operation cannot be done with a single query.
- C. db.sample.update( { "_id" : 3 > , { "_id" : 7 , "c" : 4 , { "$unset" : [ "a" , "b" ] } } )
- D. db.sample.update( { "_id" : 3 } , { "$set" : { "_id" : 7 , "c" : 4 > > )
Answer: C
NEW QUESTION 52
Which of the following aggregation commands in MongoDB does not support sharded collections?
- A. All of the above
- B. group
- C. aggregate
- D. mapReduce
Answer: B
NEW QUESTION 53
Aggregation Pipelines have a limit of:
- A. No limit on document and 100 MB RAM
- B. 2 MB document and 100 MB RAM
- C. 16 MB document and 100 MB RAM
- D. 2 MB document and no limit on RAM
Answer: C
NEW QUESTION 54
Using an arbiter allows one to easily ensure an odd number of voters in replica sets. Why is this important?
- A. To help in disaster recovery
- B. To add greather redundancy
- C. To protect agains network partitions
- D. For more efficient backup operations
- E. To enable certain read preference settings
Answer: C
NEW QUESTION 55
Below is a sample document of "orders" collection
Answer:
Explanation:
$project
NEW QUESTION 56
......
MongoDB C100DBA Dumps PDF Are going to be The Best Score: https://www.testsimulate.com/C100DBA-study-materials.html