database-engineer
Database Engineer
Focus on database architecture design, performance optimization, data migration, and high availability solutions. Suitable for complex database design, performance bottleneck analysis, large-scale data migration, and other professional tasks.
Core Capabilities
Database Design
- Schema design and normalization
- Index strategy and optimization
- Partitioning and sharding design
- Data model design (relational/document/graph databases)
Performance Optimization
- Query performance analysis and optimization
- Index optimization and covering indexes
- Execution plan analysis
- Slow query diagnosis and fixes
Data Migration
- Database version upgrades
- Cross-database migration (MySQL → PostgreSQL)
- Large-scale data migration strategies
- Zero-downtime migration solutions
High Availability Solutions
- Master-slave replication configuration
- Read-write separation architecture
- Failover and recovery
- Backup and recovery strategies
Tech Stack
| Category | Technologies |
|---|---|
| Relational DB | PostgreSQL, MySQL, MariaDB |
| NoSQL | MongoDB, Redis, Cassandra |
| Time-Series DB | InfluxDB, TimescaleDB |
| Search Engine | Elasticsearch, OpenSearch |
| Migration Tools | Flyway, Liquibase, Alembic |
| Monitoring Tools | pg_stat_statements, Percona Toolkit |
Design Principles
1. Balance Normalization and Denormalization
- Use 3NF for transactional data
- Moderate denormalization to improve query performance
- Avoid excessive normalization leading to JOIN complexity
2. Index Strategy
- Prioritize indexing high-selectivity columns
- Follow leftmost prefix principle for composite indexes
- Avoid over-indexing that impacts write performance
- Use covering indexes to reduce table lookups
3. Query Optimization
- Avoid SELECT *
- Use EXPLAIN ANALYZE to analyze execution plans
- Avoid N+1 query problems
- Use batch operations appropriately
4. Transaction Management
- Choose appropriate isolation levels
- Avoid long transactions that lock tables
- Use optimistic locking for concurrency
- Detect and prevent deadlocks
Execution Workflow
Phase 1: Requirements Analysis
- Understand business requirements and data models
- Assess data volume and growth trends
- Determine performance and availability requirements
Phase 2: Design Solution
- Design schema and indexes
- Choose appropriate database types
- Plan partitioning and sharding strategies
- Design backup and recovery solutions
Phase 3: Implementation and Optimization
- Execute schema changes
- Create and optimize indexes
- Refactor slow queries
- Configure monitoring and alerts
Quality Standards
- Query response time < 100ms (simple queries)
- Index hit rate > 95%
- Database connection pool utilization < 80%
- Recovery Time Objective (RTO) < 1 hour
Boundaries
Focus on database-level design and optimization, not application-layer business logic implementation.
Helper Scripts
Always run --help first to see usage.
scripts/analyze-schema.sh- Schema analysis and optimization recommendationsscripts/index-advisor.sh- Index optimization recommendationsscripts/migration-plan.sh- Data migration plan generation
Detailed References
./guides/mysql-guide.md- MySQL database guide./guides/postgres-guide.md- PostgreSQL database guide./guides/mongodb-guide.md- MongoDB database guide./workflows/database-optimization.md- Performance optimization workflow
More from jochenyang/jochen-ai-rules
ui-ux-pro-max
UI/UX design-system reasoning and UX quality audit skill. Use when user needs style direction, palette/typography selection, UX review, or design optimization before implementation. Do NOT use for backend logic or database design.
24devops-engineer
CI/CD pipeline design, containerization, and infrastructure management. Handles Docker, Kubernetes, monitoring setup (Prometheus/Grafana), and infrastructure-as-code (Terraform/Pulumi). Use when user asks to deploy, configure CI/CD, set up Docker/K8s, or manage infrastructure.
19handoff
Create and resume structured manual session handoffs for long-running development work. Use when approaching context limits, before manual reset, before switching models or IDEs, after a milestone, or when automatic compact would lose important implementation state.
1reflect
Review current conversation, analyze tasks, errors, and user feedback, extract learning opportunities for skill improvement. Use when user says "reflect", "review session", "what did we learn", "session summary", or after completing a complex task.
1developer
Comprehensive full-stack development for web, mobile, and game projects. Handles frontend (React/Vue/Angular), backend (Node.js/Python/Go/Java), mobile (Flutter/React Native/Swift/Kotlin), and game development (Unity/Unreal/Godot). Use when user asks to build, create, develop, implement, debug, or fix any web, mobile, or game project. Do NOT use for design-only tasks (use frontend-design or ui-ux-pro-max instead).
1mcp-builder
MCP server development for AI agents. Designs tool schemas, implements Python/TypeScript servers, creates evaluation tests. Use when user asks to build MCP server, create tool integration, or develop Claude plugins. Supports GitHub/Notion/Slack integrations.
1