NANDHOO
.
Learning Paths
Dashboard
Sign In
Home
Dashboard
MongoDB Database Engineering
Advanced CRUD (Update & Delete)
Quiz
Chapter Quiz: Advanced CRUD (Update & Delete)
Mastery Assessment: Advanced CRUD
Complete this assessment with 100% score to master this chapter.
01
What happens during an 'Upsert' operation if no document matches the search criteria?
An error is thrown.
A new document is created based on the query and update operators.
The database waits for a document to be created.
Nothing happens.
02
When using `findAndModify` (or `findOneAndUpdate`), which option ensures you receive the document *after* the update is applied?
upsert: true
new: true (or returnDocument: 'after')
multi: true
sort: { _id: 1 }
03
Which update operator is used to add an element to an array only if it does not already exist in that array?
$push
$addToSet
$set
$inc
04
What is the primary advantage of using `bulkWrite()` for large data imports compared to multiple `insertOne()` calls?
It bypasses the journal for speed.
It reduces the number of network round-trips to the server.
It automatically creates indexes.
It ignores write concerns.
Submit Answers
Back to Lesson
Next Chapter