Why ORM’s?

  1. Remembering and writing raw SQL queries for complex database is difficult
  2. Migrations are hard - As our database grows, we have to change the table’s structure (add columns, modify tables, etc.) which becomes hard to manage and track
  3. You don’t get the best types - The output rows that come from server doesn’t have a type. Prisma give u types on which u can easily perform operations on.

Prisma

  1. Intuitive data model. Give very good functions to interact with. Sits between Backend and Database
  2. Automated Migrations
  3. Type-Safety & auto completion

Screenshot 2024-10-03 233021.png

Open Source project to understand Prisma

https://github.com/steven-tey/dub

Setup Postgres database locally