Part 3: Schema Design, Relationships, and Migrations
Introduction
Schema Design Principles
Principle 1: Start with Your Domain, Not Your Database
Principle 2: Use Descriptive, Consistent Naming
Principle 3: Think About Queries You'll Run
Modeling Relationships
One-to-Many Relationships
One-to-One Relationships
Many-to-Many Relationships
Self-Referencing Relationships
Complete Blog Schema Example
Understanding Migrations
What Migrations Do
Creating Migrations
Migration Best Practices
Handling Schema Changes
Indexes for Performance
Migration Workflow for Teams
Resetting Your Database
What's Next?
Conclusion
PreviousPart 2: Setting Up Prisma with PostgreSQLNextPart 4: CRUD Operations and Prisma Client Fundamentals
Last updated