
Category · Databases
A database with TypeScript autocomplete
Schema and models, CRUD queries, relations, migrations, transactions, filtering and pagination, nested writes, errors, raw SQL, and seeding. The same SQL, but typed and without string concatenation.
To the first lessonCheatsheet nowTopics, each as its own lesson
01Schema and modelsDemoOne schema.prisma file describes the tables, and Prisma generates a typed client.
10 min
02CRUD queriesfindMany, create, update, delete, with filters written as objects.
11 min
03Relations and includeA user has many orders. include fetches them in one query.
11 min
04MigrationsEvery schema change is an SQL file in history. Development and production follow one path.
10 min
05Transactions and performance$transaction is all or nothing. And one client for the whole app.
10 min
06Filters, pagination, and aggregatesAND, OR, case-insensitive search, cursors, and counts without loading rows.
11 min
07Nested writes, connect, and upsertCreate an order with items and link it to an existing user — in one call.
11 min
08Prisma errors: P2002, P2025The database refused — turn its refusal into a clear API response.
10 min
09Raw SQL, seeding, and test dataWhen Prisma's API isn't enough for a query, and how to fill the database for development.
10 min0/9 topics open. This is the course intro, not the whole course on one page.