Weekend Sale - Limited Time 70% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: mxmas70

Home > MongoDB > MongoDB Certified DBA Associate > C100DBA

C100DBA MongoDB Certified DBA Associate Exam (Based on MongoDB 4.4) Question and Answers

Question # 4

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.

ORS1

B.

ORS2

C.

ORS3

D.

O arbiter

E.

RSO

Full Access
Question # 5

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

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

Full Access
Question # 6

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 protect agains network partitions

C.

To enable certain read preference settings

D.

To add greather redundancy

E.

For more efficient backup operations

Full Access
Question # 7

Which of the following command inside aggregate command is used in MongoDB aggregation to filter the documents to pass only the documents that match the specified condition(s) to the next pipeline stage.

A.

$aggregate

B.

$sum

C.

$match

D.

$group

Full Access
Question # 8

What does the following $slice query return using the following command? db.posts.find( {}, { comments: { $slice: [ -10, 5 ] } } )

A.

Returns 5 comments, beginning with the last 10 items

B.

Returns 10 comments, beginning with the last

C.

Returns 10 comments, beginning with the first

D.

Returns 5 comments, beginning with the first 10 items

Full Access
Question # 9

‘$set' sets the value of

A.

Code block

B.

Name/value pair

C.

Key

D.

None of the above

Full Access
Question # 10

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.

7

B.

03

C.

04

D.

06

Full Access
Question # 11

What is the maximum size of Index Key Limit and Number of Indexes per collection?

A.

1024 bytes and 64 indexes

B.

12 mega bytes and 64 indexes

C.

64 bytes and 1024 indexes

D.

1024 bytes and unlimited indexes

Full Access
Question # 12

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

Full Access
Question # 13

You are in a sharded cluster. What will you do prior to initiating backup in sharded cluster?

A.

db.stopBalancer()

B.

db.stopserver()

C.

sh.stopBalancer()

D.

sh.stopserverQ

Full Access
Question # 14

Which of the following statements are true about the $match pipeline operator? Check all that apply.

A.

You should use it early as possible in the pipeline

B.

It can be used as many time as needed.

C.

It has a sintax similar to findQ commands.

Full Access
Question # 15

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

Full Access
Question # 16

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

Full Access
Question # 17

The oplog (operations log) is a special capped collection that keeps a rolling record of all operations that modify the data stored in your databases. All the replica set members contain a copy of the oplog in the following collection:

A.

oplog.rs

B.

..oplog.rs

C.

.oplog.rs

D.

local.oplog.rs

Full Access
Question # 18

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

A.

Concurrency Control

B.

Atomicity

C.

Performance Management

D.

Transaction Management

Full Access
Question # 19

Which of the following operator can be used to limit the number of documents in an array field of a document after an update is performed?

A.

$arrayLimit

B.

$push along with $each, $sort and $slice

C.

$removeFromSet

D.

None of the above

Full Access