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.
| Web2 | Web3 | What Changes |
|---|---|---|
| S3 | Decentralized storage | Data across many nodes, content-addressed, blockchain-backed |
| AWS EC2 | Decentralized compute | Rent compute from a marketplace, not a corporation |
| OAuth | Key-based identity | You prove identity with a key, not a password |
| REST | RPC | Direct method calls to nodes instead of HTTP endpoints |
| DNS | Decentralized naming | Controlled by your key, no central authority |
| Stored procedures | Smart contracts | Code 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:
| Type | What It Does | Good For |
|---|---|---|
| Blockchain | Orders transactions, everyone agrees on the order | Money, ownership, agreements |
| One-time Payment Storage | Pay once, data stored indefinitely | Archives, permaweb, long-term preservation |
| Web3 Databases | Regular DB operations, verifiable state, pay per write | Apps, 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.