1.

Which of the following operations are atomic on document level?(a) update(b) remove(c) findAndModify(d) all of the mentionedThis question was posed to me in unit test.Asked question is from Model Data for Atomic operations topic in portion Data Models of MongoDB

Answer»

Right ANSWER is (d) all of the mentioned

Explanation: In MongoDB, WRITE operations, e.g. db.collection.update(), db.collection.findAndModify(), db.collection.remove(), are atomic on the LEVEL of a single DOCUMENT.



Discussion

No Comment Found

Related InterviewSolutions