Most accounting-type databases I have seen use a single table for both credit and debit transactions, with the sign of the number indicating whether credit or debit.
Actually, my current client uses a single table with positive numbers for all transaction types, and another column to indicate whether it is a credit or a debit. This is mad, in my view, since every query then has to use expressions like:
Code:
SELECT SUM((CASE WHEN trans_type='CREDIT' then -1 ELSE +1 END) * amount) as balance
FROM transaction;
(Of course, they
could have hidden this complexity behind a view; but of course they did not!)