An open API service indexing awesome lists of open source software.

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.

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.

![How To Use Prisma with PostgreSQL, SQLite, and MySQL](https://codevoweb.com/wp-content/uploads/2022/08/How-To-Use-Prisma-with-PostgreSQL-SQLite-and-MySQL.webp)

## 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)