What problem does it solve?
This Skill provides guidance and best practices for designing efficient, normalized, and maintainable database schemas, preventing common pitfalls and ensuring data integrity.
Core Features & Use Cases
- Normalization Guidance: Explains and demonstrates 1NF, 2NF, and 3NF.
- Key & Relationship Design: Offers patterns for primary keys, foreign keys, and various relationship types (one-to-one, one-to-many, many-to-many).
- Data Type Selection: Recommends appropriate SQL and Prisma data types for different kinds of information.
- Common Patterns: Illustrates polymorphic relations, self-referential relations, and enum vs. lookup table choices.
- Multi-Tenancy: Shows column-based and schema-based isolation patterns.
- Use Case: A developer needs to design a new PostgreSQL database for an e-commerce platform and wants to ensure the schema is well-structured and scalable.
Quick Start
Use the schema-design skill to understand how to implement a many-to-many relationship in Prisma.