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. JSONB — relational + document একসাথে
PostgreSQLAdvanced

JSONB — relational + document একসাথে

structure-less data relational column-এ — অপারেটর ও index।

5টি অংশবাংলা ভাষায়
product_spec jsonbsql
sql
ALTER TABLE products ADD COLUMN spec jsonb;

UPDATE products
SET spec = '{"brand":"Logitech","warranty":"1y"}'
WHERE id = 4;
-- -> jsonb আউটপুট, ->> text আউটপুট
SELECT name, spec ->> 'brand' AS brand
FROM products;

-- key exists?
SELECT name FROM products
WHERE spec ? 'brand';

-- path-match
SELECT name FROM products
WHERE spec @> '{"warranty":"2y"}';
  • -> / ->> — key access (jsonb vs text)
  • @> — contains, ? — key exists
  • jsonb-এ data validate হয়, তবে schema-less
-- jsonb-তে GIN index
CREATE INDEX idx_products_spec ON products USING GIN (spec);
jsonb বনাম columns

Filter-প্রয়োজন এমন data-তে নিয়মিত column ভালো (type, index, constraint)। jsonb-কে রাখুন flexible/optional রাশি ও just storage-এর জন্য।

শেষ প্যারায় নিজে practice করুন — কোড কপি করে নিজের এডিটরে চালিয়ে দেখুন।
আগেরINSERT … ON CONFLICT — inset বা updateপরেরFull-Text Search — tsvector, tsquery
Tech Tutor

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

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

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

mdanamolhasan1998@gmail.com