database-design
Installation
SKILL.md
Database Design
Good database design determines the long-term maintainability, performance, and correctness of any data-driven application. Schema decisions made early are expensive to reverse later. Every table, column, index, and constraint should exist for a reason backed by access patterns and business rules.
Data Modeling Principles
Start from Access Patterns
Design tables around how the application reads and writes data, not around how entities look in a domain model. Two questions drive every schema decision:
- What queries will run most frequently? - these determine table structure, indexes, and denormalization choices
- What consistency guarantees does the data need? - these determine normalization level, constraints, and transaction boundaries