[Dec 24, 2021] Pass Your C100DBA Dumps Free Latest MongoDB Practice Tests
Get Top-Rated MongoDB C100DBA Exam Dumps Now
NEW QUESTION 36
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 last
- 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 first
Answer: B
NEW QUESTION 37
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 38
MongoDB is
- A. Object-oriented DBMS
- B. Document-oriented DBMS
- C. None of the above
- D. Relational DBMS
Answer: B
NEW QUESTION 39
Which command can be used to rebuild the indexes on a collection in MongoDB?
- A. db.collection.reIndex({author:l})
- B. db.collection.createlndex({relndex:l})
- C. db.collection.createIndex({author:l}).reIndex()
- D. db.collection.relndexQ
Answer: D
NEW QUESTION 40
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( { c:l, a: 1})
- D. db.test.ensurelndex( { a: 1, b :1, c:l, d:l})
Answer: A,B
NEW QUESTION 41
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: D
NEW QUESTION 42
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.insert({x:2,y:"apple"})
- C. db.test.push({x:2,y:"apple"})
- D. db.test.insert({x:2},{y:"apple"})
Answer: A,B
NEW QUESTION 43
Consider the following example document:
{
"_id": Objectld("5360c0a0a655a60674680bbe"),
"user"
"login": "irOn"
"description": "Made of steel"
"date": ISODate("2014-04-30T09:16:45.836Z"),
}
>
and index creation command:
db.users.createlndex( { "user.login": 1, "user.date": -1 }, "mylndex" ) When performing the following query:
db.users.find( { "user.login": /Air.*/ },
{ "user":1, "_id":0 > ).sort( { "user.date":1 > )
which of the following statements correctly describe how MongoDB will handle the query? Check all that apply.
- A. As an optimized sort query (scanAndOrder = false) using "mylndex" because we are sorting on an indexed field
- B. As a covered query using "mylndex" because we are filtering out "_id" and only returning "user.login"
- C. None of the above
- D. MongoDB will need to do a table/collection scan to find matching documents
- E. As an indexed query using "mylndex" because field "user.login" is indexed
Answer: E
NEW QUESTION 44
By default, the MongoDB cursor in mongo shell is configured to return how many documents? To get the next set of documents, which command is used?
- A. 20, it
- B. 200, more
- C. 50, it
- D. No limit, none
Answer: A
NEW QUESTION 45
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, sets the _id of the first document as null and then increments it 1 every time
- C. Fetches the posts with likes between 100 and 200 and sets their _id as null
- D. Calculates the number of posts with likes between 100 and 200
Answer: D
NEW QUESTION 46
In a replica set, a_________number of members ensures that the replica set is always able to select a primary.
- A. Depends on the application architecture
- B. 0
- C. Odd
- D. Even
Answer: C
NEW QUESTION 47
Which of the following operators is used to updated a document partially?
- A. $set
- B. $update
- C. $project
- D. $modify
Answer: A
NEW QUESTION 48
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 49
If the value of totalKeysExamined is 30000 and the value of totalDocsExamined is 0, which of the following option is correct?
- A. The query used an index to fetch the results
- B. The query returned 0 documents
- C. None of the above
- D. The query returned 30000 documents after scanning the documents
Answer: A
NEW QUESTION 50
To add a new user and enable authentication in MongoDB, which of the following steps need be executed?
- A. update users collection and restart mongodb
- B. All of the above
- C. update users collection and run db.enableAuthenticationQ
- D. update users collection and restart mongodb with -auth option
Answer: D
NEW QUESTION 51
Dada una coleccion, cuales devuelve con la siguiente query
db.coleccion.find({nombre:"ruben",apellido:"gomez"},{nombre:l,apellido:l,aficion:l});
- A. { "-id" : Objectld("580a42b5dfblb5al7427d302"), "nombre" : "ruben", "apellido" : "gomez", "aficion" :
v u "flipar" } - B. { "_id" : Objectld("580a42acdfblb5al7427d301"), "nombre" : "Luis", "apellido" : "gomez", "aficion" : u
"flipar" } - C. { "_id" : Objectld("580a42acdfblb5al7427d301"), "nombre" : "ruben", "apellido" : "gomez" >
- D. { "_id" : Objectld("580a42acdfblb5al7427d301"), "nombre" : "ruben", "apellido" : "Pablo" , "aficion" : u
"flipar"}
Answer: A,C
NEW QUESTION 52
......
Passing Key To Getting C100DBA Certified Exam Engine PDF: https://www.passtestking.com/MongoDB/C100DBA-practice-exam-dumps.html
C100DBA Exam Dumps Pass with Updated Tests Dumps: https://drive.google.com/open?id=1RR72rAw75f2Sl4lYM6iFlCSCelVjjWS-