Pre-Winter Sale - Limited Time 65% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: 65percent

Welcome To DumpsPedia

C100DBA Sample Questions Answers

Questions 4

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

Options:

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 "

Buy Now
Questions 5

What tool do you use to see if you have a problem in the consumption of disk I / 0?

Options:

Buy Now
Questions 6

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

Options:

A.

mapReduce

B.

group

C.

aggregate

D.

All of the above

Buy Now
Questions 7

Consider a contacts collection that contains these documents:

{ " _id " : 1, " name " : " Poppy " , " birthday " : " 03-09-1984 " }

{ " _id " : 2, " name " : " Ashley " , " birthday " : " 08-12-1990 " }

{ " _id " : 3, " name " : " Cleo " , " birthday " : " 11-02-1976 " }

What query returns the document where the field name is " Poppy " ?

Options:

A.

db.contacts.find({ " name.Poppy " : 1 })

B.

db.contacts.find({ " name " : " poppy " })

C.

db.contacts.find({ " Poppy " : 1 })

D.

db.contacts.find({ " name " : " Poppy " })

Buy Now
Questions 8

What does the following aggregate query perform?

8

Options:

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

Buy Now
Questions 9

Which command can be used to rebuild the indexes on a collection in MongoDB?

Options:

A.

db.collection.createlndex({relndex:l})

B.

db.collection.reIndex({author:l})

C.

db.collection.relndexQ

D.

db.collection.createIndex({author:l}).reIndex()

Buy Now
Questions 10

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.

Options:

A.

As an optimized sort query (scanAndOrder = false) using " mylndex " because we are sorting on an indexed field

B.

As an indexed query using " mylndex " because field " user.login " is indexed

C.

MongoDB will need to do a table/collection scan to find matching documents

D.

None of the above

E.

As a covered query using " mylndex " because we are filtering out " _id " and only returning " user.login "

Buy Now
Questions 11

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

What command should the administrator use?

Options:

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 })

Buy Now
Questions 12

If the value of totalKeysExamined is 30000 and the value of totalDocsExamined is 0, which of the following option is correct?

Options:

A.

None of the above

B.

The query used an index to fetch the results

C.

The query returned 0 documents

D.

The query returned 30000 documents after scanning the documents

Buy Now
Questions 13

If you have created a compound index on (A,B, C) which of the following access pattern will not be able to utilize the index?

Options:

A.

A, B, C

B.

A

C.

B, C

D.

A, B

Buy Now
Questions 14

Using an arbiter allows one to easily ensure an odd number of voters in replica sets. Why is this important?

Options:

A.

To help in disaster recovery

B.

To protect agains network partitions

C.

To enable certain read preference settings

D.

To add greather redundancy

E.

For more efficient backup operations

Buy Now
Questions 15

What tool would you use if you want to save a gif file in mongo?

Options:

Buy Now
Questions 16

What is the output of the following program?

Options:

A.

60 s

B.

1s

C.

100 s

D.

100 ms

Buy Now
Questions 17

Consider a clothing collection that contains these documents:

{ " _id " : 1, " item " : " sweater " , " sizes " : [ " XS " , " S " ] }

{ " _id " : 2, " item " : " t-shirt " , " sizes " : [ " S " , " M " , " XL " ] }

{ " _id " : 3, " item " : " vest " , " sizes " : [ " M " , " L " , " XL " , " XXL " ] }

What does the following query return?

db.clothing.find({ " sizes " : " M " })

Options:

A.

Only document _id: 3.

B.

All three documents.

C.

Only document _id: 2.

D.

Documents _id: 2 and _id: 3.

Buy Now
Questions 18

Which of the following collections stores authentication credentials in MongoDB?

Options:

A.

test.users

B.

local.users

C.

system.users

D.

users.users

Buy Now
Questions 19

In a replicated cluster, which of the following node would only be used during an election?

Options:

A.

arbiter

B.

primary

C.

hidden

D.

secondary

Buy Now
Questions 20

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?

Options:

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 } )

Buy Now
Questions 21

Which operations add new documents to a collection?

Options:

A.

Create

B.

update

C.

insert

D.

delete

Buy Now
Questions 22

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

Options:

A.

Replication

B.

Write Concern

C.

Indexing

D.

Sharding

Buy Now
Questions 23

Which of the following is a valid insert statement in mongodb? Select all valid.

Options:

A.

db.test.push({x:2,y: " apple " })

B.

db.test.insert« " x " :2, " y " : " apple " })

C.

db.test.insert({x:2,y: " apple " })

D.

db.test.insert({x:2},{y: " apple " })

