Prisma, TypeScript
Getting Started with Prisma
23 Lessons
Ryan Chenkie
Full Stack Instructor
Prisma offers an ORM and suite of tools that make it incredibly easy to work with databases, especially in a type-safe manner. Prisma's ORM offers full type safety when querying our databases, meaning that writing queries becomes faster and far less error-prone. Prisma also offers tools for migrations, database seeding, viewing/editing data, and much more. In this course, we take a look at how to get going using Prisma in a Next.js application. We find out how to define a data model, how to query our database to return results, and how to work with relations.
Welcome and Getting Started
1
Clone the Finished Project and Install Dependencies
2
Clone the Starting Point and Install Dependencies
3
Install the Prisma VS Code Extension
Installing and Initializing Prisma
4
Install the Prisma CLI and Prisma Client
5
Initialize Prisma in the Project
Our First Data Model
6
View and Manage Database Tables with Prisma Studio
7
Define a Data Model in the Prisma Schema
8
Add a Table to the Database with a Prisma Migration
Querying for Data from the App
9
Query for Data in getSeverSideProps
10
Enable Query Logging in Prisma Client
11
Create Data Using Prisma Client
Modelling Relations
12
Define Multiple Data Models in the Prisma Schema
13
Define a One-to-Many Relation in the Prisma Schema
14
Define a Many-to-Many Relation in the Prisma Schema
15
Create Related Records Using Prisma Studio
Prisma Queries for Full CRUD
16
Update and Delete Providers Data with Prisma Client
17
Update and Delete Posts Data with Prisma Client
18
Use Prisma Queries while Server-Side Rendering a Next.js App
19
Query for Data with Relations in getServerSideProps
20
Update and Delete Campaigns Data with Prisma Client
Wrapping Up
23
Use a Global Prisma Client Instance
Welcome and Getting Started
Installing and Initializing Prisma
Our First Data Model
Querying for Data from the App
Modelling Relations
Prisma Queries for Full CRUD
Prisma Types