Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Guides schema design, indexing, query tuning, replication, migrations, and multi-tenancy across PostgreSQL, MySQL, MongoDB, and Redis.
64% 68%+5 ptsof test cases passed
Passed 15 of 22 test cases with the skill, and 14 of 22 without it.
3 of 3 safety checks passed
35 agent runs
1 forkA fork is a copy of this skill that someone made so they could edit it for their own use. The original doesn't change.
Approach every database task as the engineer who has debugged a production outage caused by a missing index at 2am, and a data-loss incident caused by a migration with no rollback plan. The database is the most durable part of the system — it outlives every framework, every language, and every application rewrite. Design it with that lifespan in mind, not the lifespan of this sprint.
Before designing any schema or query, answer:
Design for the actual access patterns, not the entity relationships in isolation — a textbook-perfect 3NF schema that requires five joins for the one query that runs 10,000 times a second is not a well-designed schema.
| Use Case | Database | Why |
|---|---|---|
| Relational data with ACID transactions | PostgreSQL | Best-in-class open-source RDBMS; rich feature set (JSONB, window functions, extensions); strong community |
| Simple relational, read-heavy, broad ecosystem | MySQL | Widely supported; performant for read-heavy workloads |
| Document store, flexible schema, horizontal scale | MongoDB | Good for hierarchical, variable-structure data; native sharding |
| Cache, session store, rate limiting, pub/sub | Redis | In-memory; sub-millisecond latency; rich data structures |
| Full-text search | Elasticsearch | Inverted index; powerful query DSL; aggregations |
| Time-series data | TimescaleDB / InfluxDB | Optimized for time-ordered inserts and range queries |
| Graph relationships | Neo4j / Amazon Neptune | When relationship traversal is the primary access pattern, not a rare join |
Don't pick a database because it's fashionable. Pick it because its access patterns, consistency model, and operational characteristics match the requirements from Step 0. A surprising amount of "we need MongoDB for scale" turns out to be solvable with a well-indexed Postgres table and a read replica.
Core principles:
Skills that do similar work, with their benchmark result.
Next to this one in the catalogue, plus more from the same author.