I am designing a website where users will log in and deposit real money into their account on the website via PayPal or credit card. When using the site, performing certain actions will create micro payments between members in the order of 5/15/50 cents per transaction.
I was just after a general opinion on database design for such a feature. What I am leaning towards is having one bank account for the website in which all money users deposit into their account resides. For each user account in the database, their current balance is recorded and when a transaction takes place a simple SQL Query will subtract say 5c from one user account and add it to another user account. Does this sound like a good way to implement the system? I am feeling a bit wary of having one "communal" account in which all money deposited and withdrawn resides.
I plan on having a "Transaction" table as well which will log all transactions between users as well as user deposits/withdrawl from the site.
Any suggestions would be greatly appreciated.