惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

G
Google Developers Blog
博客园 - 聂微东
J
Java Code Geeks
Engineering at Meta
Engineering at Meta
Jina AI
Jina AI
D
Docker
B
Blog
S
SegmentFault 最新的问题
宝玉的分享
宝玉的分享
D
DataBreaches.Net
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
Y
Y Combinator Blog
N
Netflix TechBlog - Medium
月光博客
月光博客
F
Fortinet All Blogs
爱范儿
爱范儿
H
Help Net Security
腾讯CDC
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
WordPress大学
WordPress大学
The Cloudflare Blog
有赞技术团队
有赞技术团队
T
Tailwind CSS Blog
U
Unit 42

DEV Community

Authentication Security Deep Dive: From Brute Force to Salted Hashing (With Java Examples) Why AI Systems Don’t Fail — They Drift Spilling beans for how i learn for exam😁"Reinforcement Learning Cheat Sheet" I Replaced Chrome with Safari for AI Browser Automation. Here's What Broke (and What Finally Worked) How Python Borrows Other People's Work The $40 Architecture: Processing 1 Billion API Requests with 99.99% Uptime Vibe Coding: A Workflow Guide (From Zero to SaaS) Most webhook security guides protect the wrong side. The scary part is delivery. Headless CMS for TanStack Start: Build a Blog with Cosmic EU Age Verification App "Hacked in 2 Minutes" — What Actually Happened Comfy Cloud’s delete function does not actually remove files Running AI Models on GPU Cloud Servers: A Beginner Guide Event-driven media intelligence with AWS Step Functions and Bedrock I scored 500 AI prompts across 8 quality dimensions — here's what broke How to Call Google Gemini API from Next.js (Free Tier, No Backend Needed) The Portal Protocol: Reclaiming Human Connection in the Age of AI How to Fix Your Team's Scattered Knowledge Problem With a Self-Hosted Forum Intro to tc Cloud Functors: A Graph-First Mental Model for the Modern Cloud Designing Multi-Tenant Backends With Both Ownership and Team Access I Built a Neumorphic CSS Library with 77+ Components — Here's What I Learned PostgreSQL Performance Optimization: Why Connection Pooling Is Critical at Scale Cómo construí un SaaS multi-rubro para gestionar expensas en Argentina con FastAPI + Vue 3 🚀 I Built an Ethical Hacking Scanner Tool – Open Source Project I Replaced /usage and /context in Claude Code With a Single Statusline A Pythonic Way to Handle Emails (IMAP/SMTP) with Auto-Discovery and AI-Ready Design I Collected 8.9 Million Polymarket Price Points — Here's What I Found About How Markets Really Move EcoTrack AI — Carbon Footprint Tracker & Dashboard Everyone's Using AI. No One Agrees How. 5 self-hosted ebook managers worth trying in 2026 Building Your First AI Agent with LangChain: From Chatbot to Autonomous Assistant
Traditional Database vs Solana Accounts Comparison
Lymah · 2026-05-01 · via DEV Community
Cover image for Traditional Database vs Solana Accounts Comparison

Lymah

Concept Traditional Database Solana Accounts
Data Location Rows in tables on a centralized server Accounts on a distributed ledger across validators
Schema Defined by the database (SQL DDL, document schema) Defined by the owning program; stored as raw bytes in the account's data field
Access Control Application-level auth (SQL roles, app middleware) Enforced by the runtime: only the owning program can modify an account, and only with the required signer(s)
Cost of Storage Server/cloud hosting fees, pay for disk space Rent-exempt deposit proportional to data size; refundable when the account is closed
Identity/Keys Auto-increment IDs, UUIDs 32-byte public keys or Program Derived Addresses (PDAs)
Reads SQL queries, document lookups RPC calls (getAccountInfo, getProgramAccounts)
Writes INSERT/UPDATE via application code Transactions with instructions, signed by authorized keys
Code vs Data Application code and database are separate systems Both are accounts; programs (code) and data accounts coexist in the same model
Deletion DELETE query removes the row Close the account, lamports are returned to you
Visibility Private by default; you choose what to expose Public by default; anyone can read any account's data

Key Differences

1. Data Location

  • Database: Data lives on centralized servers you control or pay someone to host
  • Solana: Data is replicated across thousands of validator nodes worldwide

2. Access Control

  • Database: Enforced by application logic and database permissions
  • Solana: Enforced at the protocol level - a program cannot modify an account unless it owns it

3. Storage Costs

  • Database: Monthly hosting fees for infrastructure
  • Solana: Direct lamport deposit tied to each account - rent-exempt deposit for permanent storage

4. Querying

  • Database: JOIN operations, server-side filtering, complex queries
  • Solana: NO JOINS! Programs receive accounts as inputs. Off-chain queries via RPC, then client-side assembly

5. Transparency

  • Database: Private by default, access controlled
  • Solana: Public by default, anyone can read any account, anywhere, anytime

Web2 → Web3 Thinking

Web2 Web3 / Solana
Database row = unique record ID (auto-increment, UUID) Solana account = unique public key (32 bytes)
Authentication = username + password Authentication = secret key signature
Payment = monthly invoice Payment = transaction fees (in lamports)
Data privacy = encryption + access control Data privacy = cryptographic keys (account is public, but only signer can modify)
Backup = database replication Backup = globally distributed ledger
Admin changes data Program changes data (signed instruction)