# If You Know Databases, You Already Understand Web3

Canonical: https://schemasauce.com/blockchain-vs-database/

*Published: October 2026*

**TL;DR:** A blockchain is a database that no single company owns. Reads go through an RPC node, and every write is a signed, paid transaction. You give up SQL, deletes and free writes, and you get shared trust, public history, and key-based access that replaces logins. Keep your system of record in your own database and let the chain handle payments.

---

When I started ramping up on Solana, I kept translating everything back to databases, and that turned out to be the right instinct. Comparing the blockchain to a database is the fastest way for a web2 developer to understand what web3 work feels like day to day.

Here’s the mapping I wish I had on day one, plus the payments use cases that make sense to incorporate into your tech stack.

## A Blockchain Is a Database With No Admin

Under the hood, a Solana validator stores state in AccountsDB, which is essentially a giant key-value store. The key is an account address and the value is the account’s data. A database row becomes an account, a primary key becomes a public key, and your schema moves into program code.

The big shift is where that data lives. It’s not on your company’s server, and it’s not in one cloud vendor’s data center either. Instead of AWS owning your data, thousands of validators each keep a redundant copy, and consensus keeps them in agreement.

Nobody can quietly run an UPDATE on your table, including you. Most importantly, no single company owns the ledger, so you aren’t signing a cloud database contract for that state.

You still pick RPC providers, programs, and mints, and the validator set is very large but finite. Official guidance is to run more than one RPC provider. And unlike a cloud account, you aren’t stuck on the paying side forever, which I get to below.

Code and state are also separate. A Solana program (the smart contract) is read-only executable logic. It changes the state of other accounts but never itself. Think stored procedures that can’t touch their own source, writing to rows they own.

