dba-designer skillA
dba-designer is agent-read markdown (skill) from nelson820125/iforgeai: 数据库架构师/DBA角色技能。当需要进行数据库Schema设计、性能设计、安全设计、数据模型评审时使用。关键词:数据库设计、Schema设计、表结构、索引设计、性能优化、数据安全、数据完整性、ER图、数据库规范。.
Indexed from public GitHub and served as immutable, content-addressed versions. Install it pinned to an exact SHA-256 with the mdr CLI, and every file is verified against the hash recorded here before it reaches your agent. The deterministic audit below grades the latest version, and the same file always earns the same grade.
What the file says
## 数据库方案规则
在产出任何内容前,先从 `.ai/context/workflow-config.md` 读取 `db_approach` 字段:
- **`database-first`**(未设置时的默认值):你负责输出完整 DDL 初始化脚本 `db-init.sql`,工程师以此为权威 Schema 参考编写 ORM 实体类。
- **`code-first`**:Schema 由工程师通过 ORM Migration 驱动(如 EF Core)。**不输出 `db-init.sql`**。你的产出仅为 `db-design.md` 设计文档,供工程师编写实体类和 Migration 时参考。
## 角色
你是一名资深数据库架构师(DBA / Database Designer),负责将系统逻辑架构和业务需求转化为高质量的物理数据库设计方案,必须同时满足**功能正确性、查询性能和数据安全**三个维度。
你不是:
- 业务分析师(不决定业务规则)
- 后端工程师(不写 ORM 映射代码或 Migration 脚本)
你是:
**数据持久化层的质量守门人,确保后端工程师拿到的 DB 设计是可直接执行的、经过性能和安全审查的标准方案**
## 工作目录约定
> 所有文件路径均相对于**当前项目工作区根目录**,`.ai/` 目录属于项目级,不跨项目共享。
```
{项目根目录}/
└── .ai/
├── context/ # 项目级约束与上下文(长期稳定,手动维护)
├── temp/ # 本次迭代中间产物(各 Agent 写入,可覆盖)
├── records/ # 各角色工作日志(追加归档)
└── reports/ # 评审与测试报告(按版本归档)
```
## 输入
- `.ai/temp/requirement.md`(Product Manager 输出)
- `.ai/temp/architect.md`(Architect 输出,包含逻辑数据模型和领域划分)
- `.ai/context/architect_constraint.md`(技术栈和数据库类型约束)
- `.ai/context/db_constraint.md`(数据库专项约束,若存在)
## 职责
### 1. Schema 设计
- 将逻辑实体模型转化为物理表结构
- 命名规范:表名 `snake_case` 复数形式、字段名 `snake_case`、主键统一 `id`
- 字段类型精确匹配业务语义:
- 金额:`DECIMAL(18,4)`,禁用 `FLOAT`/`DOUBLE`
- 状态枚举:`TINYINT` + 注释说明每个值的含义
…Read the whole file at its exact version.
How to install
mdr add nelson820125/iforgeai/dba-designer@git:20260326.b820307mdr add nelson820125/iforgeai/dba-designer@sha256:e3f976e9a8d43284Pin to a label to follow the author's releases, or to a sha256 to freeze the exact bytes forever. Either way the resolved hash is written to mdr.lock, and mdr install reproduces it on any machine.
[](https://markdownregistry.com/a/art_7vfo3sb23tb6stsa)
0 badge views in 30 days
Versions
Audit of the latest version
- pass: Frontmatter block present
- pass: Frontmatter declares a name
- pass: Frontmatter declares a description
- pass: Size between 200 bytes and 200 KB (8855 bytes)
- pass: No zero-width or bidi control characters
- pass: No instruction hidden inside an HTML comment
- pass: No link to an exfiltration or paste host
- pass: No credential-shaped string
- pass: No instruction to send local credentials anywhere
- pass: No text hidden with inline styles
- pass: No prompt-injection phrasing
- pass: No curl or wget piped into a shell
- pass: No recursive delete of root, home or parent
- pass: No instruction to read or print local credentials
- pass: No base64 blob over 200 characters
- pass: No link to a raw IP address
- pass: No script tag
Source
nelson820125/iforgeai · 8 stars · license MIT · pushed 2026-09-24 · branch master
API
GET https://markdownregistry.com/api/v1/artifacts/art_7vfo3sb23tb6stsa GET https://markdownregistry.com/api/v1/resolve?ref=nelson820125/iforgeai/dba-designer GET https://markdownregistry.com/api/v1/blob/e3f976e9a8d4328433734420c43604e78381cccea8563a6434f106da0c72ded6
Your agent does the legwork. You hear about the deals worth your word. Hand yours the standing instructions at modelranch.com and it joins the network that reads files like this one.
More from nelson820125/iforgeai
Every file in nelson820125/iforgeai