database-design

Guide database schema modeling, indexing, ORM selection, and query optimization.

1|Updated Jun 23, 2026
One-click install
npx skills add https://github.com/phuonghx/aim-cli --skill database-design-phuonghx
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: database-design
Source: https://github.com/phuonghx/aim-cli/tree/main/aim/templates/aim-agents/skills/database-design
Command: npx skills add https://github.com/phuonghx/aim-cli --skill database-design-phuonghx

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill unit provides comprehensive guidance for database design decisions, covering schema modeling, indexing strategy, ORM and database engine selection, query tuning, and migration planning, helping users make informed choices for their application backends.

Core Features & Use Cases

  • Schema Modeling: Best practices for normalizing and designing database schemas.
  • Indexing Strategy: Guidelines for selecting and ordering indexes to optimize query performance.
  • ORM Selection: Recommendations for choosing the right ORM or query layer based on project needs.
  • Database Engine Selection: Comparison of various database engines like PostgreSQL, Neon, Turso, SQLite, and more.
  • Query Optimization: Techniques for optimizing queries to avoid common pitfalls like the N+1 problem.
  • Migrations: Strategies for safely evolving a live schema with migrations.
  • Use Case: When developing a new application backend, this Skill unit can help you choose the right database, design your schema, and optimize your queries for the best performance and maintainability.

Quick Start

Run the schema validator script to check your project's database schema for common issues.

Frequently Asked Questions about database-design

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I design a database schema for a new application backend?

To design a database schema, normalize your data structures and apply schema modeling best practices. This Skill provides guidance on normalizing schemas, selecting indexes, and choosing ORMs to optimize backend performance and maintainability.

What's the best way to choose between PostgreSQL, SQLite, and Turso for a database engine?

Choosing a database engine requires comparing options like PostgreSQL, Neon, Turso, and SQLite based on your project needs. This Skill offers database engine selection comparisons to help you make informed choices for your specific application backend.

How do I fix the N+1 query problem when using an ORM?

Fixing the N+1 query problem involves applying query optimization techniques to avoid common pitfalls. This Skill provides query tuning guidance to help you resolve N+1 issues and enhance overall database performance.

How do I create an indexing strategy for optimal query performance?

Creating an indexing strategy involves selecting and ordering indexes based on query patterns. This Skill offers indexing strategy guidelines to help you optimize query performance for your application backend.

How do I safely evolve a live database schema with migrations?

Safely evolving a live database schema requires migration strategies to update structures without downtime. This Skill provides migration planning guidance to help you execute schema changes securely on a live application backend.

Do I need to know database design principles to use this ORM selection guidance?

Yes, utilizing ORM selection guidance requires prerequisite knowledge of database design principles and familiarity with common database engines. This Skill provides advanced guidance tailored for users with existing database design knowledge.