Buy Now
Questions 24

Below is a sample document of " orders " collection

24

Options:

A.

$sort

Buy Now
Questions 25

Which command is used to determine storage capacity of specific database?

Options:

A.

mongotop

B.

dbstats

C.

mongostat

D.

constats

Buy Now
Questions 26

Which type of indexes does MongoDB support?

Options:

A.

All of the above

B.

Compound Indexes

C.

Multikey Indexes

D.

Geospatial Indexes

Buy Now
Questions 27

What is the use of mongodump and mongorestore tools?

Options:

A.

backup mongodb deployment

B.

audit mongodb deployment

C.

performance tune mongodb deployment

D.

replicate mongodb deployments

Buy Now
Questions 28

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

Options:

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 " ])

Buy Now
Questions 29

Which of the following node is used during election in a replication cluster?

Options:

A.

primary

B.

arbiter

C.

hidden

D.

secondary

Buy Now
Questions 30

You have the following index on the toys collection:

{

" manufacturer " : 1,

" name " : 1,

" date " : -1

}

Which of the following is able to use the index for the query? Check all that apply.

Options:

A.

db.toys.find( { name : " Big Rig Truck " , date : " 2013-02-01 " , manufacturer : " Tanko "

B.

db.toys.find( { manufacturer : " Matteo " , name : " Barbara " , date : " 2014-07-02 " } )

C.

db.toys.find( { date : " 2015-03-01 " , manufacturer : " Loggo " , name : " Brick Set " } )

Buy Now
Questions 31

Update If Correct is an approach for which of the following concepts in MongoDB:

Options:

A.

Concurrency Control

B.

Atomicity

C.

Performance Management

D.

Transaction Management

Buy Now
Questions 32

Given the following MongoDB document in the users collection:

{ " userid " : 1, " first " : " John " , " roles " : " Basic " }

Which statement results in this document?

{ " userid " : 1, " first " : " John " , " roles " : " SuperUser " }

Options:

A.

db.users.replaceOne({ userid: 1 }, { first: " John " , roles: " SuperUser " })

B.

db.users.replaceOne({ userid: 1 }, { userid: 1, first: " John " , roles: " SuperUser " })

C.

db.users.replaceOne({ userid: 1 }, { roles: " SuperUser " })

D.

db.users.replaceOne({ userid: 1 }, { $set: { roles: " SuperUser " } })

Buy Now
Questions 33

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?

Options:

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 });

Buy Now
Questions 34

Which TWO commands can be used to check for all active operations on the current node?

Options:

A.

db.currentOp({ op : " command " })

B.

db.adminCommand({ " all " : currentOp})

C.

db.currentOp(true)

D.

db.adminCommand({ currentOp : true })

E.

db.currentOp({ " all " : true })

Buy Now
Questions 35

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

Options:

A.

When the many is not very large

B.

When the many is very large

C.

Always

D.

Never

Buy Now
Questions 36

A collection and a document in MongoDB is equivalent to which of the SQL concepts respectively?

Options:

A.

Column and Row

B.

Table and Row

C.

Database and Table

D.

Table and Column

Buy Now
Questions 37

Consider the following document from the products collection:

37

What does the following query using $elemMatch return? db.products.find( { product_code: " 345678 " }, { variations: { $elemMatch: { size: ^L^ } } } )

Options:

A.

Returns the complete document but retrieves only the size field from the array

B.

Returns the document but with only one element in the variations array (corresponding to size L)

C.

Returns the complete document since MongoDB does not support partial array retrieval

D.

Returns the complete document but retrieves only the size field from the array and also with only one element in the variations array (corresponding to size L)

Buy Now
Questions 38

Which TWO commands can be used to remove the role, " specialRole " from " user1 " ?

Options:

A.

db.revokeRolesFromUser( " user1 " , [{ " myDB " : " specialRole " }])

B.

db.revokeRoleFromUser( " user1 " , " specialRole " )

C.

db.revokeRolesFromUser( " user1 " , [{ role: " specialRole " , db: " myDB " }])

D.

db.revokeRoleFromUser({ user: " user1 " , role: " specialRole " })

E.

db.revokeRolesFromUser( " user1 " , [ " specialRole " ])

Buy Now
Questions 39

MongoDB is

Options:

A.

None of the above

B.

Object-oriented DBMS

C.

Relational DBMS

D.

Document-oriented DBMS

Buy Now
Questions 40

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?

40

Options:

A.

