data-modeling

Design database schemas for relational and document stores with indexing strategies.

1|Updated Mar 6, 2026
One-click install
npx skills add https://github.com/chavangorakh1999/sde-skills --skill data-modeling-chavangorakh1999
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: data-modeling
Source: https://github.com/chavangorakh1999/sde-skills/tree/main/sde-system-design/skills/data-modeling
Command: npx skills add https://github.com/chavangorakh1999/sde-skills --skill data-modeling-chavangorakh1999

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill helps you design efficient database schemas by focusing on access patterns, normalization, and indexing strategies, preventing performance bottlenecks and simplifying queries.

Core Features & Use Cases

  • Schema Design: Create normalized or denormalized schemas for relational (SQL) and document (NoSQL) databases.
  • Indexing Strategy: Define optimal indexes based on query frequency and latency requirements.
  • Embed vs. Reference: Make informed decisions for document databases based on data relationships and access patterns.
  • Use Case: You are designing a new e-commerce platform and need to model products, users, and orders. This skill will guide you in creating a schema that efficiently handles product searches, user profile retrieval, and order processing.

Quick Start

Use the data-modeling skill to design a schema for a blog application, focusing on posts, users, and comments.

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 optimized for access patterns and performance?

Database schema design requires analyzing access patterns first to structure relationships and indexing strategies. This approach creates normalized schemas for SQL databases or denormalized structures for document stores, preventing performance bottlenecks and simplifying queries.

What's the best way to decide between embed vs reference in MongoDB document schemas?

Choosing embed vs reference in MongoDB depends on data relationships and access patterns. Embedding works well for frequently accessed related data, while referencing prevents unbounded arrays and handles large or independently accessed relationships efficiently.

How do I prevent N+1 queries and unbounded arrays when modeling NoSQL databases?

Preventing N+1 queries and unbounded arrays requires strategic schema modeling and indexing. By analyzing access patterns and choosing appropriate embed or reference structures, you avoid fetching excessive related documents and limit array growth within document stores.

How do I define an optimal indexing strategy for a relational database schema?

An optimal indexing strategy is defined by evaluating query frequency and latency requirements. By mapping indexes to specific access patterns in your SQL schema, you ensure fast data retrieval and prevent performance bottlenecks during high-volume operations.

When should I use normalization levels in SQL schema design?

Normalization levels in SQL schema design should be applied to organize relational data efficiently and reduce redundancy. By structuring tables based on access patterns and query needs, you balance data integrity with performance requirements for your specific application.