database-design

Guide database selection and schema design across PostgreSQL, Neon, Turso, and SQLite.

1|Updated Dec 21, 2024
One-click install
npx skills add https://github.com/SergeiGolos/wod-wiki --skill database-design-sergeigolos
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: database-design
Source: https://github.com/SergeiGolos/wod-wiki/tree/main/.agent/skills/database-design
Command: npx skills add https://github.com/SergeiGolos/wod-wiki --skill database-design-sergeigolos

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires pypdf, pdfplumber, pdf2image, and includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill guides users through making informed decisions about database selection, schema design, indexing, and optimization, preventing common pitfalls and ensuring efficient data management.

Core Features & Use Cases

  • Database & ORM Selection: Provides decision trees and comparisons for choosing the right database (PostgreSQL, Neon, Turso, SQLite) and ORM (Drizzle, Prisma, Kysely).
  • Schema Design Best Practices: Covers normalization, primary key selection, timestamps, and relationship types.
  • Performance Optimization: Offers guidance on indexing strategies, query optimization (N+1 problem), and safe migration practices.
  • Use Case: A developer needs to choose between PostgreSQL and Turso for a new edge application and wants to understand the trade-offs for schema design and indexing.

Quick Start

Guide me through selecting a database for an edge deployment scenario.

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, Turso, and SQLite for a new application?

Database selection depends on your deployment environment and scaling needs. This Skill provides decision trees comparing PostgreSQL, Neon, Turso, and SQLite, evaluating trade-offs for schema design and indexing to guide your choice.

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

The N+1 query problem occurs when an ORM executes individual queries for related records instead of batching them. This Skill provides query optimization techniques to resolve N+1 issues when using ORMs like Drizzle, Prisma, or Kysely.

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

Database schema design requires selecting primary keys, defining relationship types, and applying normalization rules. This Skill covers schema design best practices and indexing strategies to ensure efficient data retrieval and management.

What are the best practices for safe database migrations in a serverless environment?

Safe database migrations in serverless environments require careful execution to prevent downtime. This Skill outlines safe migration practices tailored for both traditional deployments and serverless architectures.

Does this database design guidance work for edge deployment scenarios?

Yes, this Skill supports edge deployment scenarios by providing specific selection criteria for edge-compatible databases like Turso. It helps evaluate schema design and indexing trade-offs relevant to edge applications.