MongoDB બહુ-દસ્તાવેજ ACID transactions (v4.0 થી replica sets માટે, v4.2 થી sharded clusters માટે) ને સમર્થન આપે છે — બહુવિધ દસ્તાવેજો/સંગ્રહ પર કામગીરી જૂથબદ્ધ કરીને જેથી તે બધા સફળ થાય અથવા બધા નિષ્ફળ થાય। જો કે, MongoDB ની દસ્તાવેજ મૉડેલ ઘણીવાર atomic એક-દસ્તાવેજ કામગીરી દ્વારા transactions અનાવશ્યક બનાવે છે।
એક-દસ્તાવેજ કામગીરી પહેલેથી જ 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.
