DEV Community

Cover image for Prisma ORM with Node JS/Nest JS
tkssharma
tkssharma

Posted on

Prisma ORM with Node JS/Nest JS

Prisma ORM with Node JS

originally published at medium

https://medium.com/tkssharma/prisma-orm-with-node-js-17c0b72faf32

Guys we will take a look at different ORM and ODM in the node js world to support database integration

What is Prisma ORM

Next-generation Node.js and TypeScript ORM

Prisma helps app developers build faster and make fewer errors with an open-source database toolkit for PostgreSQL, MySQL, SQL Server, SQLite, and MongoDB (Preview). from https://www.prisma.io/
Prisma is an open-source next-generation ORM. It consists of the following parts:

  • Prisma Client: Auto-generated and type-safe query builder for Node.js & TypeScript

  • Prisma Migrate: Migration system

  • Prisma Studio: GUI to view and edit data in your database

Prisma Client can be used in any Node.js (supported versions) or TypeScript backend application (including serverless applications and microservices). This can be a REST API, a GraphQL API, a gRPC API, or anything else that needs a database.

Why Prisma

Working with relational databases is a major bottleneck in application development. Debugging SQL queries or complex ORM objects often consume hours of development time.

Prisma makes it easy for developers to reason about their database queries by providing a clean and type-safe API for submitting database queries which returns plain old JavaScript objects.

My honest opinion after using Prisma is Yes it is better and solving lot of issues which we face with other ORM like database migration managements, Prisma CLI, Prisma studio and Prisma client are powerful tools.

When it come to API development, There are many possible combinations to write APIs and to support the integration use ORM libraries like TypeORM, Sequelize, Prisma, Mongoose, etc

  • postgres- RDBMS

  • mongodb- NO SQL

  • mysql- RDBMS

  • neo4j — graph DB

In this playlist i have covered prism Integration with Node JS and different SQL and NoSQL databases like

  • express + prisma + postgres

  • express + prisma + mongodb

  • nestjs + prisma + postgres

  • nestjs + prisma + mongoose

We are starting with basics to advance application managing all different relationships in the RDBMS database

We have covered

  • managing migrations

  • setting up Prisma with node js apps express or nestjs

  • nestjs with Prisma Module and postgres database

  • Prisma client for managing integration apis

Reference

Top comments (0)