db.posts.createIndex({^comments.$.author " :-l});

B.

db. posts.createIndex({^comments.author " :1});

C.

db.posts.createIndex({^commerits.author " ;-!});

Buy Now
Questions 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?

Options:

A.

7

B.

2

C.

1

D.

0

Buy Now
Questions 42

Which of the following is correct about MongoDB?

Options:

A.

MongoDB supports geospatial indexes

B.

MongoDB supports some of the SQL functions

C.

MongoDB uses JSON format to represent documents

D.

MongoDB supports collection joins

Buy Now
Questions 43

Which features of relational database management systems were deliberately omitted in MongoDB and help us to obtain horizontal scalability? Check all that apply.

Options:

A.

Multi-statement transactions

B.

Joins

C.

Authentication

Buy Now
Questions 44

What command set removes node-1.cluster1.mycompany.local:27017 and node-2.cluster1.mycompany.local:27017 from the replica set, then adds node-1.cluster1.mycompany.local:27017 back to the replica set?

Options:

A.

rs.removeNode( " node-1.cluster1.mycompany.local:27017 " )rs.removeNode( " node-2.cluster1.mycompany.local:27017 " )rs.add({ host: " node-1.cluster1.mycompany.local:27017 " })

B.

rs.removeNode( " node-1.cluster1.mycompany.local:27017 " )rs.removeNode( " node-2.cluster1.mycompany.local:27017 " )rs.addNode({ host: " node-1.cluster1.mycompany.local:27017 " })

C.

rs.remove( " node-1.cluster1.mycompany.local:27017 " )rs.remove( " node-2.cluster1.mycompany.local:27017 " )rs.add({ host: " node-1.cluster1.mycompany.local:27017 " })

D.

rs.remove( " node-1.cluster1.mycompany.local:27017 " )rs.remove( " node-2.cluster1.mycompany.local:27017 " )rs.addNode({ host: " node-1.cluster1.mycompany.local:27017 " })

Buy Now
Questions 45

A user stores movie data in a collection called movies. The collection contains thousands of documents.

A sample document looks like this:

{ " title " : " Titanic " , " year " : 1997, " rating " : 8.6 }

The user runs the following query to sort movies first by year, and then by rating:

db.movies.find().sort({ " year " : 1, " rating " : -1 })

Which index would improve the query ' s performance the MOST?

Options:

A.

db.movies.createIndex({ " year " : 1, " title " : 1, " rating " : -1 })

B.

db.movies.createIndex({ " year " : -1, " rating " : 1 })

C.

db.movies.createIndex({ " rating " : 1, " year " : -1 })

D.

db.movies.createIndex({ " rating " : -1, " year " : 1 })

Buy Now
Questions 46

Suposse tou have the following collection with only 2 documents:

46

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?

Options:

A.

3

B.

5

C.

4

D.

2

E.

1

Buy Now
Questions 47

Which of the following commands finds all the documents in the posts collection with post timestamp field as null?

Options:

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 } } )

Buy Now
Questions 48

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

Options:

A.

mongos

B.

mongo shell

C.

individual language drivers

D.

mongod

Buy Now
Questions 49

What command should a MongoDB database administrator use to find the disk utilization of the order collection?

Options:

A.

db.stats()

B.

db.order.stats()

C.

db.hostInfo()

D.

db.serverStatus()

Buy Now
Questions 50

Consider a collection posts which has fields: Jd, post_text, post_author, post_timestamp, post_tags etc. Which of the following query retrieves ONLY the key named post_text from the first document retrieved?

Options:

A.

db.posts.finOne({},{_id:0, post_text:1})

B.

db.posts.findOne({post_text: 1})

C.

db.posts.find({},{_id:Of post_text:1})

D.

db.posts.finOne«},{post_text:l})

Buy Now
Questions 51

Below is a sample document in a given collection test.

{ a : 5, b : 3, c: 2, d : 1 >

Given a compound index { a: 1, b:l, c:l, d:l}, Which of the below query will not use in-memory sorting? Select

all valid.

Options:

A.

db.test.find( { a: 5, b: 3 } ).sort( { c: 1, d : 1 } )

B.

db.test.find( { a: 5, b: 3 } ).sort( { a: 1} )

C.

db.test.find( { a: 5, b: 3 } ).sort( { a: 1, b: 1, c: 1 > )

D.

db.test.find( { a: 5, b: 3 } ).sort( {c: 1 } )

Buy Now
Exam Code: C100DBA
Exam Name: MongoDB Associate Database Administrator(Based on MongoDB 6.0 and 7.0+)
Last Update: Oct 14, 2026
Questions: 172

PDF + Testing Engine

$59.99 $171.4

Testing Engine

$44.99 $128.55

PDF (Q&A)

$49.99 $142.82