Black Friday Reward - Upto 75% off - Ends in 0d 00h 00m 00s - Coupon code: CFsave75

Pass the MongoDB MongoDB Certified DBA Associate C100DBA Questions and answers with CertsForce

Viewing page 4 out of 6 pages
Viewing questions 31-40 out of questions
Questions # 31:

Which of the following is a valid insert statement in mongodb? Select all valid.

Options:

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


Expert Solution
Questions # 32:

Consider a products collection:

{ " _id " : 1, " item " : " t-shirt " , " color " : " red " , " price " : 10 }

{ " _id " : 2, " item " : " sweater " , " color " : " green " , " price " : 20 }

{ " _id " : 3, " item " : " belt " , " color " : " black " , " price " : 15 }

{ " _id " : 4, " item " : " hat " , " color " : " green " , " price " : 12 }

What operation modifies the price of all products that have a color value of " green " ?

Options:

A.

db.products.update({ " color " : " green " }, { " price " : { " $inc " : 5 } })


B.

db.products.update({ " color " : " green " }, { $inc: { " price " : 5 } })


C.

db.products.updateMany({ " color " : " green " }, { " $inc " : { " price " : 5 } })


D.

db.products.updateMany({ " color " : " green " }, { " price " : { " $inc " : 5 } })


Expert Solution
Questions # 33:

Which of the following commands finds all the documents in the posts collection with post timestamp field as null?

Options:

A.

db.posts.find( { post_timestamp: { $fieldtype: null } } )


B.

db.posts.find( { post_timestamp: { $type: null } } )


C.

db.posts.find( { post_timestamp : { $type; 10 > > )


D.

db.posts.find( { post_timestamp: { $fieldtype: 10 } } )


Expert Solution
Questions # 34:

If the value of totalKeysExamined is 30000 and the value of totalDocsExamined is 0, which of the following option is correct?

Options:

A.

None of the above


B.

The query used an index to fetch the results


C.

The query returned 0 documents


D.

The query returned 30000 documents after scanning the documents


Expert Solution
Questions # 35:

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


Expert Solution
Questions # 36:

Which of the following does MongoDB use to provide High Availability and fault tolerance?

Options:

A.

Sharding


B.

Indexing


C.

Replication


D.

Write Concern


Expert Solution
Questions # 37:

Which of the following node is used during election in a replication cluster?

Options:

A.

primary


B.

arbiter


C.

hidden


D.

secondary


Expert Solution
Questions # 38:

If you have created a compound index on (A,B, C) which of the following access pattern will not be able to utilize the index?

Options:

A.

A, B, C


B.

A


C.

B, C


D.

A, B


Expert Solution
Questions # 39:

In a replica set, which member is responsible for maintaining copies of the primary ' s data?

Options:

A.

Secondary


B.

Mongos


C.

Arbiter


D.

Shard


Expert Solution
Questions # 40:

Which of the following is true of the mechanics of replication in MongoDB? Check all that apply.

Options:

A.

Members of a replica set may replicate data from any other data-bearing member of the set by default


B.

Clients read from the nearest member of a replica ser by default


C.

Operations on the primary are recorded in a capped collection called the oplog


Expert Solution
Viewing page 4 out of 6 pages
Viewing questions 31-40 out of questions