title: Mongodb for Transactional based activities
body: <p>Currently I am working on a financial application where complex transaction can be occurred. For this purpose, I have 2 options, either use Mongodb or Relational databases to store core transactional data.</p>
  
  <p>So I have read different blogs, and found that Mongodb is schema-less(flexible) as well as faster than relational databases like MySQL, but unfortunately it doesn't give any transactional support(like Serializable Isolation level)!. It just give concurrency control/ atomicity on single document level. So what if a transaction requires to change multiple documents!<br/>According to the documentation of MongoDB: <br/></p>
  
  <blockquote>
    <p>"An isolated write operation does not provide “all-or-nothing”
    atomicity. That is, an error during the write operation does not roll
    back all its changes that preceded the error."</p>
  </blockquote>
  
  <p>Even Mongodb have transactional support, but its too complex and not as flexible as that of relational db, 
  <a href="https://docs.mongodb.com/manual/tutorial/perform-two-phase-commits/" rel="nofollow noreferrer" title="Perform Two Phase Commits">Perform Two Phase Commits</a></p>
  
  <p>So can anyone tell me is it good to use Mongodb for such operations or any Relational database? </p>