![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
For an accounting / banking database, I have the following in a two transaction tables showing what someone spends or credits: Transaction Table //one only -- TransactionID UserID TransactionItemID Table //many -- TransactionItemID TransactionID ItemID AccountTable //one to one from TransactionID Table -- AccountID TransactionItemID UserID Debit Credit Balance 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. |
#3
| |||
| |||
|
|
For an accounting / banking database, I have the following in a two transaction tables showing what someone spends or credits: Transaction Table //one only -- TransactionID UserID TransactionItemID Table //many -- TransactionItemID TransactionID ItemID AccountTable //one to one from TransactionID Table -- AccountID TransactionItemID UserID Debit Credit Balance 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. |
#4
| |||
| |||
|
|
For an accounting / banking database, I have the following in a two transaction tables showing what someone spends or credits: Transaction Table //one only -- TransactionID UserID TransactionItemID Table //many -- TransactionItemID TransactionID ItemID AccountTable //one to one from TransactionID Table -- AccountID TransactionItemID UserID Debit Credit Balance 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. |
#5
| |||
| |||
|
|
For an accounting / banking database, I have the following in a two transaction tables showing what someone spends or credits: Transaction Table //one only -- TransactionID UserID TransactionItemID Table //many -- TransactionItemID TransactionID ItemID AccountTable //one to one from TransactionID Table -- AccountID TransactionItemID UserID Debit Credit Balance 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. |
#6
| |||
| |||
|
|
For an accounting / banking database, I have the following in a two transaction tables showing what someone spends or credits: Transaction Table //one only -- TransactionID UserID TransactionItemID Table //many -- TransactionItemID TransactionID ItemID AccountTable //one to one from TransactionID Table -- AccountID TransactionItemID UserID Debit Credit Balance 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. |
#7
| |||
| |||
|
|
For an accounting / banking database, I have the following in a two transaction tables showing what someone spends or credits: Transaction Table //one only -- TransactionID UserID TransactionItemID Table //many -- TransactionItemID TransactionID ItemID AccountTable //one to one from TransactionID Table -- AccountID TransactionItemID UserID Debit Credit Balance 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. |
#8
| |||
| |||
|
|
For an accounting / banking database, I have the following in a two transaction tables showing what someone spends or credits: Transaction Table //one only -- TransactionID UserID TransactionItemID Table //many -- TransactionItemID TransactionID ItemID AccountTable //one to one from TransactionID Table -- AccountID TransactionItemID UserID Debit Credit Balance 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. |
![]() |
| Thread Tools | |
| Display Modes | |
| |