sql-schema-modeling

Design and review relational database schemas with normalization and indexing strategies.

9|Updated Feb 26, 2026
One-click install
npx skills add https://github.com/diegoscarabelli/system2 --skill sql-schema-modeling
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: sql-schema-modeling
Source: https://github.com/diegoscarabelli/system2/tree/main/src/server/agents/skills/sql-schema-modeling
Command: npx skills add https://github.com/diegoscarabelli/system2 --skill sql-schema-modeling

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill addresses the complexity of designing efficient database schemas, helping users navigate trade-offs between normalization, performance, and maintainability in relational databases.

Core Features & Use Cases

  • Schema Design: Provides expert guidance on normalization (1NF-3NF), dimensional modeling (Star/Snowflake), and SCD (Slowly Changing Dimension) patterns.
  • Performance Optimization: Offers best practices for indexing, partitioning, and materialization strategies to ensure high-performance query execution.
  • Use Case: Use this skill when you need to decide whether to use a JSONB column versus a relational table for a new feature, or when you need to design a fact table for a new analytics dashboard.

Quick Start

Use the sql-schema-modeling skill to review my proposed table structure for a new customer orders system and suggest improvements for normalization and indexing.

Frequently Asked Questions about sql-schema-modeling

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

FAQPage Schema
How do I design a relational database schema for both OLTP and OLAP systems?

Design relational database schemas by applying normalization principles for OLTP and dimensional modeling techniques like Star or Snowflake schemas for OLAP. This ensures transactional integrity while optimizing analytical query performance across different system architectures.

What is the best way to model Slowly Changing Dimensions in a data warehouse?

Model Slowly Changing Dimensions using established SCD patterns within your dimensional modeling process. This approach tracks historical changes in attribute values over time, ensuring accurate historical reporting and analytics within your fact and dimension tables.

When should I use a JSONB column versus a relational table in PostgreSQL?

Use a JSONB column versus a relational table by evaluating trade-offs between schema flexibility and query performance. JSONB suits semi-structured, evolving data features, while strict relational tables enforce constraints and ensure robust normalization for highly connected data.

How do I optimize database schema performance with indexing and partitioning?

Optimize database schema performance by applying performance-oriented indexing strategies, table partitioning, and materialization patterns. These techniques reduce query execution times and manage large datasets efficiently across your relational database structures.

How do I enforce data integrity when designing a database schema?

Enforce database schema integrity through proper constraint enforcement and careful surrogate key selection. This validates relationships and prevents anomalous data entry, ensuring the relational model remains robust, scalable, and maintainable over time.

Can I review my existing table structure for normalization and indexing improvements?

Review existing table structures to suggest improvements for normalization and indexing. The analysis evaluates your schema against standard forms and performance strategies, providing actionable recommendations to refine constraints and optimize query execution.