What problem does it solve?
Designing reliable schemas, writing efficient queries, and operating production-grade MongoDB and PostgreSQL databases is complex and error-prone; this Skill streamlines schema design, migrations, indexing, query optimization, backups, and performance troubleshooting so teams can ship data-driven features faster and with fewer regressions.
Core Features & Use Cases
- Schema Design: OLTP and OLAP guidance, naming conventions, surrogate keys, SCD strategies, and fact/dimension modeling for analytics.
- Query & Pipeline Authoring: PostgreSQL SQL (joins, CTEs, window functions, EXPLAIN analysis) and MongoDB aggregation pipelines, lookups, and array handling.
- Migrations & Rollback: Generate, apply, and rollback migrations for both PostgreSQL and MongoDB with safe recording of applied migrations.
- Indexing & Performance: Recommend indexes, detect sequential scans, analyze pg_stat_statements, and advise on index/GIN/BRIN/GiST strategies and MongoDB index patterns.
- Backups & Restore: Create and verify backups, restore workflows, and retention/cleanup strategies for both databases.
- Administration: User/role management, replication (streaming/logical), WAL/PITR guidance, and psql/mongosh CLI usage.
- Use Case: Convert an ad-hoc reporting workload into a star-schema fact table, add the necessary indexes, and provide migration and ETL watermarks so dashboards run within SLA.
Quick Start
Use this skill to design a PostgreSQL OLTP schema for orders, propose indexes, and produce migration SQL plus a rollback plan.