Sikau

Learn Prisma

A type-safe ORM: schemas, relations, transactions and migrations.

Describe your data once in schema.prisma and query it with a fully typed client. Learn models and CRUD, filters and pagination, relations with include and nested writes, aggregations, transactions, raw SQL and the production workflow — running on real PostgreSQL in your browser.

Intermediate · 15 lessons · about 8 hours · free

Start Prisma free: run real code in your browserright here

Continue with Google

What you will learn

Unit 1: Models and queries

Schema, models, CRUD, filters and pagination.

  1. Day 1What is Prisma?A type-safe ORM: schema, client and migrations.20 min
  2. Day 2Models and fieldsTypes, ids, defaults, unique and optional fields.30 min
  3. Day 3CRUD with Prisma Clientcreate, findUnique, update, upsert and delete.30 min
  4. Day 4Filtering, sorting and paginationwhere operators, AND/OR/NOT, orderBy, skip and take.30 min
  5. Day 5Project: Product catalogueSchema plus queries for a small shop.40 min

Unit 2: Relations

One-to-many, many-to-many, include/select and nested writes.

  1. Day 6Relations in the schemaOne-to-many and one-to-one with @relation.30 min
  2. Day 7Reading related datainclude, nested select, _count and relation filters.35 min
  3. Day 8Nested writescreate, connect and connectOrCreate across relations.35 min
  4. Day 9Many-to-manyJoin models with extra fields, and implicit relations.30 min
  5. Day 10Project: Blog data layerUsers, posts and tags with relation queries and nested writes.45 min

Unit 3: Beyond CRUD

Aggregations, transactions, raw SQL and Prisma in real apps.

  1. Day 11Aggregations and groupBycount, aggregate, groupBy and having.30 min
  2. Day 12TransactionsBatch and interactive $transaction for all-or-nothing work.35 min
  3. Day 13Raw SQL and error handling$queryRaw safely, and Prisma error codes.30 min
  4. Day 14Prisma in real appsMigrations, seeding, the client singleton, Next.js and NestJS.35 min
  5. Day 15Capstone: Checkout with stockTransactions, conditional updates, nested writes and reports.50 min

Before you start

These courses make Prisma easier:

See all courses

Built with ❤️ by dibe.sh