title: SQL Debit and Credit tables
body: <p>I got a database project from my university to finish, but I am stack at the structure of debit and credit table that how to make it in SQL Server, my code is shown here:</p>
  
  <pre><code>create table AcCat
  (
      CatID smallint Primary Key,
      CatName nvarchar(20)
  )
  
  Create Table Accounts
  (
      AcID int Primary key,
      AcNumber int,
      AcName nvarchar(20),
      AcCategory smallint references AcCat(CatID)
  )
  
  Create Table Transactions
  (
      TrnRef bigint primary key identity (1,1),
      TrnDate datetime
  )
  
  Create Table Voucher
  (
      VID bigint primary key identity (1,1),
      TranRef bigint references Transactions(TrnRef),
      AccountNo int references Accounts(AcID),
      DrCr nvarchar(2),
      Amount money,
      Narration nvarchar(100)
  )
  
  Create Table Voucher_2 
  (
      V2ID bigint primary key identity (1,1),
      V2TranRef bigint references Transactions(TrnRef),
      V2DebitAc int references Accounts(AcID),
      V2CreditAc int references Accounts(AcID),
      Amount money,
      Narration nvarchar(100)
  )
  </code></pre>
  
  <p>I don't know above table structure are correct or not, but I am stuck at the <code>Voucher</code> and <code>Voucher_2</code> tables that which one I should use for my Database.</p>
  
  <p>The tables output is following</p>
  
  <p><a href="https://i.stack.imgur.com/R5Sr4.jpg" rel="nofollow noreferrer">My tables Output</a></p>