Introduction
Single document atomicity means that when you change one document in MongoDB, the whole change happens all at once or not at all. This keeps your data safe and correct.
When updating a user's profile information in one go.
When adding an item to a shopping cart document.
When changing the status and timestamp in a single order document.
When incrementing a counter inside one document.
When replacing a whole document with new data.