database-design

Guide relational and serverless database selection, schema normalization, indexing, and ORM choices.

Updated Jan 31, 2026
One-click install
npx skills add https://github.com/tuyenht/Antigravity-Core --skill database-design-tuyenht
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: database-design
Source: https://github.com/tuyenht/Antigravity-Core/tree/main/.agent/skills/database-design
Command: npx skills add https://github.com/tuyenht/Antigravity-Core --skill database-design-tuyenht

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

This Skill provides guidance on making informed decisions about database selection, schema design, indexing strategies, and ORM choices to build robust and performant applications.

Core Features & Use Cases

  • Database Selection: Understand the trade-offs between different database systems like PostgreSQL, Neon, Turso, and SQLite based on project requirements.
  • Schema Design: Learn principles of normalization, primary key selection, and relationship modeling.
  • Indexing & Optimization: Discover how to effectively use indexes and optimize queries to prevent performance bottlenecks like the N+1 problem.
  • ORM Choice: Get recommendations for ORMs such as Drizzle, Prisma, and Kysely based on development experience and deployment needs.
  • Use Case: When starting a new web application, use this Skill to decide whether to use PostgreSQL with Prisma for its rich features and developer experience, or Drizzle with Turso for an edge-optimized, serverless backend.

Quick Start

Use the database-design skill to understand the differences between PostgreSQL and SQLite for a new project.

Frequently Asked Questions about database-design

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

FAQPage Schema
How do I choose between PostgreSQL and SQLite for a new web application?

Database selection depends on your project requirements, weighing PostgreSQL's rich features against SQLite or serverless options like Turso for edge-optimized backends. Consider deployment needs and developer experience when evaluating relational and serverless databases to ensure optimal performance.

What is the N+1 query problem and how do I fix it with indexing?

The N+1 query problem causes performance bottlenecks by executing individual queries for related records. You fix it by applying proper indexing techniques and optimizing queries through relationship modeling, ensuring efficient data retrieval and preventing performance degradation in your application.

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

Database schema design requires applying normalization principles, selecting appropriate primary key strategies, and accurately modeling relationships between entities. This structured approach ensures data integrity and establishes a robust foundation for querying and application scaling.

Prisma vs Drizzle vs Kysely: which ORM should I choose?

ORM selection depends on your development experience and deployment context, comparing Prisma's rich features and developer experience against Drizzle or Kysely for edge-optimized, serverless backends. Evaluate project context to determine the best fit for your stack.

Can I use Drizzle with Turso for an edge-optimized serverless backend?

Yes, you can use Drizzle with Turso to build an edge-optimized, serverless backend. This combination suits projects requiring distributed data access and low latency, offering a tailored alternative to traditional PostgreSQL setups for specific deployment needs.

When should I not use database normalization in schema design?

Database normalization may not suit schema design when read performance is critical and query complexity must be minimized, as it introduces joins. In such cases, strategic denormalization alongside proper indexing can optimize data retrieval for high-performance applications.