DEV Community

Discussion on: How banks handle our balance, technically?

Collapse
 
imthedeveloper profile image
ImTheDeveloper • Edited

The truth is, they do both and more.

The accounts table has account information and is updated with a running total balance along with other items such as amount of overdraft/credit available and number of account holders. This table is used for day to day display of account data to end users and customers.

Thenas you rightly say there is a transactions table. This lists out each discrete transaction along with detail on type, references, amount etc.

It is rare that the bank will use the transactions data to calculate an account balance but it is user for reconciliations that run. The transactions table is also heavily used by analysts and fraud systems to monitor for transaction fraud and velocity changes.

Aside from the above two tables they also tend to have a transactions history table and the same for accounts. These become the long log of data you would expect to see whilst the main tables are typically limited. This is why many banks can only show X days or y months of transaction data to customers when they login to an app or online. The live tables become quicker to process since they aren't holding all of the data.