Database Expert

Design database schemas and optimize SQL queries with execution plans.

Updated Jan 17, 2026
One-click install
npx skills add https://github.com/CarGDev/codetyper.cli --skill database-expert-cargdev
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: Database Expert
Source: https://github.com/CarGDev/codetyper.cli/tree/main/src/skills/database
Command: npx skills add https://github.com/CarGDev/codetyper.cli --skill database-expert-cargdev

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill addresses the complexities of database management, from initial design and schema creation to performance optimization and data integrity.

Core Features & Use Cases

  • Schema Design: Create normalized and performant database schemas.
  • Query Optimization: Improve the speed and efficiency of SQL queries.
  • Migrations: Implement safe and reversible database schema changes.
  • ORM Integration: Apply best practices when using Object-Relational Mappers.
  • Use Case: Refactor a slow-performing SQL query by analyzing its execution plan and applying appropriate indexes and query restructuring.

Quick Start

Design a PostgreSQL schema for a blog with tables for users, posts, and comments.

Frequently Asked Questions about Database Expert

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

FAQPage Schema
How do I optimize slow SQL queries using execution plans?

To optimize slow SQL queries, analyze the execution plan using EXPLAIN ANALYZE to identify bottlenecks, then apply appropriate indexes and restructure the query for better performance.

What is the best way to design a normalized database schema?

The best way to design a normalized database schema is to adhere to normalization principles, ensuring data integrity while creating tables that are both correct and performant for relational and NoSQL databases.

How do I implement safe and reversible database migrations?

To implement safe and reversible database migrations, apply robust migration strategies that allow you to roll back schema changes without losing data integrity or breaking existing application logic.

Can I use ORM patterns with both relational and NoSQL databases?

Yes, you can use ORM patterns with relational and NoSQL databases by applying best practices for Object-Relational Mappers to ensure correct data modeling and maintainable query execution.

When do I need to refactor a database schema for performance?

You need to refactor a database schema for performance when slow query execution persists, requiring analysis of execution plans and restructuring of schemas to maintain optimal data retrieval speeds.