T
T
tripcollor2018-12-18 12:37:32
PostgreSQL
tripcollor, 2018-12-18 12:37:32

One or more jsonb fields in one table in PostgreSQL?

There are various data that I am going to put into the jsonb fields.
In terms of meaning, this data is grouped into several categories, and what is the best way to do it, have several fields grouped by meaning with the jsonb type, or put everything in one field with the jsonb type and group it already inside it?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Artemy, 2018-12-18
@tripcollor

The decision is determined by the structure of data queries and user interface. If data is needed separately by category, then separate fields are better, if at the same time, then it can be placed in one. The same applies to the interface. For general reasons, it is better to make separate fields. The more detailed the data is structured, the simpler the algorithms for processing it are usually.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question