using-relational-databases

Implement relational database layers with ORMs, migrations, and connection pooling across Python, TypeScript, Rust, and Go.

1|Updated Feb 24, 2026
One-click install
npx skills add https://github.com/masermediagroup-stack/maser-media --skill using-relational-databases-masermediagroup-stack
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: using-relational-databases
Source: https://github.com/masermediagroup-stack/maser-media/tree/main/.cursor/skills/community/ai-design-components/skills/using-relational-databases
Command: npx skills add https://github.com/masermediagroup-stack/maser-media --skill using-relational-databases-masermediagroup-stack

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve? Choosing and implementing a relational database stack involves many decisions—engine selection, ORM versus query builder, migration safety, and connection pooling—and mistakes lead to downtime, slow queries, or SQL injection vulnerabilities. This Skill provides decision trees, multi-language implementation patterns, and production-grade practices for PostgreSQL, MySQL, and SQLite. ## Core Features & Use Cases - Database and ORM Selection: Decision trees for PostgreSQL, MySQL, SQLite, and serverless options (Neon, PlanetScale, Turso), plus ORM comparisons across SQLAlchemy, Prisma, Drizzle, SQLx, SeaORM, GORM, and sqlc. - Safe Migration Patterns: Multi-phase deployment templates for adding, dropping, and renaming columns, plus concurrent index creation, with a generator script for common migration operations. - Connection Pooling Guidance: Pool sizing formulas and configuration examples for web APIs, serverless functions, and background workers, including pgBouncer setup. - Use Case: Building a FastAPI backend with user authentication and posts—use this Skill to select SQLModel, generate an initial schema migration, configure a 20-connection pool, and set up Alembic for schema evolution. ## Quick Start Ask the AI to set up a PostgreSQL database layer with an ORM, migrations, and connection pooling for your chosen language and framework.

Frequently Asked Questions about using-relational-databases

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

FAQPage Schema
How do I choose between Prisma and Drizzle for TypeScript?▼

Prisma offers the best developer experience with auto-generated types and built-in migrations, while Drizzle provides better performance with SQL-like syntax and zero abstraction overhead. Choose Prisma for rapid development and Drizzle when query control and performance matter most.

How do I safely drop a column in production PostgreSQL?▼

Use a multi-phase migration: first make the column nullable and deploy code that no longer uses it, then drop constraints, and finally drop the column after confirming no running code references it. Dropping directly breaks running application instances during deployment.

What connection pool size should I use for a web API?▼

Use 10-20 connections for a single-instance web API, following the formula (CPU cores × 2) + disk count. Serverless functions should use 1-2 connections with a pooler like pgBouncer, since many concurrent function instances can exhaust database connections.

Does SQLx validate queries at compile time in Rust?▼

Yes, SQLx validates SQL queries against your actual database schema at compile time using the query! and query_as! macros. This requires DATABASE_URL to be set during builds and catches schema mismatches before runtime.

When should I use PlanetScale versus Neon for serverless databases?▼

PlanetScale (MySQL/Vitess) fits when you need non-blocking schema changes and built-in read replicas, but lacks foreign key constraints. Neon (PostgreSQL) offers scale-to-zero compute, database branching, and full PostgreSQL features like JSONB and extensions.

Why does CREATE INDEX lock my table in production?▼

A plain CREATE INDEX blocks writes while the index builds. In PostgreSQL, use CREATE INDEX CONCURRENTLY to build without blocking writes, noting it cannot run inside a transaction; MySQL uses ALGORITHM=INPLACE, LOCK=NONE instead.