nerdexam
MongoDB

C100DBA · Question #121

C100DBA Question #121: Real Exam Question with Answer & Explanation

Sign in or unlock C100DBA to reveal the answer and full explanation for question #121. The question stem and answer options stay visible for context.

Question

Consider the following example document from the sample collection. All documents in this collection have the same schema. Which of the following queries will replace this with the document.

Options

  • Adb.sample.update( { "_id" : 3 } , { "$set" : { "_id" : 7 , "c" : 4 > > )
  • Bdb.sample.update( { "_id" : 3 > , { "_id" : 7 , "c" : 4 > , { "justOne" : true > ) / □This operation
  • Cdb.sample.update( { "_id" : 3 > , { "_id" : 7 , "c" : 4 , { "$unset" : [ "a" , "b" ] } } )
  • Ddb.sample.update( { "_id" : 3 > , { "_id" : 7 , "c" : 4 > )

Unlock C100DBA to see the answer

You've previewed enough free C100DBA questions. Unlock C100DBA for full answers, explanations, the timed quiz mode, progress tracking, and the master PDF. Question stem and options stay visible so you can still see what's on the exam.

Full C100DBA Practice