database-design

Design database schemas balancing normalization, indexing, and ORM compatibility.

Updated Nov 29, 2025
One-click install
npx skills add https://github.com/thimslugga/agent-skills --skill database-design-thimslugga
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: database-design
Source: https://github.com/thimslugga/agent-skills/tree/main/skills/database/database-design
Command: npx skills add https://github.com/thimslugga/agent-skills --skill database-design-thimslugga

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

Provides a structured approach to designing robust, scalable database schemas by balancing normalization, indexing strategy, and ORM compatibility to support evolving data needs.

Core Features & Use Cases

  • Guidelines for when to normalize vs. denormalize and how to apply primary keys, timestamps, and foreign keys.
  • Decision framework for selecting databases, ORMs, and serverless options across common architectures.
  • Use Case: Design a schema for a multi-entity app with users, orders, and products and plan the migrations.

Quick Start

Draft a normalized relational schema for core entities (users, orders, products) with primary keys, timestamps, and foreign keys, then specify an indexing strategy and an ORM mapping plan.

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 database schema that balances normalization and ORM compatibility?

To design a database schema balancing normalization and ORM compatibility, apply structured guidelines for primary keys, timestamps, and foreign keys. This ensures your data model supports evolving relationships and scales effectively.

When should I denormalize a relational database schema?

You should denormalize a relational database schema when read performance demands it and the trade-off against data redundancy is acceptable. The decision framework evaluates multiple relationships and evolving data models to determine optimal denormalization points.

What is the best way to plan database migrations for an evolving data model?

The best way to plan database migrations for an evolving data model is to structure your schema with primary keys and timestamps from the start. This supports multi-entity applications by providing a clear baseline for future schema alterations.

Does this database design approach work with serverless database backends?

Yes, this database design approach explicitly supports serverless database backends. The decision framework helps you select appropriate serverless options and apply indexing strategies tailored for common architectures requiring scalable data solutions.

How do I specify an indexing strategy for a multi-entity app schema?

Specify an indexing strategy for a multi-entity app by drafting a normalized relational schema for core entities like users, orders, and products. You then evaluate query patterns to determine which fields require indexing for optimal performance.