JSONB هو نوع JSON الثنائي في PostgreSQL — يخزن بيانات JSON بتنسيق فعّال وقابل للاستعلام والفهرسة. يتيح لك تخزين بيانات مرنة وشبه منظمة في قاعدة بيانات علائقية، محسّناً الامتثال العلائقي بمرونة تشبه NoSQL. إنها من أقوى ميزات 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).
