C100DBA · Question #65
We can insert multiple documents in bulk using which of the following operations:
The correct answer is B. initializeUnorderedBulkOp. initializeUnorderedBulkOp() is the correct MongoDB shell method for initializing a bulk write operation that processes documents in any order, allowing multiple inserts (and other write operations) to be batched and executed together. Option A (initializeUnorderedBulk) is wrong b
Question
We can insert multiple documents in bulk using which of the following operations:
Options
- AinitializeUnorderedBulk
- BinitializeUnorderedBulkOp
- CinitializeBulk
- DinitializeBulkOp
How the community answered
(36 responses)- A3% (1)
- B94% (34)
- D3% (1)
Explanation
initializeUnorderedBulkOp() is the correct MongoDB shell method for initializing a bulk write operation that processes documents in any order, allowing multiple inserts (and other write operations) to be batched and executed together. Option A (initializeUnorderedBulk) is wrong because it's missing the Op suffix - this exact suffix is required and is part of the official API name. Options C and D (initializeBulk / initializeBulkOp) are fabricated; MongoDB's bulk API only exposes initializeUnorderedBulkOp() and its counterpart initializeOrderedBulkOp(), so neither prefix-only variant exists.
Memory tip: Think "Un-Op" - Unordered Operation - the full word Op must be present, and you need both the ordering qualifier (Unordered) and the operation suffix (Op) to spell out the real method name.
Topics
Community Discussion
No community discussion yet for this question.