Exclusive Black Friday Deal: 70% Off All Exam Bundles! Use coupon code below to unlock your savings! - Ends in 0d 00h 00m 00s - Coupon code: Friday70

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

Question # 21

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 # 21

Options:

A.  

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

B.  

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

C.  

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

Discussion 0
Question # 22

Consider an orders collection that contains these documents:

{ _id: 1, product: " X-pad " , quantity: 950 }

{ _id: 2, product: " X-pad-pro " , quantity: 1000 }

{ _id: 3, product: " X-phone " , quantity: 850 }

{ _id: 4, product: " X-phone-pro " , quantity: 1350 }

Commands A and B are run at the same time. Assume that no other operations are running.

Options:

A.  

)db.orders.findAndModify({query: { " product " : " X-phone " },update: { $set: { " quantity " : 1250 } }})

B.  

)db.orders.updateMany({}, { $set: { " quantity " : 0 } })What is the possible findAndModify output and database state after these operations complete? Select TWO.

C.  

findAndModify output shows quantity 1250; final X-phone quantity is 1250 while all others are 0.

D.  

findAndModify output shows quantity 850; final quantities for all four documents are 0.

E.  

findAndModify output shows quantity 0; final quantities for all four documents are 0.

F.  

findAndModify output shows quantity 0; final X-phone quantity is 1250 while all others are 0.

Discussion 0
Question # 23

A MongoDB database administrator is asked to add the privilege find to a role named myRole.

What is the correct syntax for adding this privilege to the role in MongoDB?

Options:

A.  

db.runCommand({grantPrivilegesToRole: " myRole " ,privileges: [{ resource: { db: " testDB " , collection: " " }, actions: [ " find " ] }] ,writeConcern: { w: " majority " },comment: " Granting find action " })

B.  

db.runCommand({grantPrivilegesToRole: " myRole " ,privileges: [{ db: " testDB " , collection: " " , actions: [ " find " ] }] ,writeConcern: { w: " majority " },comment: " Granting find action " })

C.  

db.runCommand({grantPrivilegesToRole: " myRole " ,privileges: {resource: { db: " testDB " , collection: " " }, actions: [ " find " ]},writeConcern: { w: " majority " },comment: " Granting find action " })

D.  

db.runCommand({grantPrivilegesToRole: " myRole " ,privileges: [{ resource: { db: " testDB " , collection: " " }, actions: " find " }],writeConcern: { w: " majority " },comment: " Granting find action " })

Discussion 0
Question # 24

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

Options:

A.  

FETCH

B.  

IXSCAN

C.  

COLLSCAN

D.  

GROUP

Discussion 0
Question # 25

Mongodb does provide high availability via which option?

Options:

A.  

Replication

B.  

Indexing

C.  

Sharding

D.  

Journaling

Discussion 0
Question # 26

You have designed a web application with mongoD

B.  

You have configured replication. The replica set is in place and function properly. What happens in case of failure?

Options:

A.  

Switchover needs to be done manually

B.  

Failover happens automatically

C.  

Switchover happens automatically

D.  

Failover needs to be done manually

Discussion 0
Question # 27

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

Options:

A.  

db.stopBalancer( )

B.  

sh.stopServer( )

C.  

db.stopServer( )

D.  

sh.stopBalancer( )

Discussion 0
Question # 28

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

Options:

A.  

Sharding

B.  

Properly defined user roles

C.  

Replication

D.  

Put indexes on all of your documents

E.  

The proper storage engine

Discussion 0
Question # 29

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

Discussion 0
Question # 30

Write the command(s) are correct to enable sharding on a database " testdb " and shard a collection " testCollection " with _id as shard key.

Question # 30

Options:

Discussion 0

C100DBA PDF

C100DBA PDF (Printable)
$46.5
$154.99

C100DBA Testing Engine

C100DBA PDF (Printable)
$51
$169.99

C100DBA PDF + Testing Engine

C100DBA PDF (Printable)
$63.9
$212.99

Free Exams Sample Questions