database-management

Provides guidance on designing schemas and managing databases for MySQL and PostgreSQL.

33|5|Updated Jan 14, 2026
One-click install
npx skills add https://github.com/Sir-chawakorn/power-ranger-toolkit --skill database-management-sir-chawakorn
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: database-management
Source: https://github.com/Sir-chawakorn/power-ranger-toolkit/tree/main/src/skills/database-management
Command: npx skills add https://github.com/Sir-chawakorn/power-ranger-toolkit --skill database-management-sir-chawakorn

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill streamlines database operations by providing guidance on schema design, efficient migrations, query optimization, and best practices for Object-Relational Mappers (ORMs).

Core Features & Use Cases

  • Schema Design: Learn about normalization levels and see examples of one-to-many and many-to-many relationships.
  • Migrations: Get commands for managing database schema changes using tools like Prisma and Drizzle.
  • Query Optimization: Understand indexing strategies and how to avoid common performance pitfalls like the N+1 problem.
  • ORM Best Practices: Follow guidelines for transactions, connection pooling, and audit fields.
  • Backup & Recovery: Access basic commands for backing up and restoring PostgreSQL and MySQL databases.
  • Use Case: When designing a new application, use this Skill to ensure your database schema is normalized and efficient, and to set up a reliable migration process.

Quick Start

Use the database-management skill to generate a migration file for adding a new users table using Prisma.

Frequently Asked Questions about database-management

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

FAQPage Schema
How do I design a normalized database schema with one-to-many and many-to-many relationships?

Database schema design uses normalization levels to structure one-to-many and many-to-many relationships efficiently. This approach minimizes data redundancy and ensures relational integrity by guiding table partitioning and foreign key placement across your application data.

How do I generate a database migration file for adding a new table using Prisma or Drizzle?

Database migration files for adding new tables are generated using migration tools like Prisma and Drizzle. You execute specific CLI commands to capture schema changes, creating versioned migration files that update your database structure predictably.

What is the N+1 query problem and how do I avoid it with ORM best practices?

The N+1 query problem occurs when an ORM executes individual queries for related records instead of a single joined query. You avoid it by applying ORM best practices like eager loading relations and utilizing proper connection pooling to optimize query performance.

What indexing strategies should I use for SQL query optimization in PostgreSQL and MySQL?

SQL query optimization in PostgreSQL and MySQL relies on indexing strategies to accelerate data retrieval. By applying targeted indexes on frequently filtered columns, you drastically reduce table scan overhead and improve transaction execution speed.

How do I back up and restore a PostgreSQL or MySQL database?

Backing up and restoring PostgreSQL and MySQL databases requires executing specific terminal commands. These commands create full logical or physical dumps of your database state, allowing rapid recovery and data migration across different server environments.

Does this database management guidance cover transaction management and audit fields?

Yes, database management guidance covers transaction management and audit fields within its ORM best practices. It provides rules for maintaining data consistency during concurrent operations and tracking row modifications through standardized audit columns.