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

What is the output of following two commands in MongoDB: db. posts. insert({n_id":l}) db.posts.insert({"_id":l})

A.

Two documents will be inserted with _id as 1

B.

MongoDB will automatically increment the _id of the second document as 2

C.

This will throw a duplicate key error

D.

It will insert two documents and throw a warning to the user

As per the aggregation pipeline optimization concepts, if you have a $sort followed by a $match:

A.

Providing these parameters in any order does not impact the performance

B.

$sort moves before $match

C.

MongoDB does not do any movements by default and will use the order provided

D.

$match moves before $sort

Which of the following is true about sharding?

A.

Creating a sharded key automatically creates an index on the collection using that key

B.

We cannot change a shard key directly/automatically once it is set up

C.

A sharded environment does not support sorting functionality since the documents lie on various mongod instances

D.

Sharding is enabled at the database level

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

We can insert multiple documents in bulk using which of the following operations:

A.

initializeUnorderedBulk

B.

initializeUnorderedBulkOp

C.

initializeBulk

D.

initializeBulkOp

The________operator can be used to identify an element in the array to be updated without explicitly specifying

the position of the element.

A.

$ elemMatch

B.

$slice

C.

Updating an array field without knowing its index is not possible.

D.

$

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

Which mongodb tool is used to report details on number of database operations in MongoDB?

A.

mongorestore

B.

mongostat

C.

mongodump

D.

mongotop

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?

A.

1

B.

2

C.

0

D.

7

MongoDB is a schema-less design.

A.

False

B.

True