database-design

Design Serverpod database schemas in protocol YAML with PostgreSQL.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/coco-de/skills --skill database-design-coco-de
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: database-design
Source: https://github.com/coco-de/skills/tree/main/plugins/cc-uiux-backend/skills/database-design
Command: npx skills add https://github.com/coco-de/skills --skill database-design-coco-de

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill streamlines the process of designing robust and efficient database schemas for Serverpod applications, ensuring proper table structures, relationships, and migration strategies.

Core Features & Use Cases

  • Model Definition: Define database tables and fields with appropriate types and constraints in Serverpod's protocol YAML.
  • Relationship Management: Establish 1:1, 1:N, and N:M relationships between tables using Serverpod's relation keywords.
  • Migration Handling: Generate and manage database migrations to evolve your schema safely.
  • Query Optimization: Implement efficient data access patterns using Serverpod's type-safe query builder.
  • Use Case: When building a new feature for an e-commerce app that requires a new products table with a many-to-one relationship to a categories table, use this skill to define both models, set up the foreign key, and generate the initial migration.

Quick Start

Design a Serverpod database schema for a blog with posts and comments, ensuring posts can have multiple comments.

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 Serverpod using PostgreSQL?▼

Serverpod database schema design involves defining models, tables, fields, and relationships within Serverpod's protocol YAML format to structure your PostgreSQL database efficiently.

How do I set up table relationships like many-to-one in Serverpod?▼

You establish 1:1, 1:N, and N:M relationships in Serverpod database schemas by using the framework's specific relation keywords within the protocol YAML definition.

How do I manage database migrations when evolving a Serverpod schema?▼

Managing database migrations in Serverpod involves generating and applying migration files to safely evolve your schema while maintaining data integrity during updates.

Can I optimize query patterns using Serverpod's type-safe query builder?▼

Yes, you can implement efficient data access patterns by leveraging Serverpod's type-safe query builder to optimize how your application retrieves data from the database.

What is the best way to define database tables and fields in Serverpod?▼

The best way to define database tables and fields in Serverpod is through the protocol YAML format, applying appropriate types and constraints directly to the model definitions.