MongoDB multi-document ACID transactions समर्थन करते (v4.0 पासून replica sets साठी, v4.2 पासून sharded clusters साठी) — अनेक documents/collections मधील operations एकत्र करते जेणेकरून ते सर्व यशस्वी होतील किंवा सर्व अयशस्वी होतील. तथापि, MongoDB चे document मॉडेल अनेकदा 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.
