Databases
9 cheatsheets covering sql, database, Query, db, mysql and more
Databases each have their own patterns for querying, indexing, backup and recovery. Commands here are grouped by engine — MySQL, Redis, PostgreSQL and more — for daily ops and emergency restore. Before touching production data, confirm you have a backup and are inside a transaction; don’t let one command become an incident.
SQL Cheatsheet - Common Query Syntax & Examples
For developers who write SQL that must be both correct and fast, covering the specifics of SELECT, JOIN, aggregation and GROUP BY traps, subqueries, window functions (ROW_NUMBER/RANK/LAG), NULL semantics, transactions, and DDL — each with a locally runnable example showing the expected behavior.
MySQL Cheatsheet - MySQL Command Reference
A MySQL command handbook for DBAs, backends, and data analysts, covering database & table management, CRUD, index optimization and slow-query localization with EXPLAIN, user privileges, logical backup & recovery, and replication — highlighting operations that can lock tables or stall replication.
PostgreSQL Cheatsheet - PostgreSQL Command Reference
A PostgreSQL command handbook for backend engineers, DBAs, and data analysts, covering connection & role management, database & table operations, EXPLAIN analysis, lock & transaction troubleshooting, pg_dump/pg_restore backup & recovery, and streaming replication, with paths for locating lock waits and table bloat.
Redis Cheatsheet - Redis Command Reference
A Redis command handbook for the cache/backend and its operators, covering string and per-data-structure operations, key space and TTL management, RDB/AOF persistence trade-offs, memory and big-key inspection, slow query monitoring, cluster & replication, and practical debugging of hot keys, big keys, and cache puncturing/cascading.
MongoDB Cheatsheet - MongoDB Command Reference
A MongoDB reference for backend engineers, covering database & collection management, document CRUD, query operators, index strategies that keep queries off full collection scans, the aggregation pipeline, and replica-set vs sharded-cluster responsibilities.
Neo4j Cypher Cheatsheet - Neo4j Graph Database Command Reference
A Neo4j Cypher reference for working with graph data where relationships matter more than rows, covering node & relationship creation, pattern matching, updates & deletes, aggregation and ordering, constraints & indexes, and traversal-style graph queries.
SQL JOIN Cheatsheet - SQL JOIN Query Reference
A SQL JOIN reference for writing multi-table queries correctly, covering INNER, LEFT/RIGHT/FULL OUTER, CROSS, self-joins, USING/natural joins, and when a correlated subquery with EXISTS beats a JOIN — plus the row-duplication pitfall of joins on one-to-many tables.
Knex.js Cheatsheet - Knex SQL Query Builder Reference
A Knex.js query-builder reference for Node.js developers who want type-safe, database-agnostic SQL, covering CRUD, joins, aggregation & grouping, transactions with rollback, schema building, raw queries, and debug() to inspect the generated SQL.
SQLite Cheatsheet - SQLite Database Command Reference
A reference for developers who need a zero-config embedded database in a single portable file, covering creation & connection, table operations, CRUD, indexes & constraints, transactions, CSV import/export, and the sqlite3 CLI — plus the WAL-mode and concurrent-write-lock gotchas.