Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Object–relational mapping and query builder bat...

Object–relational mapping and query builder battle 1: Intro to Prisma

More Decks by NearMeの技術発表資料です

Other Decks in Programming

Transcript

  1. 0 Object‒relational mapping and query builder battle 1: Intro to

    Prisma 2024-06-21 第95回NearMe技術勉強会 Cyan
  2. 1 What is ORM(Object‒relational mapping)? The way we want to

    interact with data The way data is stored in sql database
  3. 7 Start Database and Migrate cd projects/orm-battle || exit //

    start database docker compose up -d // migrate schema npx nx migrate prisma // build server npx nx build prisma // run server npx nx serve prisma
  4. 10 Prisma Pros and Cons - Pros - Totally Type

    Safe - Clear and concise database schema with great IDE support - Documentation is EXTRAORDINARY. - Database agnostic schema definition for basic usage - `Select` only required information => performance++ - No more `select * from` - Cons - Another Rust client that might have overhead - Additional client generating process - Hard to extend => prisma-zod generator was buggy when I used it.