D

Skill 详情

database-administrator

高级数据库管理员,精通PostgreSQL、MySQL、MongoDB和企业级数据库系统。专长于高可用性架构、性能调优、备份策略以及生产环境中的数据库安全。

来源平台:ModelScope
来源标识:ModelScope/404kidwiz/database-administrator-skill
源文件:原始说明
数据处理 热门 ModelScope 高 风险 下载 127访问 377Stars 51 ModelScopeGitHub Copilot
来源平台ModelScope
文档版本master
热度热门
排名信号下载 127
概述 安装 文档 下载

快速判断

高级数据库管理员,精通PostgreSQL、MySQL、MongoDB和企业级数据库系统。专长于高可用性架构、性能调优、备份策略以及生产环境中的数据库安全。

最后校验2026-03-13
来源平台ModelScope
安全提示
下载副本ZIP 可用

适合任务

  • 按 ModelScope 收录说明完成平台、开发或工作流任务。
  • 通过下载包离线保存 Skill 内容。
  • 结合下载量、访问量和喜欢数评估优先级。

输入与输出

输入:任务目标、上下文材料、平台信息、文件路径、约束条件或需要处理的内容。

输出:按 Skill 说明生成的文档、代码、检查结果、计划、建议或操作步骤。

示例任务

  • 使用 database-administrator 帮我完成当前任务,并先确认必要上下文。
  • 根据 database-administrator 的说明,列出操作步骤和风险检查点。

安装方式

  1. 下载本站提供的 Skill ZIP 并解压。
  2. 把解压后的 Skill 目录放入当前 AI 工具支持的 skills 目录。
  3. 如需在线查看原始内容,可打开 GitHub 的 SKILL.md

在线原始地址:modelscope-404kidwiz-database-administrator-skill/SKILL.md

风险边界

使用前请检查权限、外部依赖和要处理的数据类型。第三方平台数据、支付、部署、账号和密钥相关内容应先核对官方说明。

SKILL.md 文档介绍

Database Administrator

Purpose

Provides senior-level database administration expertise for production database systems including PostgreSQL, MySQL, MongoDB, and enterprise databases. Specializes in high availability architectures, performance tuning, backup strategies, disaster recovery, and database security for mission-critical environments.

When to Use

  • Setting up production databases with high availability and disaster recovery
  • Optimizing database performance (slow queries, indexing, configuration tuning)
  • Implementing backup and recovery strategies (PITR, cross-region backups)
  • Migrating databases (PostgreSQL, MySQL, MongoDB) to cloud or between versions
  • Hardening database security (encryption, access control, audit logging)
  • Troubleshooting database issues (locks, replication lag, corruption)
  • Designing database architectures for scalability and reliability

Quick Start

Invoke this skill when:

  • Setting up production databases with high availability and disaster recovery
  • Optimizing database performance (slow queries, indexing, configuration tuning)
  • Implementing backup and recovery strategies (PITR, cross-region backups)
  • Migrating databases (PostgreSQL, MySQL, MongoDB) to cloud or between versions
  • Hardening database security (encryption, access control, audit logging)
  • Troubleshooting database issues (locks, replication lag, corruption)

Do NOT invoke when:

  • Only application-level ORM queries need optimization (use backend-developer)
  • Data pipeline development (use data-engineer for ETL/ELT)
  • Data modeling and schema design for analytics (use data-engineer)
  • Database selection for new projects (use cloud-architect for strategy)
  • Simple SQL queries or data analysis (use data-analyst)

Decision Framework

Database Selection

| Use Case | Database | Why |

|----------|----------|-----|

| Transactional (OLTP) | PostgreSQL | ACID, extensions, JSON support |

| High-read web apps | MySQL/MariaDB | Fast reads, mature replication |

| Flexible schema | MongoDB | Document model, horizontal scale |

| Key-value cache | Redis | Sub-ms latency, data structures |

| Time-series data | TimescaleDB/InfluxDB | Optimized for time-based queries |

| Analytics (OLAP) | Snowflake/BigQuery | Columnar, massive scale |

High Availability Architecture

├─ Single Region HA?
│   ├─ Managed service → RDS Multi-AZ / Cloud SQL HA
│   │   Pros: Automatic failover, managed backups
│   │   Cost: 2x compute (standby instance)
│   │
│   └─ Self-managed → Patroni + etcd (PostgreSQL)
│       Pros: Full control, no vendor lock-in
│       Cost: Operational overhead
│
├─ Multi-Region HA?
│   ├─ Active-Passive → Cross-region read replicas
│   │   Pros: Simple, low cost
│   │   Cons: Manual failover, data lag
│   │
│   └─ Active-Active → CockroachDB / Spanner
│       Pros: True global distribution
│       Cons: Complexity, cost
│
└─ Horizontal Scaling?
    ├─ Read scaling → Read replicas
    ├─ Write scaling → Sharding (MongoDB, Vitess)
    └─ Both → Distributed SQL (CockroachDB, TiDB)

Backup Strategy Matrix

| RPO Requirement | Strategy | Implementation |

|-----------------|----------|----------------|

| < 1 minute | Synchronous replication | Patroni sync mode |

| < 5 minutes | Continuous WAL archiving | pg_basebackup + WAL-G |

| < 1 hour | Automated snapshots | RDS automated backups |

| < 24 hours | Daily backups | pg_dump + S3 |

Performance Tuning Priorities

1. Query optimization (biggest impact, lowest cost)

2. Indexing strategy (moderate effort, high impact)

3. Configuration tuning (one-time, moderate impact)

4. Hardware upgrades (high cost, last resort)

Quality Checklist

Production Readiness

  • [ ] High availability configured (multi-AZ or multi-region)
  • [ ] Automated backups enabled (daily + continuous WAL)
  • [ ] Backup restoration tested (monthly disaster recovery drill)
  • [ ] Connection pooling configured (PgBouncer/ProxySQL)
  • [ ] Monitoring and alerting active (slow queries, replication lag)

Performance

  • [ ] Indexes created for all query patterns
  • [ ] Table statistics up-to-date (autovacuum tuned)
  • [ ] Query plans reviewed (no full table scans on large tables)
  • [ ] Connection pooling optimized (min/max pool size)
  • [ ] Database configuration tuned (shared_buffers, work_mem)

Security

  • [ ] Encryption at rest enabled
  • [ ] Encryption in transit (SSL/TLS) enforced
  • [ ] Least privilege access (no superuser for applications)
  • [ ] Audit logging enabled (failed logins, DDL changes)
  • [ ] Regular security patching scheduled

Disaster Recovery

  • [ ] RTO/RPO documented and tested
  • [ ] Cross-region backups enabled
  • [ ] Failover procedure documented and tested
  • [ ] Data retention policy enforced
  • [ ] Point-in-time recovery validated

Additional Resources

  • Detailed Technical Reference: See [REFERENCE.md](REFERENCE.md)
  • Code Examples & Patterns: See [EXAMPLES.md](EXAMPLES.md)
建议反馈