Tech TutorBangla Web Documentation
Portfolio
HomeHTMLCSSTailwind CSSJavaScriptTypeScriptReactNext.jsNode.jsExpressSocket.IOExpoWordPressPostgreSQLPrismaPostgresNestJSMongoDBDockerTanStackTanStack TableRTK QueryGitGitHub
  • PostgreSQL Documentation40টি অধ্যায়
প্রযুক্তি নির্বাচন
HomeHTMLCSSTailwind CSSJavaScriptTypeScriptReactNext.jsNode.jsExpressSocket.IOExpoWordPressPostgreSQLPrismaPostgresNestJSMongoDBDockerTanStackTanStack TableRTK QueryGitGitHub
  • Postgres Intro
  • Relational Model
  • Install & Setup
  • Connect psql
  • SELECT basics
  • Data Types
  • Create Table
  • Constraints
  • INSERT / UPDATE / DELETE
  • NULL & COALESCE
  • Schema Design
  • Relationships
  • Joins
  • Joins Advanced
  • Aggregation
  • ORDER / LIMIT
  • String Functions
  • Date Functions
  • Subqueries
  • CTE (WITH)
  • Views
  • Window Functions
  • Transactions
  • Indexes
  • Performance
  • UPSERT
  • JSONB
  • Full-Text Search
  • Triggers
  • Roles & Privileges
  • Backup & Restore
  • Node + PostgreSQL
  • Prisma Intro
  • Prisma Migrations
  • TechShop Schema
  • TechShop Queries
  • TechShop API
  • Best Practices
  • Common Mistakes
  • Interview Questions
  1. Docs
  2. PostgreSQL
  3. Prisma — schema-driven ORM
PostgreSQLIntermediate

Prisma — schema-driven ORM

Postgres ORM — schema file → type-safe client।

5টি অংশবাংলা ভাষায়
terminalbash
bash
npm install prisma @prisma/client
npx prisma init
prisma/schema.prismaprisma
prisma
datasource db {
  provider = "postgresql"
  url      = env("DATABASE_URL")
}

generator client {
  provider = "prisma-client-js"
}

model Product {
  id    Int     @id @default(autoincrement())
  name  String  @unique
  price Decimal
  qty   Int     @default(0)
  items OrderItem[]
}
usagets
ts
import { PrismaClient } from "@prisma/client";

const prisma = new PrismaClient();

const products = await prisma.product.findMany({
  where: { qty: { gt: 0 } },
  orderBy: { price: "desc" },
  take: 10,
});
  • schema.prisma-ই single source of truth
  • npx prisma generate → type-safe client
  • Prisma query → SQL (raw-lite via $queryRaw)
Prisma learn-generation

Prisma-র query API-র transaction, include, relation loading সুবিধা — তবে raw SQL-এর power বোঝা থাকলে Prisma মনে আরো সহজ।

শেষ প্যারায় নিজে practice করুন — কোড কপি করে নিজের এডিটরে চালিয়ে দেখুন।
আগেরnode-postgres (pg) — Node.js থেকে queryপরেরMigrations — schema version control
Tech Tutor

বাংলায় ওয়েব ডেভেলপমেন্ট ডকুমেন্টেশন শিখুন — ধাপে ধাপে।

Homeসব ডকুমেন্টেশনQuick Startআমার নোটস

© 2026 Tech Tutor. বাংলায় শিখুন, বাংলায় গড়ুন।

mdanamolhasan1998@gmail.com