Weekend Special Limited Time Flat 70% Discount offer - Ends in 0d 00h 00m 00s - Coupon code: 70spcl

MongoDB C100DBA MongoDB Certified DBA Associate Exam (Based on MongoDB 4.4) Exam Practice Test

Page: 1 / 13
Total 132 questions

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

Question 1

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

Question 2

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)

Options:

A.

ORS1

B.

ORS2

C.

ORS3

D.

O arbiter

E.

RSO

Question 3

Which of the tags in a replica set configuration specify the operations to be read from the node with the least network latency?

Options:

A.

netLatency

B.

secondaryPreferred

C.

nearest

D.

primaryPreferred

Question 4

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

Question 5

The difference between $push and $addToSet is:

Options:

A.

$addToSet needs the fields to be already present while $push will work even if the field is not present

B.

$addToSet adds the item to the field only if it does not exist already; while $push pushes the item to the field irrespective of whether it was present or not

C.

$addToSet adds the item to the field only if the new item is of the same datatype

D.

There is no major difference between them. $addToSet is a deprecated version of $push.

Question 6

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

Question 7

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?

Question # 7

Options:

A.

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

B.

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

C.

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

Question 8

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

Options:

Question 9

In what format does mongodump creates backup files?

Options:

A.

BSON

B.

JSON

C.

SOAP

D.

XML

Question 10

What read preference should your application use if you want to read from the primary under normal circumstances but allow reads from secondaries when a primary is unavailable?

Options:

A.

secondaryPreferred

B.

Secondary

C.

nearest

D.

primary

E.

primaryPreferred

Question 11

What does the following aggregate query perform?

Question # 11

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

Question 12

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

Options:

Question 13

Consider the following example document from the sample collection. All documents in this collection have the same schema.

Question # 13

Which of the following queries will replace this with the document.

Question # 13

Options:

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 14

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

Options:

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

Question 15

Consider the following documents:

Question # 15

You perform the following query;

Question # 15

How many documents will be updated by the query?

Options:

A.

0

B.

1

C.

2

D.

3

E.

5

Question 16

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

Question # 16

Which of the following query will return all the documents where the ratings array contains elements that in some combination satisfy the query conditions?

Options:

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 17

Below is a sample document of "orders" collection

Question # 17

Options:

A.

$project

Question 18

The following aggregation option is used to specify the specific fields that needs to be passed to the next stage of the aggregation pipeline:

Options:

A.

$project

B.

$aggregate

C.

$match

D.

$group

Question 19

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

Options:

A.

mongotop

B.

dbstats

C.

mongostat

D.

constats

Page: 1 / 13
Total 132 questions