BUILDING BLOCKS

Web2 -> Web3 concept mapping

From Database to Blockchain

A blockchain starts with a database. Here's how the transformation works:

1. DATABASE
Start with a MySQL database. It's your source of truth.
2. NODES
Add replication. Now you have two databases both claiming to be correct.
3. CONSENSUS
They can't trust each other. Need agreement on which writes are valid.
4. ECONOMICS
Making changes costs something. Spamming becomes expensive.
5. NO OPERATOR
Remove the operator. No single person controls the database.

A blockchain is just a database with trust removed and consensus added.

Web2Web3What Changes
S3Decentralized storageData across many nodes, content-addressed, blockchain-backed
AWS EC2Decentralized computeRent compute from a marketplace, not a corporation
OAuthKey-based identityYou prove identity with a key, not a password
RESTRPCDirect method calls to nodes instead of HTTP endpoints
DNSDecentralized namingControlled by your key, no central authority
Stored proceduresSmart contractsCode runs on a network, not a single server

Web3 Data & State

Web3 handles data differently depending on what you need. There are three main approaches:

TypeWhat It DoesGood For
BlockchainOrders transactions, everyone agrees on the orderMoney, ownership, agreements
One-time Payment StoragePay once, data stored indefinitelyArchives, permaweb, long-term preservation
Web3 DatabasesRegular DB operations, verifiable state, pay per writeApps, user data, flexible queries

Understanding the Shift

The transition from Web2 to Web3 is not merely technological—it's architectural. Each Web2 concept has a Web3 equivalent that shifts control from centralized entities to decentralized protocols.

This mapping serves as a mental model for developers transitioning their skills. The paradigms differ, but the principles of building resilient, user-centric systems remain.