Hacker News new | ask | show | jobs
by Animats 1352 days ago
No, a ledger and a database are different. The ledger is a transaction log. The database holds the current state.

Basic bookkeeping concept: every once in a while (usually daily) you take a snapshot of the current state and mark that point in the ledger. Then you take the previous snapshot, re-run the day's transactions, and you should get the current snapshot. If you don't, something has gone wrong. This is called "reconciliation".

2 comments

A database can hold state but it can also easily hold a ledger/transaction log. Or both. Most of the databases I have built or worked on end up organically evolving to have both "state tables" and "event tables" where event tables record state transitions broadly speaking. That's just a very natural way to model systems where you need to capture information about the state changes (eg when they happen etc).
So, an append-only database.