title: MySQL table designing for an Accounting system
body: <p>I am designing an online accounting system as a college project. I have got the following simple transactions.</p>
  
  <ol>
  <li><p>Sales on cash $300</p></li>
  <li><p>Cash burrowed from Smith $250</p></li>
  <li><p>Electricity bill paid $50</p></li>
  </ol>
  
  <p><img src="https://i.stack.imgur.com/3VKBU.png" alt="enter image description here"></p>
  
  <p>I have referred <a href="http://homepages.tcp.co.uk/~m-wigley/gc_wp_ded.html" rel="nofollow noreferrer">Double Entry Accounting in a Relational Database </a> and designed the above <strong>Transaction</strong> table(minus sign means the amount is credited). The id 1 and 2 belong to transaction 1, id 3 and 4 belong to transaction 2 and so on. How can I identify each two rows as a single transaction in MySQL database.For example if the first transaction to be selected how can I do it since there is no relationship between the two rows. If this design does not sound good can you suggest an alternative. </p>