Lab 10: CockroachDB — NewSQL
🎯 Objective
📚 Background
CockroachDB Architecture
SQL Layer (PostgreSQL-compatible)
↓
Transaction Layer (MVCC, Serializable)
↓
Distribution Layer (ranges, 512MB chunks)
↓
Replication Layer (Raft consensus per range)
↓
Storage Layer (Pebble LSM, RocksDB-based)Why CockroachDB?
Feature
PostgreSQL
CockroachDB
Step 1: Start CockroachDB (Single Node)
Step 2: Create Schema (PostgreSQL-compatible SQL)
Step 3: SHOW RANGES — View Data Distribution
Step 4: EXPLAIN — Distributed Query Plan
Step 5: Transactions — Serializable Isolation
Step 6: Zone Configurations (Geo-Distribution Concepts)
Step 7: SHOW JOBS & Schema Changes
Step 8: Capstone — CockroachDB vs PostgreSQL Decision
Summary
Concept
Key Takeaway
Last updated
