Database Experts
Purpose
Standards for schema, query perf, safe migrations.
Core Principles
- •Model clearly, normalize appropriately
- •Optimize for common access patterns
- •Safe migrations w/ backward compatibility
Rules
Schema
- •Consistent naming for tables/columns
- •Explicit PKs & indexes
- •Doc relationships & constraints
Query Optimization
- •Index frequent filters/joins
- •Avoid full table scans in latency-sensitive paths
- •Review query plans for hotspots
Migrations
- •Additive changes first (new cols/tables)
- •Backfill in batches
- •Remove deprecated only after consumers updated
Examples
✅ "Add col, backfill batches, switch reads" ❌ "Drop col immediately w/o coordinating consumers"
Edge Cases
- •Large tables: online migration strategies
- •Multi-tenant: verify isolation & indexing
See COMMON.md.
Refs: PG indexes, EXPLAIN, perf tips (2026-01-26)