Weekend Sale Special - 75% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: newyear

MongoDB C100DBA - MongoDB Associate Database Administrator(Based on MongoDB 6.0 and 7.0+)

Page: 2 / 6
Total 172 questions

MongoDB is

A.

None of the above

B.

Object-oriented DBMS

C.

Relational DBMS

D.

Document-oriented DBMS

What is the equivalent command in MongoDB for the following SQL query?

SELECT * FROM posts WHERE author like " %john% "

A.

db.posts.find( { author: /John/ } )

B.

db.posts.find( { author: /AjohnA/ > )

C.

db.posts.find( { $like: {author: /John/} } )

D.

db.posts.find( { author: {$like: /John/} } )

MongoDB is a schema-less design.

A.

False

B.

True

In a collection that contains 100 post documents, what does the following command do? db. posts. find().skip(5).limit(5)

A.

Skip and limit nullify each other. Hence returning the first five documents

B.

Limits the first five documents and then return them in reverse order

C.

Skips the first five documents and returns the sixth document five times

D.

Skips the first five documents and returns the next five

A MongoDB collection named users contains sample documents with fields including name, age, address, description, city, and occupation.

The administrator uses the following query to perform a collection scan:

db.users.find({ city: " New York " , occupation: " Software Engineer " })

What compound index will improve the performance of the query the MOST?

A.

db.users.createIndex({ city: 1, name: 1 })

B.

db.users.createIndex({ city: 1, occupation: 1 })

C.

db.users.createIndex({ occupation: 1, name: 1 })

D.

db.users.createIndex({ occupation: 1, city: 1 })

Consider the following documents:

You perform the following query;

How many documents will be updated by the query?

A.

0

B.

1

C.

2

D.

3

E.

5

Which of the following commands will return all the posts with number of likes greater than 100 and less than 200, both inclusive?

A.

db.posts.find({ likes : { $gte : 100 , $lte : 200 } } );

B.

db.posts.find({ likes : { $gt : 100 , $lte : 200 } } );

C.

db.posts.find({ likes : { $gte : 100, $lt : 200 } } );

D.

db.posts.find({ likes : { $gt : 100, $lt : 200 > > );

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

A.

mongos

B.

mongo shell

C.

individual language drivers

D.

mongod

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

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

A.

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

B.

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

C.

db.currentOp(true)

D.

db.adminCommand({ currentOp : true })

E.

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