跳到正文
Skillpedia
数据库48k · #4331

database-design

它能做什么

这个工具可以帮你规划如何在数据库中组织和存储信息。它会引导你选择最合适的数据库类型,并高效地设计数据表和数据结构。

适用场景

  • ✓开始一个新项目、需要决定数据存放位置时。
  • ✓想提高数据访问速度时。
  • ✓规划数据库内部信息之间的关联方式时。

技能链接

https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/database-design/SKILL.md

复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。

使用方法

最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/database-design/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 AI

“我想做一个待办事项应用。应该用什么数据库?怎样组织数据表来存储任务和用户?”

每周 5 个新技能,1 分钟读完。

工作原理

工具会分析你的需求,推荐最合适的数据库方案以及信息的组织方式。它会综合考虑数据类型、预计数据量,以及你将如何访问这些数据等因素。

技术内容(原始 SKILL.md)

作者在 GitHub 上的英文原文。

Database Design

Learn to THINK, not copy SQL patterns.

🎯 Selective Reading Rule

Read ONLY files relevant to the request! Check the content map, find what you need.

File Description When to Read
database-selection.md PostgreSQL vs Neon vs Turso vs SQLite Choosing database
orm-selection.md Drizzle vs Prisma vs Kysely Choosing ORM
schema-design.md Normalization, PKs, relationships Designing schema
indexing.md Index types, composite indexes Performance tuning
optimization.md N+1, EXPLAIN ANALYZE Query optimization
migrations.md Safe migrations, serverless DBs Schema changes

⚠️ Core Principle

  • ASK user for database preferences when unclear
  • Choose database/ORM based on CONTEXT
  • Don't default to PostgreSQL for everything

Decision Checklist

Before designing schema:

  • Asked user about database preference?
  • Chosen database for THIS context?
  • Considered deployment environment?
  • Planned index strategy?
  • Defined relationship types?

Anti-Patterns

❌ Default to PostgreSQL for simple apps (SQLite may suffice) ❌ Skip indexing ❌ Use SELECT * in production ❌ Store JSON when structured data is better ❌ Ignore N+1 queries

When to Use

Use when selecting a database model, reviewing schema relationships and indexes, or assessing a proposed schema with the bundled advisory tools.

Schema helper

scripts/schema_validator.py is a read-only heuristic inventory, not a Prisma or Drizzle parser. Missing schemas, unsupported formats and heuristic-only results return nonzero with passed: false and analysis_complete: false. Use the project-local ORM validator for syntax and type checks; review migration and constraint semantics separately.

Limitations

  • Use this skill only when the task clearly matches the scope described above.
  • Do not treat the output as a substitute for environment-specific validation, testing, or expert review.
  • Stop and ask for clarification if required inputs, permissions, safety boundaries, or success criteria are missing.
常见问题

什么是“数据库”?

数据库是一个有组织地存放信息的地方,就像一个带抽屉和文件夹的柜子。

什么是数据库 schema?

它是信息在数据表中如何组织的蓝图,定义了每张表存放什么数据,以及表与表之间如何关联。

为什么数据组织很重要?

良好的组织方式可以让数据访问更快,也能减少错误,让你的应用运行得更高效。

详情

作者的原始描述

Database design principles and decision-making. Schema design, indexing strategy, ORM selection, serverless databases.

repo: sickn33/agentic-awesome-skills

热度

GitHub 星标
48k
排名
#4331
许可证
MIT
更新时间
2026/10/15

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能