Need help trying to figure out accounting database schema
Date: Sun, 15 Jun 2008 20:01:23 -0700 (PDT)
For an accounting / banking database, I have the following in a two transaction tables showing what someone spends or credits:
Transaction Table //one only
TransactionItemID Table //many
AccountTable //one to one from TransactionID Table
One transcation, many items tied to that single transaction. Results of that transaction put in the account table. Is this right or too many tables?
In my logic I can change the balance and a purchase or debit was incurred. I would have to have a starting balance to begin with (but what if it is the first transaction? I'd have not item and a blank transactionitemid.) It would simply be a credit when the user first starts using the database for that account and as they went along simple addition and subtraction for each item tied to a single transactionid.
Should the transaction table have the debit, credit, and balance table in it? Am I thinking about schema wrong? I couldn't find any example accounting or banking database schemas online to learn from for this (the ones I found didn't have what I wanted.)
Thank you for any insight. Received on Sun Jun 15 2008 - 22:01:23 CDT