There's this famous database design problem about account balance. Should you store the account balance in a column, or in a table of transactions and calculate it on the fly whenever you need it?
If you have an account balance column, you'll always depend on the back-end application, in database triggers or something like this to update the field.
If you have a transactions table, you'll have to process a lot of data to get this information, that can cost I/O and time. That seems not to scale well.
And, in my view, both can run into concurrency issues, right?
My question is: how banks do it?