Tech TutorBangla Web Documentation
Portfolio
HomeHTMLCSSTailwind CSSJavaScriptTypeScriptReactNext.jsNode.jsExpressSocket.IOExpoWordPressPostgreSQLPrismaPostgresNestJSMongoDBDockerTanStackTanStack TableRTK QueryGitGitHub
  • PrismaPostgres Documentation40টি অধ্যায়
প্রযুক্তি নির্বাচন
HomeHTMLCSSTailwind CSSJavaScriptTypeScriptReactNext.jsNode.jsExpressSocket.IOExpoWordPressPostgreSQLPrismaPostgresNestJSMongoDBDockerTanStackTanStack TableRTK QueryGitGitHub
  • Prisma Intro
  • Prisma vs Raw SQL
  • Setup & Install
  • Schema Basics
  • Models
  • Relations
  • Migrations
  • Prisma Client
  • Create & Upsert
  • Read Queries
  • Update & Delete
  • Query Filters
  • Sort & Pagination
  • Select & Include
  • Nested Writes
  • Transactions
  • Aggregation
  • JSON Fields
  • Raw SQL
  • TechShop Schema
  • TechShop Seed
  • Relations Advanced
  • Env Config
  • Global Client
  • Next.js + Prisma
  • Express API
  • Error Handling
  • Performance
  • Connection Pool
  • Prisma Studio
  • Deploy Migrations
  • TechShop Indexes
  • TechShop Cart
  • TechShop Stats API
  • Schema Evolution
  • Debugging
  • Common Mistakes
  • Best Practices
  • Interview Questions
  • Recap & Next
  1. Docs
  2. PrismaPostgres
  3. Model & field types — শক্তিশালী scalars
PrismaPostgresBeginner

Model & field types — শক্তিশালী scalars

table-এর সারি = model — Prisma-র scalars data type।

4টি অংশবাংলা ভাষায়
Product modelprisma
prisma
model Product {
  id          Int      @id @default(autoincrement())
  name        String   @unique
  description String?
  price       Decimal  @default(0)
  qty         Int      @default(0)
  active      Boolean  @default(true)
  spec        Json?
  createdAt   DateTime @default(now())
  updatedAt   DateTime @updatedAt
}
ScalarSQL
Stringtext / varchar
Intinteger (4-byte)
BigIntbigint
Decimalnumeric — money-এর জন্য
Booleanboolean
DateTime / Datetimestamp
Jsonjsonb (PostgreSQL)
  • ? — nullable; ছাড়লে NOT NULL
  • @default, @unique, @id — attribute
  • @updatedAt — নিজে-নিজে update-তে বদলায়
money-তে Decimal

প্রাইস Float না — float round হয়। Decimal → Postgres numeric, ও Decimal.js টাইপ client-এ।

শেষ প্যারায় নিজে practice করুন — কোড কপি করে নিজের এডিটরে চালিয়ে দেখুন।
আগেরschema.prisma — datasource ও generatorপরেরRelations — একে-অনেক, অনেক-অনে
Tech Tutor

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

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

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

mdanamolhasan1998@gmail.com