We are implementing a software that allows to send "virtual" money between user internally. We have started our database with a single entry as follow (simplified table). We only one record one transaction, where the user initiated the transaction (send money) will be recorded. So it will always be a debit.
TransactionLog
------------------
TransactionLogID
UserIDFrom
UserIDTo
CurrencyID
CurrencyAmount
Remarks
TransactionDateTime
Then a requirement changes that say we need a double entry accounting schema in our database. Then i have make a new table as follow.
TransactionLogDoubleEntry
----------------------------
TransactionLogDoubleEntryID
TransactionLogID
UserID
CounterPartyUserID
CreditOrDebit
CurrencyID
CurrencyAmount
Remarks
TransactionDateTime
My question:
1) Am i doing this in a correct direction that i add TransactionLogDoubleEntry
table with credit/debit it means it already become a double entry accounting schema?
2) Should i remain the table TransactionLog
? Or using TransactionLogDoubleEntry
is sufficient enough?
3) If i were to remain TransactionLog
table, is it necessary that i duplicate the currencyID, currencyAmount, remarks, TransactionDateTime
in TransactionLogDoubleEntry
? Or is that enough to get the corresponding value from TransactionLog
table.