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

Helping Hand Questions for C100DBA

Page: 13 / 13
Total 172 questions

MongoDB Associate Database Administrator(Based on MongoDB 6.0 and 7.0+) Questions and Answers

Question 49

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

Question 50

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

Question 51

Given the following query:

db.load.find({

_id: { $lte: 1000 },

rnd: 1234,

date: { $gte: ISODate( " 2023-01-01 " ) }

}).sort({ date: -1 })

In a compound index that best supports this query, what field should be first field?

Options:

A.

no field

B.

rnd: 1

C.

_id: 1

D.

date: 1

Page: 13 / 13
Total 172 questions