MongoDB multi-document ACID transactions का समर्थन करता है (replica sets के लिए v4.0 से, sharded clusters के लिए v4.2 से) — कई documents/collections में operations को समूहित करना ताकि वे सभी सफल हों या सभी विफल हों। हालाँकि, MongoDB का document model atomic single-document operations के माध्यम से अक्सर transactions को अनावश्यक बना देता है।
Single-document operations पहले से ही atomic होते हैं
KEY POINT: operations on a SINGLE document are ALWAYS atomic in MongoDB.
→ Because related data is often EMBEDDED in one document, many operations that would
need a transaction in SQL are a single atomic document update in MongoDB.
→ Good schema design (embedding) often eliminates the NEED for multi-doc transactions.
