Learn|||Ledgering

Ledger Database

In its simplest form, a Ledger Database is a database that stores accounting data. More specifically, a ledger database can store the current and historical value of a company’s financial data. For example, you could utilize a ledger database to find the current value of a business bank account, as well as the historical value and transaction history for the same account.

What is the difference between a General Ledger and a Ledger Database?

A general ledger is a master accounting document of all of a business' financial transactions. A ledger keeps a record of all of the different transactions made by a company throughout its lifespan. Most business ledgers utilize double-entry accounting and can exist as physical books or as digital records.

Businesses use ledgers to get a detailed view of their financial transactions across different periods of time. The information from the ledger is what businesses use to create income statements, balance sheets, or other significant financial documents. A typical company’s general ledger isn’t always up to date on a second-to-second (or even day-to-day) basis. Additionally, a general ledger only tracks transactions that directly affect a company’s financial statements.

A ledger database is where the data from the ledger itself is stored. Larger companies that move money at scale have different needs than local small businesses. They need to track transactions at a high frequency, high volume, and across entities that are represented in a software application. This requires a purpose-built application ledger, also known as a financial ledger database. Where a general ledger is built for capturing and reporting all business activity, a ledger database is built to surface data within a product and capture a subset of business activity as a high higher level of granularity and speed.

A diagram showing how a ledger database works
A General Ledger vs. A Ledger Database

Unlike a general ledger, a financial ledger database needs to be built to serve a company’s financial stakeholders and business model.

For example, a digital wallet product might need to check a user’s balance before allowing them to withdraw money. A ledger database allows you to segment a single store of cash, like a bank account, into multiple user wallets. Transactions between wallets can be tracked in the ledger without moving any money.

Alternatively, a marketplace needs a ledger database to record when a purchase is made and to separately keep track of the cash transactions for the buyer and the seller. It might also need to retrieve and show a user’s history of transactions every time that user logs into their dashboard.

The ledger database needs to be able to record user balances and financial transactions that affect those balances. Because these transactions impact the overall business, the financial ledger database can be regularly exported to general ledger software to simplify financial reporting.

What to consider when designing a ledger database

To ensure reliability, a ledger database should be built following several design principles to ensure an application won’t lose track of user funds or fail to make payments:

  • Immutability: to enforce append-only data entry, coupled with a full audit trail
  • Idempotency: to prevent duplicate transactions.
  • Concurrency controls: to make the database able to handle a high volume of simultaneous requests.
  • Double-entry bookkeeping (like a general ledger): to ensure money can’t be created or destroyed in the database.

To learn more about Ledgers, check out these additional resources: