← Home
← All posts

We Bet Banks Would Use Blockchain Wrong, So We Hid It Behind SQL

November 16, 2026

The story behind my blockchain patent, how it works, and what I'd actually use it for.

This started as a hackathon project at Unisys, back during the crypto boom, when blockchain was shaking up all of tech.

Our team made two bets. The first was that banks would want to adopt blockchain. The second was that they'd use it wrong.

Our reasoning was simple. Banks know SQL. Their data lives in relational databases, and their people know how to work with it. A blockchain throws most of that away. You can only append to it, so you can't just update a row. It's slow to search, and it doesn't speak SQL. Moving a bank onto one would mean rewriting every app that touches the data, and that's exactly where we figured it would go wrong.

So we flipped the problem around. Instead of teaching banks blockchain, we'd hide the blockchain behind the SQL they already knew.

The hackathon went decently. We got a lot of laughs, because the pitch was a little ridiculous. But there was a kernel of truth to it, and the judges all knew it.

Afterward, we got introduced to a patent attorney, who kicked off the patent process. I led the research team at Unisys that turned the idea into a patent, and it was a pain. So much writing. You send in a draft in tech speak, and it comes back completely changed into legalspeak. After many rounds of edits, we finally filed in October 2019.

Then it was hurry up and wait. We heard nothing for years, until I randomly checked one day and saw it had been granted back in December 2023. The idea that got laughs at a hackathon was now US Patent 11,836,130, "Relational database blockchain accountability."

The problem: proving nobody changed anything

Say an auditor asks what a table said on June 30th. You have backups and logs, sure. But can you prove nobody has changed those records since? With a normal database, mostly you can't. The auditor just has to trust your admins.

A blockchain solves that. Each block holds a hash of the block before it, so changing an old record means changing every block after it too. Tampering shows.

We wanted that guarantee without paying for it everywhere else. Apps should keep sending SQL, and reports should keep working. We also had to handle something blockchains are bad at, which is deleting data. Some regions now have "right to be forgotten" laws. On a normal blockchain, a delete is just a new transaction that says "this was deleted," and the old data is still sitting right there.

The Agent in the middle

The core of the design is a server the patent calls the Agent. It sits between your apps and the blockchain.

To your apps, the Agent looks like a normal SQL database. Users log in, run SELECT, UPDATE and DELETE, and get rows back like they always have.

On the other side, it turns every create, update and delete into a blockchain transaction. It checks who each user is and proves its own identity. It also does the housekeeping, like caching and checking and repairing links. Nobody using the database has to know the blockchain is there.

Apps keep speaking SQL; the Agent writes every change to the chain Users and apps Existing applications Plain SQL, unchanged Agent Authenticates users Turns SQL into transactions Follows space-time links Blockchain Append-only history Tamper-evident SQL rows transactions lookups
SQL goes in, rows come out. Only the Agent ever touches the chain.

Fitting a database onto a chain

The Agent stores the whole database as a tree of objects on the chain. At the top is a database directory that links to each database. Each database lists its tables. Each table has a template of its fields and a link to its list of rows, and the rows hold the actual data.

Every one of those objects is stored as a transaction on the chain. So every change, at every level, has a history.

Each block has the usual blockchain header. That's a block ID, its hash, a Merkle root (one hash that covers every transaction in the block), the previous block's hash and a timestamp.

Inside the block, each transaction is split in two. The immutable part can never change. The mutable part is small and can still be updated.

The immutable part holds:

  • The transaction ID and timestamp, which say when it happened.
  • The SQL action (create, update or delete), plus who did it and when. It can also record reads, if you want an audit trail of who looked at what.
  • A copy of the SQL object right after the change.
  • Backward links to the object's first and previous versions, and to its neighbors.

The mutable part holds:

  • Forward links to the object's next and latest versions, and to its neighbors.
  • The deletion key that encrypts this transaction's data.

That second list is short, but the rest of the design leans on it.

Space-time links

A blockchain is one long receipt. To find the current version of a customer record, you'd normally scan back through the whole thing. That's fine with a hundred records. With a hundred million, it's painful.

So every transaction carries links in two directions. Space links point to neighbors, like the next and previous rows in a table. Time links point to earlier and later versions of the same object.

The backward links are known when a transaction is written, because the first and previous versions already exist. So they go in the immutable part, where nobody can tamper with them. The forward links point to versions that don't exist yet. They go in the mutable part and get filled in later.

Because every link exists in both directions, the Agent can check them against each other. If a forward link says "my next version is X," then X's backward link should point back. If it doesn't, something's wrong, and a regular integrity check finds it and repairs it.

A write happens in three steps:

  1. Append the new transaction to the chain.
  2. Update the forward links on the previous version and on neighboring rows, so they point to the new one.
  3. In the background, update the "latest" link on older versions.

That last step can lag, so an old version might point to a newer one that isn't the newest. When that happens, the Agent just follows the chain forward a few more hops. Writes stay fast, and reads cost a little more.

Rows or cells?

A blockchain only grows. You can't shrink it without forking it or rebuilding it, and both of those lose history. So the real design question is how much data you copy each time something changes. The patent gives two options.

Insert Optimized stores each row as one transaction. Adding a row is quick. The Agent finds the database, then the table, and appends the row to the end of its list. It can also check required fields before anything hits the chain. The downside is that changing one field copies the whole row.

Update Optimized stores each cell as its own transaction. If a customer changes their phone number, only the phone number gets a new transaction. Nothing else in the row is copied.

You can mix the two. A row can start out as one transaction and get split into cells later, either in the background or on its first update.

Deleting from a ledger that never forgets

This is how we handled the "right to be forgotten" problem.

Each transaction's data is encrypted with its own deletion key, which lives in the mutable part. Any authorized node can read the data by reading the transaction and using that key.

To delete something for good, the Agent scrambles the key or zeroes it out. The transaction stays on the chain, so every hash still checks out. But nobody can ever read the data inside again.

For extra protection, the key itself can be encrypted or split. Then only an Agent that holds a shared secret from outside the chain can read the data at all.

Asking about the past

Since nothing is ever overwritten, you can query the database as it was at any moment. The patent's example uses standard SQL temporal syntax:

SELECT * FROM EMPLOYEES FOR SYSTEM_TIME AS OF '2015-09-01 T10:00:00.7230011';

That returns the EMPLOYEES table exactly as it was on September 1, 2015, including rows that have been deleted since. The Agent follows the time links back to whatever was current at that moment.

So when the auditor comes asking, you don't have to say "trust us." You can show them the table as it was, and the chain shows nobody has touched it since.

A cache keeps all this fast. It remembers where frequently used objects live on the chain, and admins can cap it by size, by read count or by age.

Honestly, it's a toy

This is a patent, not a product. It's a design for how you could do this, and some of its tradeoffs matter.

Storage only grows. Every change adds data forever. Update Optimized helps, but a busy table will still pile up history.

The Agent has to be trusted. Everything goes through it. The chain makes tampering visible, but whoever runs the Agent still controls what gets written.

And it's slower than a normal database. Following links across a chain will never beat an index in Postgres.

The big vendors ended up in a similar place. Microsoft added ledger tables to Azure SQL and SQL Server, and Oracle added blockchain tables. Both keep SQL on the outside and add tamper-evident history underneath. If you need this in production today, start there.

Where I'd play with it

Still, I think the ideas are fun to try out at small scale. Here's where I'd start:

  • A bank hackathon demo. This was the original pitch. Point an existing SQL report at the Agent, then show an auditor every past version of an account and prove none of it was edited.
  • A shared ledger for people who don't fully trust each other. Think league standings, a group's shared expenses or a few small companies tracking shipments. Everyone writes SQL, and nobody can quietly rewrite history.
  • Change history for a config table. Run FOR SYSTEM_TIME AS OF to see exactly what a setting was when something broke, and who changed it.
  • A "right to be forgotten" demo. Store some personal data, delete it by scrambling the key, then show that the chain still validates and the data is gone.
  • Teaching blockchain to SQL people. Hashes, Merkle roots and append-only logs are easier to understand when you can poke at them with a SELECT.

You don't need a bank's scale for any of these, just some SQL and a reason to want proof.


The patent: US 11,836,130 B2, "Relational database blockchain accountability," assigned to Unisys Corporation. Inventors: Devon Andrew Beckett, James David Fletcher, Max Hirsch, Vidya Mudalagiri Venkatesha and Alex George. Filed October 10, 2019; granted December 5, 2023.