We at Crack4sure are committed to giving students who are preparing for the MongoDB C100DBA Exam the most current and reliable questions . To help people study, we've made some of our MongoDB Associate Database Administrator(Based on MongoDB 6.0 and 7.0+) exam materials available for free to everyone. You can take the Free C100DBA Practice Test as many times as you want. The answers to the practice questions are given, and each answer is explained.
A MongoDB administrator needs to create a new role with only the read privileges for the products database.
What command should the administrator use?
What is the defau size of a GridFS chunk?
Given a replica set with five data-bearing members, suppose the primary goes down with operations in its oplog that have been copied from the primary to only one secondary. Assuming no other problems occur, which of the following describes what is most likely to happen?
‘$set ' sets the value of
Dada una coleccion, cuales devuelve con la siguiente query db.coleccion.find({nombre: " ruben " ,apellido: " gomez " },{nombre:l,apellido:l,aficion:l});
A MongoDB administrator is managing a database for a hospital system.
The patients collection contains:
- Carlos Martinez, diagnosis Hypertension, room 203
- Maria Lopez, diagnosis Hypertension, room 207
- Juan Perez, diagnosis Arrhythmia, room 207
The administrator runs:
db.patients.updateMany(
{ diagnosis: " Hypertension " },
{ $set: { room: 207 } }
)
What output should the administrator expect?
MongoDB is
Which of the following needs to be performed prior to initiate backup on a sharded cluster?
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.
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.
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?
What command is used to grant a role " customRole1 " to an existing user called " user1 " ?
What attribute of the oplog ensures consistency in a replicated dataset?
What operation updates the value of the unitsInStock field to 25 for a document with a " laptop " product, and inserts a new document if it does not exist?
Suposse tou have the following collection with only 2 documents:
If you run an aggregation query and use { $unwind: " $traits " } as the first stage, how many documents will be passed to the next stage of the aggregation pipeline?
Which of the following does MongoDB use to provide High Scalability?
Which of the following operator can be used to control the number of items of an array that a query returns?
What mongosh command connects to node-1.cluster1.mycompany.local on port 27017?
Which of the following is incorrect statement about find and findOne operations in MongoDB?
What is a limitation of encryption at rest?
Which of the following commands can cause the database to be locked?
What feature is one of the differences between using MongoDB and a relational database management system (RDBMS) database?
A collection named scores includes:
[
{ _id: 1, home_score: 6, away_score: [ 5, 7 ] },
{ _id: 2, home_score: [ 8, 6 ], away_score: 9 },
{ _id: 3, home_score: [ 5, 8 ], away_score: [ 9, 6 ] },
{ _id: 4, home_score: 5, away_score: 10 }
]
Given the following index:
db.scores.createIndex( { home_score: 1, away_score: 1 } )
What document will cause the index to fail?
In which of the following scenarios is sharding not the correct option. Select all that apply.
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?
When should we consider representing a one-to-many relationship in an embedded collection instead of separate collection?
What does the following aggregate query perform?
Mongodb does provide high availability via which option?
Which of the following is supported by MongoDB?
Consider a products collection:
{ " _id " : 1, " item " : " t-shirt " , " color " : " red " , " price " : 10 }
{ " _id " : 2, " item " : " sweater " , " color " : " green " , " price " : 20 }
{ " _id " : 3, " item " : " belt " , " color " : " black " , " price " : 15 }
{ " _id " : 4, " item " : " hat " , " color " : " green " , " price " : 12 }
What operation modifies the price of all products that have a color value of " green " ?
A MongoDB database administrator needs to improve the performance of the following query:
db.employees.find(
{},
{ name: 1, department: 0, salary: 1 }
).sort({ department: 1, salary: -1 });
What index should the administrator use to achieve this goal?
A department store maintains a clothing collection:
{ " _id " : 1, " item " : " sweater " , " sizes " : [ " XS " , " S " , " L " ] }
{ " _id " : 2, " item " : " t-shirt " , " sizes " : [ " S " , " M " , " L " ] }
{ " _id " : 3, " item " : " vest " , " sizes " : [ " M " , " L " , " XL " , " XXL " ] }
An employee runs:
db.clothing.find( { " sizes " : " M " } )
Which index should improve performance for this query the MOST?
What is the equivalent command in MongoDB for the following SQL query?
SELECT * FROM posts WHERE author like " %john% "
A database administrator maintains a MongoDB database that stores scientific papers. A paper with DOI 10.1000/xyz123 is no longer relevant and needs to be removed.
What query should the administrator use to delete the paper with the DOI equal to 10.1000/xyz123?
Which of the following are common uses of the mongo shell? Check all that apply
What " stage " indicates that no indexes were available for a query pattern?
In order to ensure that you can maintain high availability in the face of server failure, you should implement which of the following?
Consider that you have a collection called population which has fields state and city. Which of the following query will calculate the population grouped by state and city?
In a sharded replicas set environment with multiple mongos servers, which of the following would decide the mongos failover?
You have designed a web application with mongoDB. You have configured replication. The replica set is in place and function properly. What happens in case of failure?
Consider that you have a collection called population which has fields state and city. Which of the following query will calculate the population grouped by state and city?
JSON stands for
We can insert multiple documents in bulk using which of the following operations:
Which is the default mode in which the explain() command runs?
Which of the following commands finds all the documents in the posts collection with post timestamp field as null?
Which operations add new documents to a collection?
3 Months Free Update
3 Months Free Update
3 Months Free Update