In a replicated cluster, which of the following node would only be used during an election?

In a replicated cluster, which of the following node would only be used during an election?A . arbiterB . primaryC . hiddenD . secondaryView AnswerAnswer: A

January 25, 2021 No Comments READ MORE +

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?

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? A . db.posts.createIndex({commerits.$.author":-l});B . db.posts.createIndex({comments.$.author": {$desc:l>});C . db.posts.createIndex({comments.author":-l});View AnswerAnswer: C

January 25, 2021 No Comments READ MORE +

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

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 . Skips the first five documents and returns the next fiveC . Limits the first five documents and then return...

January 24, 2021 No Comments READ MORE +

Which of the documents below will be retrieved by the following query? Assume the documents are stored in a collection called "sample". Check all that apply.

Which of the documents below will be retrieved by the following query? Assume the documents are stored in a collection called "sample". Check all that apply. db.sample.find( { "$or" : [ { "a" : { "$in" : [ 3, 10] > }, { "b" : { "$lt" : 2 >...

January 24, 2021 No Comments READ MORE +

What is the replication factor for a replicated cluster with 1 primary, 3 secondaries with one of them hidden. The set also has an arbiter?

What is the replication factor for a replicated cluster with 1 primary, 3 secondaries with one of them hidden. The set also has an arbiter?A . None of the aboveB . 5C . 3D . 4View AnswerAnswer: D

January 24, 2021 No Comments READ MORE +

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?

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?A . secondaryPreferredB . SecondaryC . nearestD . primaryE . primaryPreferredView AnswerAnswer: E

January 23, 2021 No Comments READ MORE +

What does the totalKeysExamined field returned by the explain method indicate?

What does the totalKeysExamined field returned by the explain method indicate?A . Number of documents that match the query conditionB . Number of index entries scannedC . Details the completed execution of the winning plan as a tree of stagesD . Number of documents scannedView AnswerAnswer: B

January 23, 2021 No Comments READ MORE +

Which are the ONLY ways to project portions of an array?

Which are the ONLY ways to project portions of an array?A . $sliceB . $C . All of the aboveD . $ elemMatchView AnswerAnswer: C

January 23, 2021 No Comments READ MORE +

Which operations add new documents to a collection?

Which operations add new documents to a collection?A . CreateB . updateC . insertD . deleteView AnswerAnswer: A,C

January 23, 2021 No Comments READ MORE +

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

The following aggregation option is used to specify the specific fields that needs to be passed to the next stage of the aggregation pipeline:A . $projectB . $aggregateC . $matchD . $groupView AnswerAnswer: A

January 22, 2021 No Comments READ MORE +