A ledger database keeps an append-only history of every change, so a past value cannot be edited without leaving a trace. An immutable database is the same idea under another name. A verifiable database adds one thing: a proof that a party outside the company can check on its own, without seeing the data.
So the real choice between the three is not about storage. It is about who needs to check the history, and what they are allowed to see while they do it. For an engineering team at a fintech, a custodian or a stablecoin issuer, that question usually comes from an auditor, a regulator or a counterparty (the firm on the other side of a deal).
What is a ledger database?
A ledger database is a database that records every change as a new entry in a journal and links the entries with cryptographic hashes. Each new block of changes is hashed together with the hash of the block before it. If anyone edits an old value, the hashes after it no longer match, and a check shows where the history was changed.
Microsoft's SQL ledger is a clear example. Its documentation (Microsoft Learn, "Ledger overview") describes how the rows changed in a transaction are hashed with SHA-256 through a Merkle tree, a tree of hashes where each parent is the hash of the two below it and the top is one root hash. Those roots are grouped into blocks, and each block is hashed together with the previous one, so the result is a chain of hashes inside the database. Microsoft calls the root hashes database digests. They can be copied to write-once storage outside the database and used later to check that nothing changed.
Amazon's Quantum Ledger Database (QLDB) used the same model. Its developer guide described a journal hashed with SHA-256 in a Merkle tree, a digest that stands for the full history, and a proof that links one document revision to that digest.
Ledger database vs immutable database: one idea, two names
"Immutable database" is the name used by projects such as immudb, a source-available database from Codenotary. Its project page on GitHub says you can add new versions of an entry but never change or delete one, and that the integrity of the history is protected by the clients, without the need to trust the database. Reads come in two forms: a normal read, and a verified read that checks the returned value against a cryptographic proof of the current state.
The words differ, but the design is close to a ledger database. Both keep every version. Both make a silent edit visible. And in both, the operator still runs the server, holds the storage and decides who gets access. An immutable database stops the history from being rewritten; it does not change who holds the data. For the older, blockchain side of this idea, see our explainer on the
immutable ledger in blockchain.
What a ledger database does not prove
A ledger database answers one question well: has this history been changed since the digest was taken? It answers it for whoever can run the check.
Look at what the check needs. In Microsoft's guide to verifying a ledger, the user connects to the database and runs a built-in check script (a stored procedure) that compares the hashes in the database with the stored digests. That works well for the operator's own team and for an auditor who is given access. It is less useful for a party that has no access and should not get it, such as a counterparty, a regulator in another market or a smart contract.
Two limits follow from this:
- The checker relies on the operator to produce the history. The digest proves that the history matches what was committed. Getting that history, and the digest, still runs through the operator.
- Checking usually means seeing the data. To check a row against the hash chain, the checker reads the row. For reserve balances, client positions or identity data, that is the part a firm does not want to share.
None of this is a flaw in ledger databases. They were built to make tampering visible to the people who run and audit the system, and they do that. The gap appears when the checker sits outside the company. The Nethermind, Etherealize and L2BEAT primer "L2s for Institutional Finance" (December 2025) argues that, instead of after-the-fact reconciliation and paper trails, audits "can be done by verifying mathematical proofs and hashes."
What is a verifiable database?
A verifiable database generates a proof with the data, so a third party can check an operation on its own, against a root hash the database has published (a committed root). With Zero-Knowledge Proofs, the check also works without the underlying data.
zkDatabase is built this way. It is a verifiable database where every insert, update and query comes with a Zero-Knowledge Proof, so anyone can check it was done correctly while the raw data stays private and off-chain. The data sits in documents and collections. Each document is a leaf in a Merkle tree, and the tree has one root. The prover uses Groth16, a proof system that makes small proofs of a fixed size, to generate a proof that a document is a member of that tree. The person checking learns that the document is in the tree and nothing else: not the path, not the sibling hashes and not its position.
The SDK shows the three levels of checking side by side (zkDatabase docs, "Document History", "Merkle Tree" and "Verify zkProof"):
// 1. The full history of one document, like a ledger
const history = (await doc.history({ limit: 5, offset: 0 })).unwrap();
// 2. A Merkle proof for the current version, checked against the root
const merkleProof = await doc.merkleProof().then((r) => r.unwrap());
const inTree = doc.merkleProofVerify(bookSchema, merkleProof);
// 3. A Zero-Knowledge Proof for the database state
const { valid, merkleRoot } = await dbTest
.zkProofVerify(proofStatus.sequenceNumber)
.then((r) => r.unwrap());
The first call gives the operator's team what a ledger database gives: every past version with its time. The second gives a Merkle proof, which anyone holding the document can check against the root. The third returns a valid or invalid result and the Merkle root, so the checker confirms the state of the database without receiving the documents. Put simply: the Merkle proof needs the document, and the Zero-Knowledge Proof does not. That third level is what a ledger database does not offer. For a wider look at the category, see our guide to the
verifiable database.
A proof here shows that data was stored and processed as claimed. It does not show that the input was right in the first place. If a wrong balance is written, the proof is about that wrong balance, and the firm that wrote it is still responsible for it.
Comparison: five ways to keep a history nobody can rewrite
All five keep a history nobody can rewrite; they differ in who can check it and what the checker must see. The facts about each product come from its own documentation.
| What is recorded | Who can check it | What the checker must see | Needs a blockchain | Status |
|---|
| Ledger tables in a relational database (Microsoft SQL ledger) | Every row change, hashed into blocks; digests stored outside | Users who can connect and run the verification procedure | The database and its digests | No | Available in SQL Server 2022 and Azure SQL |
| Managed ledger database (Amazon QLDB) | A journal of document revisions with a digest | Users with access to the ledger, using a digest and a proof per revision | The revision being checked | No | End of support 31 July 2025 |
| Self-hosted immutable database (immudb) | Every version of every entry; no edits or deletes | Clients that track the database state and use verified reads | The values they read | No | Source-available (Business Source License 1.1) |
| Blockchain as a database | Every transaction, replicated to all nodes | Anyone running or reading a node | The on-chain data | Yes | Public networks |
| Verifiable database (zkDatabase) | Documents in Merkle trees, with a Zero-Knowledge Proof for every operation | Anyone with the proof, including a smart contract | A proof and a Merkle root, not the data | No; the data stays off-chain, and proofs can also be checked on-chain | SDK and docs public |
A blockchain is the only option where every party sees the same history by default, and it is also the one where the data is public or has to be encrypted first. We cover that trade-off in our history of the
blockchain database.
A ledger database makes edits visible to people who can open it; a verifiable database lets people outside it check the state with a proof.
What to use after Amazon QLDB
AWS ended support for Amazon QLDB on 31 July 2025. The notice in the QLDB developer guide said existing customers could use the service until that date, and pointed them to a migration guide for Amazon Aurora PostgreSQL. Microsoft published its own guide on the Azure SQL Blog on moving from QLDB to ledger tables in Azure SQL.
Teams leaving QLDB have three main options:
- A relational database with ledger tables or an audit log. Ledger tables keep a hash chain inside the database; a plain audit log keeps the history but not the hash chain. This fits when the operator and its auditors are the only checkers.
- A self-hosted immutable database. This keeps the append-only model and client-side verified reads, under the team's own operation.
- A verifiable database. This fits when a party outside the company, or a smart contract, has to check the data without being given access to it.
Whichever path a team takes, the key question is what replaces the hash chain, not only where the history is stored. Write-once storage such as Amazon S3 Object Lock is a common stand-in. AWS describes it as a write-once-read-many model that helps prevent objects from being deleted or overwritten for a set time, or until a hold is removed. It does not link records into a hash chain, produce a digest or give a proof that one record belongs to the history. A team that moves its QLDB journal into locked storage keeps the files, but has to build the hashing and the checks itself. The same goes for a plain audit log: it keeps the old rows, but nothing in it shows that a row was not changed.
The right path depends less on features than on who the checker is. A team that only needed QLDB for internal audits is well served by the first two. A team that needs to show a regulator, a lender or an on-chain protocol that a balance or a history is intact, without sending the data, needs the third.
How to choose: four questions
- Who needs to check the history? Only your team and your auditor: a ledger database or an immutable database. Counterparties, regulators or smart contracts with no database access: a verifiable database.
- Can the checker see the data? If yes, a hash chain and a digest are enough. If the data is reserves, client positions or identity data, the check has to work without it, which needs a Zero-Knowledge Proof.
- How often does it have to be checked? A yearly audit can run a verification procedure once. A lender or a protocol that checks collateral on every update needs a proof with every update.
- Does the proof need to live on-chain? If a smart contract has to act on the result, the proof has to be small and cheap enough to check on-chain. A Groth16 proof is 192 bytes, which is why zkDatabase uses it.
The same logic applies to newer systems that write their own logs. Our post on the
AI agent audit trail applies it to agents that move money.
FAQ
What is a ledger database in simple terms?
It is a database that never overwrites the past. Every change is added as a new entry and linked to the previous ones with hashes, so any edit to old data breaks the chain and shows up in a check.
What is Amazon QLDB, and is it still available?
Amazon Quantum Ledger Database was a managed ledger database from AWS, with a journal, a digest and proofs for document revisions. AWS ended support on 31 July 2025 and pointed customers to Amazon Aurora PostgreSQL.
Is an immutable database the same as a blockchain?
No. An immutable database keeps an append-only history on servers that one operator runs. A blockchain copies the history to many independent nodes and needs consensus between them. Both make edits visible; only a blockchain spreads the data to everyone.
Is a verifiable database a ledger database?
It keeps the history like a ledger database does. The difference is the proof: a verifiable database such as zkDatabase generates a Zero-Knowledge Proof for every operation, so a party outside the operator can check the data without seeing it. We explain Merkle proofs step by step in a separate post.
Try the SDK calls yourself
The three calls above, history(), merkleProof() and zkProofVerify(), are in the zkDatabase SDK documentation with full examples, from inserting a document to checking both proofs.