Chuyển đến nội dung
Skillpedia
Cơ sở dữ liệu48k · #4331

database-design

Skill này làm gì

Công cụ này giúp bạn lên kế hoạch tổ chức và lưu trữ thông tin trong cơ sở dữ liệu. Nó hướng dẫn bạn chọn loại cơ sở dữ liệu phù hợp và sắp xếp bảng cùng dữ liệu một cách hiệu quả.

Khi nào nên dùng

  • ✓Khi bắt đầu một dự án mới và cần quyết định nơi lưu trữ dữ liệu.
  • ✓Khi bạn muốn cải thiện tốc độ truy cập dữ liệu.
  • ✓Khi lên kế hoạch cách các thông tin liên quan đến nhau trong cơ sở dữ liệu.

Liên kết skill

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

Sao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.

Cách dùng

Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.

Tin nhắn có sẵn để dán

Hãy dùng skill này để giúp tôi: https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/database-design/SKILL.md Đọc tệp SKILL.md tại liên kết đó và làm theo hướng dẫn cho việc của tôi.
Bạn muốn AI tự tìm những skill như thế này?Cài MCP Skillpedia miễn phí: chỉ một dòng, và AI sẽ tìm trong 15.000+ skill trước mỗi việc.Cài đặt trong 1 phút →

Ví dụ cách nhờ AI

“Tôi muốn tạo một ứng dụng danh sách việc cần làm. Tôi nên dùng cơ sở dữ liệu nào và nên tổ chức các bảng để lưu công việc và người dùng như thế nào?”

5 skill mới mỗi tuần. Đọc chỉ 1 phút.

Cách hoạt động

Công cụ phân tích nhu cầu của bạn và gợi ý các lựa chọn cơ sở dữ liệu tốt nhất cùng cách tổ chức thông tin. Nó xem xét các yếu tố như loại dữ liệu, khối lượng dự kiến và cách bạn sẽ truy cập dữ liệu.

Nội dung kỹ thuật (SKILL.md gốc)

Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.

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.
Câu hỏi thường gặp

Cơ sở dữ liệu là gì?

Đó là nơi có tổ chức để lưu trữ thông tin, giống như một tủ có ngăn kéo và thư mục.

Schema của cơ sở dữ liệu là gì?

Đó là bản thiết kế cho cách thông tin được tổ chức trong các bảng, xác định dữ liệu nào nằm ở đâu và chúng liên kết với nhau thế nào.

Vì sao tổ chức dữ liệu lại quan trọng?

Tổ chức tốt giúp truy cập dữ liệu nhanh hơn và ngăn ngừa lỗi, làm ứng dụng của bạn hiệu quả hơn.

Chi tiết

Mô tả gốc của tác giả

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

repo: sickn33/agentic-awesome-skills

Độ phổ biến

Sao GitHub
48k
Vị trí xếp hạng
#4331
Giấy phép
MIT
Cập nhật
15/10/2026

Skill này có hữu ích không?

0

Đăng nhập để bình chọn.

Bình luận

  • …

Thêm skill từ kho mã này

Skill tương tự