RE: Should I use JSON?

Поиск
Список
Период
Сортировка
От Zahir Lalani
Тема RE: Should I use JSON?
Дата
Msg-id DB8PR06MB6187C821FF9C941A00A2D63BA7B70@DB8PR06MB6187.eurprd06.prod.outlook.com
обсуждение исходный текст
Ответ на Re: Should I use JSON?  (pabloa98 <pabloa98@gmail.com>)
Список pgsql-general

We make lots of use JSON – but in specific contexts.

 

If we need to pull data out for listing view – always raw fields. If these are detail view only and we need dynamic content depending on record types, JSON is a life saver

 

Z

 

From: pabloa98 <pabloa98@gmail.com>
Sent: 21 May 2020 20:28
Cc: pgsql-general@postgresql.org
Subject: Re: Should I use JSON?

 

 

 

On Thu, May 21, 2020 at 8:37 AM stan <stanb@panix.com> wrote:

Worming on a small project, and have been doing a lot of Perl scripting to
parse various types of files to populate the database. Now I need to get
data from a cloud services provider (time-keeping). They have a REST API
that returns data in a JSOSN format.

So here is the question, should I just manually parse this data, as I have
been doing to insert into appropriate entities into the database? Or should I
insert the JSON data, and use some queries in the database to populate my
tables from the JSON tables?

 

That depends of how advanced is your analysis of the solution you want to implement.

If you are still exploring, I would suggest you store JSON in JSONB columns + some id column to search it.

 

When your program/solution knows what properties you are going to use, perhaps you want to convert those in columns.

 

In any case, data could be indexed in both, columns and JSONB

 

So it is up to you :)

 

Pablo

В списке pgsql-general по дате отправления:

Предыдущее
От: Karsten Hilbert
Дата:
Сообщение: Re: Strategy for materialisation and centralisation of data
Следующее
От: Michael Stephenson
Дата:
Сообщение: Re: Strategy for materialisation and centralisation of data