Settings

Theme

A simple double-entry ledger with source and destination accounts in SQL

blog.nxos.io

6 points by BillyTheKing a year ago · 1 comment

Reader

BillyTheKingOP a year ago

Hey everyone! I wrote a blog post about building a simple double-entry ledger using just simple SQL. It covers implementing a ledger with source and destination accounts, using a simple table structure and straight-forward SQL queries for balance calculations. I use negative and positive amounts instead of traditional debit and credit columns. In my opinion, this from/to model is easier to reason about and visualize in graph form, while still allowing credit/debit terminology to be built on top if needed. Would love to hear your thoughts!

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection