4 ms·
Especially banks really need to maintain the transaction log. One could also argue that keeping the aggregated balances could be some DB side trigger on update
by gerhardi 10y ago
Especially banks really need to maintain the transaction log. One could also argue that keeping the aggregated balances could be some DB side trigger on update operations for separate "balances" table or generated with some kind of hourly/daily batch job to not put too much load on the operational DB with every customer browsing the online bank.
Triggers get a lot of hate because of separation from application level version control etc., but these are also long discussions to get into.
edit: This article's contents are good to be included with all the most junior level application design/development training material.
- dexwiz 10y agoYou can check triggers, or any db changes, into version control. Usually is more a migration script like Active Record. And sometimes its more like a log of changes than a total current state, but its definitely doable.
- gerhardi 10y agoYes, I just see this kind of arguments coming from quite senior level engineers every now and then. I see the reasoning that application/system level logic should be kept separate from the database, but aggregations are a good example in my opinion of things that database engines are good at, and also as the aggregated data does not insert any new operative data/transactions this should be mostly fine.