1

Topic: JSON fields on table columns

Is JSON the type document:

{
object1: {
filed1: value;
filed2: value;
};
object2: {
filed1: value;
filed2: value;
};
...
}

I created the table with fields:

 object1.filed1, object1.filed2, object2.filed1... 

Etc. As it is better to organize an insertion of values from the JSON-document in the table dynamic that it was possible to change/add steams a source-> assignment? I want to write type function:

 insert_data (json_document:: jsonb) 

It is possible to push the document entirely in jsonb a field, but I am afraid then requests to such table will go more slowly, than to the normal relational: http://clarkdave.net/2013/06/what-can-y … and-json/? Or not? I thank!
--
Yours faithfully;
Alexey.

2

Re: JSON fields on table columns

Aleksey K;
Is still  (EAV)
At it is  with  Valuyov
Normally on types.
Or already on attributes.
In Pzh it is possible  dynamic.
At the moment of arrival given. (The ancestor .. It is empty, in avoidance)
Clearly that with big  you will have suffered much brakes.
But flexibilities fairly.
If a kernel to tear out in normal  and in  to fall down garbage - it can and to be quite good with a speed.

3

Re: JSON fields on table columns

qwwq wrote:

is still  (EAV)
At it is  with  Valuyov
Normally on types.
Or already on attributes.
In Pzh it is possible  dynamic.
At the moment of arrival given. (The ancestor .. It is empty, in avoidance)
Clearly that with big  you will have suffered much brakes.
But flexibilities fairly.
If a kernel to tear out in normal  and in  to fall down garbage - it can and to be quite good with a speed.

And it is possible more in detail on points, please, or links for an example?

4

Re: JSON fields on table columns

qwwq, in general I understood that you meant. Something similar and me came to a head, and EAV is on a science. However looked that JSONB especially with GIN jsonb_path_ops an index sometimes faster, or at least not much more slowly: http://coussej.github.io/2016/01/14/Rep … stgreSQL/. The decision sometimes  NoSQL databases: https://www.percona.com/live/e17/sites/ … lides/High Performance JSON - PostgreSQL vs. MongoDB - FileId - 115573.pdf And to use only one JSONB a field is much easier in implementation (at least an insertion of the data), than a heap of the small.
I will stop on simple JSONB. Requests to it not difficult as structure JSON at me in the core the fixed.