Pre-Winter Special Sale - 70% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: spcl70

Practice Free C100DBA MongoDB Associate Database Administrator(Based on MongoDB 6.0 and 7.0+) Exam Questions Answers With Explanation

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.

Question # 6

A MongoDB administrator needs to create a new role with only the read privileges for the products database.

What command should the administrator use?

A.

db.createRole({ role: " productRead " , privileges: [ { resource: { db: " products " , collection: " * " }, actions: [ " readAnyDatabase " ] } ] , roles: [] }, { w: " majority " , wtimeout: 5000 })

B.

db.createRole({ role: " productRead " , privileges: [ { resource: { db: " products " , collection: " " }, actions: [ " find " ] } ] , roles: [] }, { w: " majority " , wtimeout: 5000 })

C.

db.createRole({ role: " productRead " , privileges: [ { resource: { db: " products " , collection: " * " }, actions: [ " readWrite " ] } ] , roles: [] }, { w: " majority " , wtimeout: 5000 })

D.

db.createRole({ role: " productRead " , privileges: [ { resource: { db: " products " , collection: " * " }, actions: [ " read " ] } ] , roles: [] }, { w: " majority " , wtimeout: 5000 })

Question # 7

What is the defau size of a GridFS chunk?

A.

255 K

B.

1 MB

C.

16 MB

D.

2 MB

Question # 8

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?

A.

missing operations will need to be manually re-performed

B.

the secondary with the most current oplog will be elected primary

C.

reads will be stale until the primary comes back up

D.

the primary may roll back the operations once it recovers

E.

the most current secondary will roll back the operations following the election

Question # 9

‘$set ' sets the value of

A.

Code block

B.

Name/value pair

C.

Key

D.

None of the above

Question # 10

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 " : " Pablo " , " aficion " : u " flipar " }

D.

