Are there any benefits in using JSON(B) over traditional table structures?
Imagine having a table structure like this:
create table table1 (
t_id int,
first_name varchar(20),
last_name varchar(20),
age int
)
What if you stored the same columns inside a JSON(B) field like this:
{
"first_name":"name",
"last_name":"name",
"age":2
}
and have a table like this:
create table table2 (
t_id int,
attribute jsonb
)
Correct me if I'm wrong, but since both variants are causing a row to be completely rewritten if there have been any updates or deletes on that row, then both variants are identical in that regard.
NULL
s), then conventional tables are superior in terms of speed and efficiency - otherwise everybody would be using JSON(B) and not conventional tables!