data-modeling

Design relational and NoSQL database schemas with normalization, indexing, and schema evolution strategies.

1|Updated Mar 21, 2026
One-click install
npx skills add https://github.com/kalilurrahman/kr-claudiator-skills-original-prompts --skill data-modeling-kalilurrahman
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: data-modeling
Source: https://github.com/kalilurrahman/kr-claudiator-skills-original-prompts/tree/main/03-data-analytics/data-modeling
Command: npx skills add https://github.com/kalilurrahman/kr-claudiator-skills-original-prompts --skill data-modeling-kalilurrahman

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Choosing the wrong database schema leads to slow queries, data anomalies, and painful migrations. This Skill guides the design of data models grounded in access patterns, normalization rules, and evolution planning. ## Core Features & Use Cases - Relational Modeling: Produces ER diagrams and PostgreSQL DDL with proper normalization (1NF through 3NF) and foreign key constraints. - Denormalization & NoSQL Design: Applies selective denormalization, materialized views, and document/graph/time-series models for read-heavy workloads. - Schema Evolution: Plans backward-compatible migrations using nullable columns, backfills, and staged constraints. - Use Case: Designing an e-commerce backend — model Users, Orders, Products, and Order_Items in 3NF, add composite indexes for order lookups, and snapshot prices in order_items for historical accuracy. ## Quick Start Ask the assistant to design a data model for your domain, describing your entities, access patterns, and consistency requirements.

Frequently Asked Questions about data-modeling

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

FAQPage Schema
How do I design a database schema for a new application?

Start by identifying entities, relationships, and access patterns, then normalize to 3NF and add foreign keys. Denormalize selectively only for read-heavy queries, and index all foreign keys and frequent filter columns.

SQL vs NoSQL: which data model should I choose?

Choose relational models for complex queries, joins, and ACID transactions. Choose document models like MongoDB for flexible schemas and horizontal scaling, graph models for relationship-heavy queries, and time-series tables for metrics.

When should I denormalize a database schema?

Denormalize when read-heavy queries require expensive joins, such as embedding user names in orders. Accept the trade-off of slower writes and data redundancy, or use materialized views as an alternative.

How do I make database migrations backward compatible?

Add new columns as nullable with defaults, backfill existing rows, then apply NOT NULL constraints in a separate step. Never add a NOT NULL column without a default to a populated table.

Why is my composite index not being used by a query?

Composite indexes only cover queries filtering on the leftmost columns. An index on (user_id, status) covers queries on user_id alone but not on status alone, so column order must match query patterns.