MongoDB ਮਲਟੀ-ਡੌਕੂਮੈਂਟ ACID ਲੈਨਦੇਨ ਨੂੰ ਸਪੋਰਟ ਕਰਦਾ ਹੈ (v4.0 ਤੋਂ replica sets ਲਈ, v4.2 ਤੋਂ sharded clusters ਲਈ) — ਬਹੁਤ ਸਾਰੇ ਡੌਕੂਮੈਂਟਾਂ/ਕਲੈਕਸ਼ਨਾਂ ਵਿੱਚ ਓਪਰੇਸ਼ਨਾਂ ਨੂੰ ਗਰੁੱਪ ਕਰਦਾ ਹੈ ਤਾਂ ਕਿ ਉਹ ਸਾਰੀਆਂ ਸਫ਼ਲ ਹੋਣ ਜਾਂ ਸਾਰੀਆਂ ਅਸਫ਼ਲ ਹੋਣ। ਹਾਲਾਂਕਿ, MongoDB ਦਾ ਡੌਕੂਮੈਂਟ ਮਾਡਲ ਅਕਸਰ atomic ਇੱਕਲ-ਡੌਕੂਮੈਂਟ ਓਪਰੇਸ਼ਨਾਂ ਦੁਆਰਾ ਲੈਨਦੇਨ ਅਨਾਵਸ਼ਕ ਬਣਾਉਂਦਾ ਹੈ।
ਇੱਕਲ-ਡੌਕੂਮੈਂਟ ਓਪਰੇਸ਼ਨਾਂ ਪਹਿਲਾਂ ਤੋਂ ਹੀ 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.
