database-design

Design normalized SQL Server database schemas with ER diagrams and indexing.

Updated Dec 20, 2025
One-click install
npx skills add https://github.com/larsnyg/claude-code-template-sql --skill database-design-larsnyg
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: database-design
Source: https://github.com/larsnyg/claude-code-template-sql/tree/main/.claude/skills/database-design
Command: npx skills add https://github.com/larsnyg/claude-code-template-sql --skill database-design-larsnyg

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps you architect robust, scalable, and maintainable database designs. It guides schema modeling, normalization, constraint planning, and documentation to reduce data inconsistencies and future maintenance headaches.

Core Features & Use Cases

  • Schema Modeling: Conceptual to physical schema design with normalization guidance.
  • Relationship & Constraint Planning: Primary/foreign keys, indexes, and referential integrity.
  • ERD Generation: Create clear diagrams to communicate architecture to teams.
  • Data Modeling Best Practices: Naming conventions, partitioning, and versioned schemas.

Quick Start

Provide a domain description (e.g., an e-commerce or blog platform) and I will propose a normalized schema, ERD, and indexing recommendations.

Frequently Asked Questions about database-design

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

FAQPage Schema
How do I design a normalized database schema?

Normalized database schema design applies normalization rules (1NF through BCNF) to eliminate data redundancy and inconsistencies. Start by identifying entities and relationships from your requirements, define primary and foreign keys, then progressively normalize tables to reduce anomalies and improve data integrity.

What's the best way to create an entity-relationship diagram?

Entity-relationship diagrams (ERDs) visually map entities, attributes, and relationships in your schema. Define each entity with its attributes, specify relationship cardinality (one-to-many, many-to-many, one-to-one), add constraints and keys, then document the diagram to communicate architecture clearly to your team.

How do I handle one-to-many and many-to-many relationships in SQL?

One-to-many relationships use foreign keys in the child table; many-to-many relationships require a junction table with foreign keys to both parent tables. Design these relationships during schema modeling to maintain referential integrity and avoid data anomalies.

What indexing and constraint strategy should I use for database performance?

Index primary and foreign keys, frequently queried columns, and join predicates to accelerate queries. Define referential integrity constraints and unique constraints during schema design to enforce data consistency and guide the query optimizer for scalable performance.

How do I plan a scalable database schema architecture?

Scalable database schema architecture requires partitioning strategies, versioned schemas for evolution, and consideration of growth patterns during design. Gather performance requirements upfront, normalize appropriately, plan indexes, and document naming conventions to support long-term maintenance and scaling.