What is JSONB?
PostgreSQL's binary JSON data type that stores JSON documents with indexing, querying, and manipulation capabilities.
JSONB stores JSON in a decomposed binary format, enabling indexing and efficient querying. Operators include -> (get element), ->> (get as text), @> (contains), and ? (key exists). GIN indexes make JSONB queries fast.
JSONB bridges relational and document databases — store structured data in tables and flexible/dynamic data in JSONB columns. Use cases include user preferences, API responses, metadata, and schema-less data alongside structured tables.