If you’re also sorting out where a blockchain fits next to the databases you already run, my post on [the difference between Fabric SQL Database, Azure SQL, and SQL Server](https://schemasauce.com/what-is-the-difference-between-fabric-sql-database-azure-sql-and-sql-server/) is a good companion for the traditional side of this comparison, where data storage can be provided as SaaS, PaaS, or on-prem.

Unlike a cloud database, anyone can start a validator without approval, and anyone can stake SOL. Validators earn inflation commission on the stake they attract. When they produce a block, they also earn half of each base fee and all priority fees.

Optional MEV tips exist off-protocol. Most app teams never do that, though I think they should know the option exists. They pay an RPC provider, which is closer to a billed API than to SaaS or PaaS hosting.

## Blockchain vs Database

|  | **Database (Postgres, SQL Server)** | **Blockchain (Solana)** |
| --- | --- | --- |
| Reads | Query your server directly. Free and fast. | Ask an RPC node. Free to the network, but rate-limited or billed by your provider. |
| Writes | INSERT or UPDATE over a connection. | A signed transaction, capped at 1,232 bytes, sent through an RPC node. |
| Cost | You pay for servers and storage. Writes are effectively free, and the bill grows as you do. | Every transaction pays a fee (a base fee of 5,000 lamports per signature, plus an optional priority fee). Storage needs a rent-exempt deposit. You can run a validator and earn protocol rewards, which can offset some costs. It isn’t a rebate or a guarantee, and it has its own hardware, fee, and ops bill. Rewards vary with stake, uptime, commission, and fee volume, and costs can exceed rewards. |
| Latency and finality | A commit returns in milliseconds, and it’s done. | Slots are 200 ms. A block can finalize in one voting round, with a target of about 150 ms. “Confirmed” and “finalized” now describe the same state. |
| Consistency | One primary decides. Strong consistency inside a transaction. | Validators agree through consensus. You pick a commitment level per request. |
| Schema and data model | Tables, columns, constraints. | Accounts holding raw bytes. The owning program decides what the bytes mean. |
| Auth | Usernames, passwords, roles, connection strings. | Private keys and wallets. Whoever signs is who you are. |
| Querying and indexing | SQL, joins, indexes on any column. | Lookup by address. Anything richer needs an indexer or a provider API. |
| Deletes and immutability | DELETE removes the row. | You can close an account and get its deposit back, but the transaction history stays forever. |

## Writes Cost Money, Storage Costs a Deposit

This is where blockchain veers off the traditional database and cloud infrastructure path. On Solana, the smallest unit of SOL is a lamport, one billionth of a SOL. Every transaction pays a base fee per signature, and you can add a priority fee to get scheduled ahead of others when the network is busy. Solana’s payments docs put a simple USDC transfer at roughly $0.001 to $0.005 in normal conditions.

Storage works like a security deposit. To create an account, you lock up a minimum SOL balance called the rent-exempt amount, and it scales with the data size. Close the account and the deposit comes back. Suddenly you care about bytes the way you never did with a cloud database.

Fortunately, the cost is coming down.

Account storage is a refundable deposit of about 5,080 lamports per byte, including 128 bytes of overhead. An empty account needs 650,240 lamports today, down from 890,880. SIMD-0437 has already cut that 27% in two live steps. Three more, aiming for a 90% cut to 696 lamports per byte, are scheduled for Agave 4.4 around November 2026.

## Validators Can Offset Your Infrastructure Costs

Cloud partners often start you with credits, a free tier, and later, an account team. As usage grows, the bill grows, even after volume discounts. You stay on the paying side of that relationship.

Solana adds a second option. If your app takes off, you can run a validator without anyone’s permission. You help secure the chain by voting on blocks and producing them. Validators vote on blocks and fork choice. Protocol changes go through public proposals and software releases, and some economic questions go to a separate stake-weighted vote.

You still pay for hardware and vote fees and need stake. After the mainnet switch, a seat depends on a small per-epoch fee and your stake rank among at most 2,000 validators.

Solana is public infrastructure, so contributor teams can take part in it instead of only renting someone else’s, and the Solana Foundation Delegation Program is an application path for Foundation delegation under published performance rules. It can add Foundation matching stake and, in the first year, tapering help with vote costs while a new validator earns outside stake, and the current amounts are on the program’s FAQ and can change. That delegation is conditional, revocable, and not a profit promise. Because the lasting work is running a well-operated validator on a permissionless network.

Validators earn inflation commission on the stake they attract. When they produce a block, they also earn half of each base fee and all priority fees. Optional MEV tips exist off-protocol.

Cloud and database vendors discount the bill for committed spend, startups, and partners. They don’t pay you rewards for helping run their platform. A validator is a different deal: you take on hardware and vote costs, and the protocol can pay you. That makes it feel almost like a rebate, though it isn’t one.

It’s not free money. Rewards vary with stake, uptime, commission, and fee volume, and costs can exceed rewards. A validator carries hardware, vote or admission fees, and ops time. Most app teams will stay with an RPC provider, and that’s a fine choice. The point is that the option exists, so it’s a win/win. Build on the chain, and if you succeed, you can also become part of what runs it.

## Keys and Wallets Replace Logins

There’s no users table with password hashes. Your identity is a key pair. The public key is your address and the private key signs your transactions. Web3 wallets like Phantom or Solflare hold the keys and ask the user to approve each signature.

Programs get identities too. A Program Derived Address (PDA) is an address derived from seeds plus the program’s ID, with no private key at all. Only the owning program can sign for it. That’s how a program owns state without anyone holding a password to it.

Ownership is enforced by the runtime. Anyone can read any account, but only the account’s owner program can change its data. It’s row-level security that you can’t misconfigure, because it’s baked into the protocol.

## What an RPC Is and Why It Matters for Development

RPC stands for Remote Procedure Call. You call a function on a remote server as if it were local. Blockchains use JSON-RPC, a lightweight protocol where you POST a JSON body with a method name and parameters and get JSON back. Ethereum, Solana, and most other chains work this way.

An RPC node is your gateway to the chain. On Solana, it runs the same software as a validator but holds no stake, so it can’t vote or produce blocks. Its job is to serve your app. In database terms, a Solana RPC call is your query, and the node is the connection endpoint and the query engine rolled into one.

When I was learning Solana, the RPC was the piece that made everything click. It’s the bridge between your app or wallet and the chain, and once I saw every balance check and every transaction as a JSON call to a node, web3 stopped feeling like the unknown.

RPC calls fall into three buckets:

- Reads: calls like getBalance or getAccountInfo return current state and cost nothing on-chain.
- Writes: sendTransaction submits a transaction you already signed. The node forwards it to the current block producer, and the network charges the fee.
- Subscriptions: WebSocket methods push account or transaction updates to you, like a database change feed.

Every read takes a commitment level. processed is the newest view but can still be rolled back. finalized means the block can’t be reversed. Picking one is the web3 version of choosing your isolation level, except a block can finalize in one voting round, targeting about 150 ms, so new code can read at finalized without making users wait. Confirmed and finalized are the same state.

## Public RPC vs Paid Providers

Solana runs free public endpoints for mainnet, devnet, and testnet. Think of these clusters like the environments in your DevOps pipeline. They’re rate-limited to 100 requests per 10 seconds per IP and 40 per 10 seconds for a single method. Go over, and you get a 429. The docs say plainly that these endpoints are not for production apps and have no SLA.

For anything real, you use a provider like Helius or Triton. You get dedicated capacity, better transaction sending, and extras like streaming and historical data. Plain RPC nodes only keep a couple of epochs of history, so providers fill that gap too.

When you shop, Solana’s production guide says to look at uptime guarantees, latency to your users, and features like transaction landing and priority fee APIs. It also suggests configuring more than one provider so a single outage doesn’t take you down.

Treat your RPC URL like an API key. Anyone who finds it in your frontend bundle can burn through your quota.

## Payments Use Cases That Map to a Database

Payments are where a chain earns its keep for a web2 team, because settlement, a public audit trail, and programmable money come built in. These four examples map cleanly onto things you already build with a database. In each one, the chain does one job and your database keeps the rest.

| **Use case** | **What the chain does** | **What stays in your database** | **Tradeoffs** |
| --- | --- | --- | --- |
| USDC payment links and invoices | Moves USDC from the payer’s wallet to yours and records the transfer. | Invoice records, customer details, amounts owed, status. | Ordinary USDC transfers are public. Token-2022 Confidential Balances can hide amounts, not who paid whom, on tokens that enabled the extension at creation, such as PYUSD. Circle USDC can’t use it. |
| Checkout and settlement | Settles the payment. | Cart, order, inventory, tax, fulfillment. | Confirmed and finalized are the same state, so there is no intermediate confirmation step. A block can finalize in one voting round, targeting about 150 ms, so the latency gap is small. |
| On-chain receipts and audit trail | Stores a memo, such as an invoice ID, with the transfer. Anyone can verify it later. | Full receipt, line items, personal data. | Memos are permanently recorded and publicly visible. Put an invoice ID on-chain. Keep names, emails, and line items in your database. |
| Ledger and reconciliation | Provides a public, ordered record of every transfer to match against. | Your books, matching rules, exception queue. | You still need an indexer or provider API, since the chain can’t answer SQL-style questions. |

The pattern is the same every time.

Keep the system of record in your database and let the chain handle the part where two parties who don’t trust each other need to agree on who paid whom. If you’re curious how a chain works as a shared network in the physical world, my posts on [DePIN](https://schemasauce.com/what-is-depin/) and [how Helium Mobile works](https://schemasauce.com/what-is-hnt-and-helium-mobile-and-how-can-you-get-a-free-phone-plan-powered-by-blockchain/) show two live examples.

## Is a Blockchain a Database?

Sort of. A blockchain is a shared ledger where every write is signed, paid for, and permanent. That makes it a lousy Postgres replacement. Slow writes, pricey storage, and zero JOINs will humble anyone who tries.

But that’s not the job. A blockchain shines when two parties need the same record and neither trusts the other to hold the master copy. Nobody owns the ledger, so nobody can quietly edit it. Every change is signed and traceable. Settlement lands in seconds on modern chains, not after a week of reconciliation spreadsheets. Smart contracts enforce the rules automatically, with no middleman skimming a fee.

So use both. Keep your system of record in your database, where it’s fast and cheap. Put the few records that need shared trust on chain: payments, ownership, and proofs.

Your database runs the business. The chain handles the records everyone has to agree on.
