1. Database apps with SvelteKit

    • Buy now
    • Learn more
  2. Welcome

    • Welcome
  3. Links

    • Code
  4. Introduction

    • What is Prisma?
    • Project setup
    • Defining models
    • Centralizing the client
    • Seeding the database
  5. CRUD

    • Create
    • Read
    • Update
    • Delete
    • Upsert
  6. Forms and validation

    • Validating the schema
    • Extracting a form helper
    • Creating a re-usable validation function
  7. Searching, sorting and paging

    • Searching and filtering
    • Sorting data
    • Paging data
  8. Relationships

    • Defining relationship schemas
    • Linking related records
    • Adding UI for related models
    • Querying related data
  9. Transactions

    • Performing operations atomically
    • Atomically executing a function
  10. Aggregation

    • Counting, averaging, and summing
    • Grouping data
  11. Deployment

    • Switching to database migrations
    • Deploying to Vercel
    • Migrating with branches
  12. Bonus: Advanced features

    • Generators
    • Extensions
    • Middleware
  13. Links

    • Bonus: Cheatsheet
    • Source code
  1. Products
  2. Course
  3. Section
  4. Lesson

Defining models

  1. Database apps with SvelteKit

    • Buy now
    • Learn more
  2. Welcome

    • Welcome
  3. Links

    • Code
  4. Introduction

    • What is Prisma?
    • Project setup
    • Defining models
    • Centralizing the client
    • Seeding the database
  5. CRUD

    • Create
    • Read
    • Update
    • Delete
    • Upsert
  6. Forms and validation

    • Validating the schema
    • Extracting a form helper
    • Creating a re-usable validation function
  7. Searching, sorting and paging

    • Searching and filtering
    • Sorting data
    • Paging data
  8. Relationships

    • Defining relationship schemas
    • Linking related records
    • Adding UI for related models
    • Querying related data
  9. Transactions

    • Performing operations atomically
    • Atomically executing a function
  10. Aggregation

    • Counting, averaging, and summing
    • Grouping data
  11. Deployment

    • Switching to database migrations
    • Deploying to Vercel
    • Migrating with branches
  12. Bonus: Advanced features

    • Generators
    • Extensions
    • Middleware
  13. Links

    • Bonus: Cheatsheet
    • Source code