I am setting up a simple personal finance database and wondered if anybody could clear up which is the best way to do the following.
I have a transaction table with the following fields:
TxnID (PK)
TxnType (FK)
TxnPayee (FK)
TxnPayeeRef (txt)
TxnAccountID (FK)
TxnDate (date)
TxnRef (txt)
TxnAmount (decimal)
TxnMemo (memo)
The field TxnAccountID links to the bank accounts table - this is fine with the majority of transactions but the question I have is, how would I handle transfers between accounts?
My initial thoughts are to have to entries, one for each account (obv, one with negative, on with positive amount) but I'm not sure this is ideal. Would it be better to have to account fields (to and from)? This will cause problems at data entry.
So I'm stumped, anybody?
Thanks.
I have a transaction table with the following fields:
TxnID (PK)
TxnType (FK)
TxnPayee (FK)
TxnPayeeRef (txt)
TxnAccountID (FK)
TxnDate (date)
TxnRef (txt)
TxnAmount (decimal)
TxnMemo (memo)
The field TxnAccountID links to the bank accounts table - this is fine with the majority of transactions but the question I have is, how would I handle transfers between accounts?
My initial thoughts are to have to entries, one for each account (obv, one with negative, on with positive amount) but I'm not sure this is ideal. Would it be better to have to account fields (to and from)? This will cause problems at data entry.
So I'm stumped, anybody?
Thanks.