{ " _id " : Objectld( " 580a42acdfblb5al7427d301 " ), " nombre " : " ruben " , " apellido " : " gomez " >

Question # 11

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?

A.

acknowledged: true, matchedCount: 1, modifiedCount: 1

B.

acknowledged: true, matchedCount: 3, modifiedCount: 1

C.

acknowledged: true, matchedCount: 1, modifiedCount: 2

D.

acknowledged: true, matchedCount: 2, modifiedCount: 1

Question # 12

MongoDB is

A.

None of the above

B.

Object-oriented DBMS

C.

Relational DBMS

D.

Document-oriented DBMS

Question # 13

Which of the following needs to be performed prior to initiate backup on a sharded cluster?

A.

db.stopBalancer( )

B.

sh.stopServer( )

C.

db.stopServer( )

D.

sh.stopBalancer( )

Question # 14

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 } , { " $set " : { " _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 > , { " _id " : 7 , " c " : 4 > )

Question # 15

Consider that our posts collection contains an array field called tags that contains tags that the user enters. {

C100DBA question answer

Which of the following commands will find all the posts that have been tagged as tutorial.

A.

db.posts.find( { tags : [ " tutorial " ] } );

B.

db.posts.find( { $array : {tags: " tutorial " ) > );

C.

db.posts.find( { tags : " tutorial " } );

D.

db.posts.findInArray( { tags : " tutorial " > );

Question # 16

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.

7

B.

2

C.

1

D.

0

Question # 17

What command is used to grant a role " customRole1 " to an existing user called " user1 " ?

A.

db.grantRoles( " user1 " , [ " customRole1 " ])

B.

db.createUser({ user: " user1 " , pwd: " pwd1 " , roles: [{ role: " customRole1 " , db: " admin " }] })

C.

db.addRoleToUser( " user1 " , [ " customRole1 " ])

D.

db.grantRolesToUser( " user1 " , [ " customRole1 " ])

Question # 18

What attribute of the oplog ensures consistency in a replicated dataset?

A.

Natural Ordering

B.

Concurrency Control

C.

Flow Control

D.

Idempotent

Question # 19

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?

A.

db.inventory.updateOne({ product: " laptop " }, { $set: { unitsInStock: 25 } }, { upsert: true })

B.

db.inventory.insertOne({ product: " laptop " }, { $set: { unitsInStock: 25 } }, { upsert: true })

C.

db.inventory.insertOne({ product: " laptop " }, { $set: { unitsInStock: 25 } }, { upsert: True })

D.

db.inventory.updateOne({ product: " laptop " }, { $set: { unitsInStock: 25 } }, { upsert: True })

Question # 20

Suposse tou have the following collection with only 2 documents:

C100DBA question answer

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?

A.

3

B.

5

C.

4

D.

2

E.

1

Question # 21

Which of the following does MongoDB use to provide High Scalability?

A.

Replication

B.

Write Concern

C.

Indexing

D.

Sharding

Question # 22

Which of the following operator can be used to control the number of items of an array that a query returns?

A.

$ elemMatch

B.

$slice

C.

$

D.

MongoDB does not support partial retrieval of items from an array

Question # 23

What mongosh command connects to node-1.cluster1.mycompany.local on port 27017?

A.

mongosh --hostname " node-1.cluster1.mycompany.local:27017 "

B.

mongosh --connect " node-1.cluster1.mycompany.local:27017 "

C.

mongosh " node-1.cluster1.mycompany.local & port=27017 "

D.

mongosh " node-1.cluster1.mycompany.local:27017 "

Question # 24

Which of the following is incorrect statement about find and findOne operations in MongoDB?

A.

findQ returns all the documents in a collection while findOne() retrieves only the first one.

B.

find.limit(l) is not the same query as findOne()

C.

findOneQ returns the actual first document retrieved from a collection

D.

findQ and findOneQ returns cursors to the collection documents

Question # 25

What is a limitation of encryption at rest?

A.

It requires a lot of additional configuration.

B.

It protects against insecure network connections.

C.

It does not protect against data breaches.

D.

It can impact performance greatly.

Question # 26

Which of the following commands can cause the database to be locked?

A.

All of the above

B.

Inserting data

C.

Map-reduce

D.

Issuing a query

Question # 27

What feature is one of the differences between using MongoDB and a relational database management system (RDBMS) database?

A.

Sharding

B.

Replication

C.

Authentication

D.

Flexible Schema

Question # 28

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?

A.

Document with _id: 2

B.

Document with _id: 4

C.

Document with _id: 1

D.

Document with _id: 3

Question # 29

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

A.

The write operations on the collection are low

B.

The write operations on the collection are very high

C.

The working set in the collection is expected to grow very large in size

D.

The collection is a read intensive collection with less working set

Question # 30

Consider that the posts collection contains an array called ratings which contains ratings given to the post by various users in the following format:

C100DBA question answer

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: { $elemMatch: { $gte: 3, $lte: 6 } } } )

B.

db.inventory.find( { ratings: { $elemMatch: { $gt: 3, $lt: 6 }

C.

db.inventory.find( { ratings: { ratings.$: { $gt: 5, $lt: 9 } } } )

D.

db.inventory.find( { ratings: { ratings: { $gt: 5, $lt: 9 } } } )

Question # 31

When should we consider representing a one-to-many relationship in an embedded collection instead of separate collection?

A.

When the many is not very large

B.

When the many is very large

C.

Always

D.

Never

Question # 32

What does the following aggregate query perform?

C100DBA question answer

A.

Fetches the posts with likes between 100 and 200 and sets their _id as null

B.

Groups the posts by number of likes (101, 102, 103.) by adding 1 every time

C.

Calculates the number of posts with likes between 100 and 200

D.

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

Question # 33

Mongodb does provide high availability via which option?

A.

Replication

B.

Indexing

C.

Sharding

D.

Journaling

Question # 34

Which of the following is supported by MongoDB?

A.

Transaction Management

B.

ACID Transactions

C.

Journaling

D.

Relationships between Collections (Primary Key Foreign Key)

Question # 35

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.

db.products.update({ " color " : " green " }, { " price " : { " $inc " : 5 } })

B.

db.products.update({ " color " : " green " }, { $inc: { " price " : 5 } })

C.

db.products.updateMany({ " color " : " green " }, { " $inc " : { " price " : 5 } })

D.

db.products.updateMany({ " color " : " green " }, { " price " : { " $inc " : 5 } })

Question # 36

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.

db.employees.createIndex({ department: 1, salary: 1, name: 1 });

B.

db.employees.createIndex({ department: 1, salary: -1 });

C.

db.employees.createIndex({ salary: 1, name: 1, department: 0 });

D.

db.employees.createIndex({ name: 1, department: 1, salary: -1 });

Question # 37

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?

A.

db.clothing.createIndex( { sizes: 1 } )

B.

db.clothing.createIndex( { item: -1 } )

C.

db.clothing.createIndex( { _id: 1, sizes: 1 } )

D.

db.clothing.createIndex( { item: 1, sizes: 1 } )

Question # 38

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( { author: /AjohnA/ > )

C.

db.posts.find( { $like: {author: /John/} } )

D.

db.posts.find( { author: {$like: /John/} } )

Question # 39

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?

A.

db.scientificPapers.drop({ doi: " 10.1000/xyz123 " })

B.

db.scientificPapers.findOneAndDelete({ scientificPapers: " orders " , doi: " 10.1000/xyz123 " })

C.

db.scientificPapers.deleteOne({ doi: " 10.1000/xyz123 " })

D.

db.scientificPapers.deleteOne({ scientificPapers: " orders " }, { doi: " 10.1000/xyz123 " })

Question # 40

Which of the following are common uses of the mongo shell? Check all that apply

A.

Perform queries against MongoDB collections

B.

Perform administrative tasks

C.

Use as a JavaScript framework for your production system

Question # 41

What " stage " indicates that no indexes were available for a query pattern?

A.

FETCH

B.

IXSCAN

C.

COLLSCAN

D.

GROUP

Question # 42

In order to ensure that you can maintain high availability in the face of server failure, you should implement which of the following?

A.

Sharding

B.

Properly defined user roles

C.

Replication

D.

Put indexes on all of your documents

E.

The proper storage engine

Question # 43

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?

A.

db.population.aggregate( [{ $group: { _id: { state: " $state " , city: " $city " },pop: { $pop: 1 } } }] )

B.

db.population.aggregate( [{ $group: { _id: { city: " $city " },pop: { $sum: " $pop " } } }] )Multi Document Transaction is not supported by MongoDB

C.

db.population.aggregate( [{ $group: { _id: { state: Estate " , city: " $city " },pop: { $sum: " $pop " } } }] )

D.

db.population.aggregate( [{ $group: { _id: { state: Estate " , city: " $city " },pop: { $sum: 1 > > > ] )

Question # 44

In a sharded replicas set environment with multiple mongos servers, which of the following would decide the mongos failover?

A.

mongos

B.

mongo shell

C.

individual language drivers

D.

mongod

Question # 45

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?

A.

Switchover needs to be done manually

B.

Failover happens automatically

C.

Switchover happens automatically

D.

Failover needs to be done manually

Question # 46

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?

A.

db.population.aggregate( [{ $group: { _id: { state: " $state " , city; " $city " },pop: { $sum: 1 > > > ] )

B.

db.population.aggregate( [{ $group: { _id: { state: Estate " , city: " $city " },pop: { $pop: 1 } } }] )

C.

db.population.aggregate( [{ $group: { _id: { state: Estate " , city: n$city " },pop: { $sum: " $pop " } } }] )

D.

db.population.aggregate( [{ $group: { _id: { city: " $city " },pop: { $sum: " $pop " } } }] )Multi Document Transaction is not supported by MongoDB

Question # 47

JSON stands for

A.

JavaScript Object Notation

B.

JavaScript Object Naming

C.

JavaScript Object Notice

D.

None of the above

Question # 48

We can insert multiple documents in bulk using which of the following operations:

A.

initializeUnorderedBulk

B.

initializeUnorderedBulkOp

C.

initializeBulk

D.

initializeBulkOp

Question # 49

Which is the default mode in which the explain() command runs?

A.

allPlansExecution

B.

customExecutionStats

C.

queryPlanner

D.

executionStats

Question # 50

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: { $type: null } } )

C.

db.posts.find( { post_timestamp : { $type; 10 > > )

D.

db.posts.find( { post_timestamp: { $fieldtype: 10 } } )

Question # 51

Which operations add new documents to a collection?

A.

Create

B.

update

C.

insert

D.

delete

C100DBA PDF

$33

$109.99

3 Months Free Update

  • Printable Format
  • Value of Money
  • 100% Pass Assurance
  • Verified Answers
  • Researched by Industry Experts
  • Based on Real Exams Scenarios
  • 100% Real Questions

C100DBA PDF + Testing Engine

$52.8

$175.99

3 Months Free Update

  • Exam Name: MongoDB Associate Database Administrator(Based on MongoDB 6.0 and 7.0+)
  • Last Update: Oct 7, 2026
  • Questions and Answers: 172
  • Free Real Questions Demo
  • Recommended by Industry Experts
  • Best Economical Package
  • Immediate Access

C100DBA Engine

$39.6

$131.99

3 Months Free Update

  • Best Testing Engine
  • One Click installation
  • Recommended by Teachers
  • Easy to use
  • 3 Modes of Learning
  • State of Art Technology
  • 100% Real Questions included