title: Database structure for storing Bank-like accounts and transactions
body: <p>We're in the process of adding a bank-like sub-system to our own shop.</p>
  
  <p>We already have customers, so each will be given a sort of account and transactions of some kind will be possible (adding to the account or subtracting from it).</p>
  
  <p>So we at least need the <strong>account</strong> entity, the <strong>transaction</strong> one and operations will then have to recalculate overall balances. </p>
  
  <p>How would you structure your database to handle this?</p>
  
  <p>Is there any standard bank system have to use that I could mock?</p>
  
  <p>By the way, we're on mysql but will also look at some nosql solution for performance boost.</p>