database-design

Guide database selection and schema design for PostgreSQL, Neon, and Turso.

Updated Dec 4, 2025
One-click install
npx skills add https://github.com/mjmmattoni98/recipe-hub --skill database-design-mjmmattoni98
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: database-design
Source: https://github.com/mjmmattoni98/recipe-hub/tree/main/.agents/skills/database-design
Command: npx skills add https://github.com/mjmmattoni98/recipe-hub --skill database-design-mjmmattoni98

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

This Skill provides guidance and best practices for designing and optimizing database schemas, helping users make informed decisions about database selection, ORM usage, and query performance.

Core Features & Use Cases

  • Database Selection: Offers a decision tree and comparison for choosing between PostgreSQL, Neon, Turso, and SQLite based on project requirements.
  • ORM Selection: Guides users in selecting the right Object-Relational Mapper (ORM) like Drizzle or Prisma.
  • Schema Design: Covers normalization, primary key strategies, timestamp conventions, and relationship types.
  • Optimization: Addresses query optimization techniques, including the N+1 problem and using EXPLAIN ANALYZE.
  • Migrations: Outlines safe migration strategies for zero-downtime deployments.
  • Use Case: A developer is starting a new project and needs to decide whether to use PostgreSQL with Prisma or a serverless option like Neon with Drizzle. This Skill helps them evaluate the trade-offs.

Quick Start

Guide me through selecting the best database for a new web application that needs to scale globally.

Frequently Asked Questions about database-design

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

FAQPage Schema
How do I choose the best database for a new web application that needs to scale globally?

Choosing the best database for a global web application involves evaluating relational and serverless options like PostgreSQL, Neon, and Turso against project requirements. Using a decision tree helps compare trade-offs to determine the right fit for scaling.

What is the best way to select an ORM like Prisma or Drizzle for my database schema?

Selecting an ORM like Prisma or Drizzle depends on your chosen database architecture and specific query patterns. Guiding principles help match ORM choices with serverless platforms like Neon or traditional PostgreSQL setups for optimal performance.

How do I design a database schema with proper normalization and indexing?

Designing a database schema with proper normalization involves applying best practices for primary key strategies, timestamp conventions, and defining relationship types. Correct indexing and normalization ensure data integrity and query efficiency.

How do I fix the N+1 query problem and optimize SQL performance?

Fixing the N+1 query problem and optimizing SQL performance requires applying specific query optimization techniques. Utilizing `EXPLAIN ANALYZE` helps identify bottlenecks and improve application response times.

How do I execute zero-downtime database migrations safely?

Executing zero-downtime database migrations safely requires following structured migration strategies. These strategies ensure schema changes are deployed without disrupting active application availability.

Can I use this database design guidance with Python3 environments?

You can use this database design guidance with Python3 environments, as it requires Python3. The provided scripts and references help implement schema design, ORM selection, and query optimization within Python projects.