Using NoSQL features in Postgres

March 19, 2023

Do you really need to use NoSQL databases? Or a relational database can satisfy your semi-structured data requirements?

PostgreSQL is a very complete and popular relational database, but did you know that it also has several functionalities of a non-relational database?

How PostgreSQL supports non-relational data?

PostgreSQL supports non-relational data in 3 different ways:

  1. XML
  2. JSON
  3. JSONB

XML

JSON

JSONB

When to use JSON over JSONB?

Inserting data

Querying data

Updating data

Some JSONB functions

Indexing JSON and JSONB data

Conclusion