https://github.com/wpcodevo/explore-prisma
In this tutorial, you will learn how to set up and configure a PostgreSQL instance on your local development environment using Docker and Docker Compose. Next, you will use Prisma to create databases and models, as well as perform the basic CRUD, Create/Read/Update/Delete operations. Then, you will create Prisma associations for one-to-one, one-to-many, and many-to-many relationships.
https://github.com/wpcodevo/explore-prisma
mysql postgres postgresql prisma prisma-client prisma-orm prisma2 sqlite
Last synced: 3 months ago
JSON representation
In this tutorial, you will learn how to set up and configure a PostgreSQL instance on your local development environment using Docker and Docker Compose. Next, you will use Prisma to create databases and models, as well as perform the basic CRUD, Create/Read/Update/Delete operations. Then, you will create Prisma associations for one-to-one, one-to-many, and many-to-many relationships.
- Host: GitHub
- URL: https://github.com/wpcodevo/explore-prisma
- Owner: wpcodevo
- Created: 2022-08-06T16:43:23.000Z (almost 3 years ago)
- Default Branch: master
- Last Pushed: 2022-10-02T21:08:34.000Z (over 2 years ago)
- Last Synced: 2025-01-26T03:41:24.092Z (5 months ago)
- Topics: mysql, postgres, postgresql, prisma, prisma-client, prisma-orm, prisma2, sqlite
- Language: TypeScript
- Homepage: https://codevoweb.com/how-to-use-prisma-with-postgresql-sqlite-and-mysql
- Size: 22.5 KB
- Stars: 2
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# How To Use Prisma with PostgreSQL, SQLite, and MySQL
In this tutorial, you will learn how to set up and configure a PostgreSQL instance on your local development environment using Docker and Docker Compose.
Next, you will use Prisma to create databases and models, as well as perform the basic CRUD, Create/Read/Update/Delete operations.
Then, you will create Prisma associations for one-to-one, one-to-many, and many-to-many relationships.
## Topics Covered
- How Does Prisma Work?
- Create a Sample PostgreSQL Database
- Install and Configure Prisma
- Initialize a Node.js TypeScript Project
- Set up Prisma
- Create a Simple Schema
- Run the Database Migration with Prisma
- Connecting the App to the Database
- Start the Application
- Create/Read/Update/Delete with Prisma
- Create a Database Model with Prisma
- Migrate the Prisma Model to the Database
- Create Model Relationships with Prisma
- Creating a One-to-One Relationship
- Creating a Single One-to-Many Relationship
- Creating Multiple One-to-Many Relationships
- Creating Many-to-Many Relationships
- Using Prisma Client for Database Queries
- Inserting a New Record
- Inserting Multiple Records
- Query All Records
- Query a Single Record
- Update a Record
- Update Multiple Records
- Delete Multiple Records
- Create Services with Prisma
Read the entire article here: [https://codevoweb.com/how-to-use-prisma-with-postgresql-sqlite-and-mysql](https://codevoweb.com/how-to-use-prisma-with-postgresql-sqlite-and-mysql)