Database Schema Skill
Design scalable database schemas with proper relationships, constraints, and indexing strategies.
When to Use
Use this skill when the user wants to:
- Design database tables and relationships
- Create schema migrations
- Define indexes and constraints
- Work with SQL or NoSQL databases
- Normalize or denormalize data models
- Design database migrations
Schema Design Principles
- Normalization: Balance between normalization and query performance
- Naming conventions: Use consistent, descriptive names
- Primary keys: Use natural or surrogate keys appropriately
- Foreign keys: Define relationships clearly
- Indexes: Index columns used in WHERE, JOIN, ORDER BY
- Constraints: Enforce data integrity with NOT NULL, UNIQUE, CHECK