JSONB PostgreSQL का binary JSON type है — यह JSON data को एक कुशल, queryable और indexable format में संग्रहीत करता है। यह आपको एक relational database में flexible, semi-structured data संग्रहीत करने देता है, relational integrity को NoSQL जैसी flexibility के साथ जोड़ते हुए। यह Postgres की सबसे शक्तिशाली विशेषताओं में से एक है।
JSONB बनाम JSON
JSON → stores the exact text (preserves whitespace/key order/duplicates), parsed each query
JSONB → stores a DECOMPOSED BINARY format → slightly slower to write, but MUCH faster
to query, and supports INDEXING and rich operators
→ Use JSONB in almost all cases (JSON only if you need exact text preservation).
