Json table/column design question - Mailing list pgsql-general

From Skorpeo Skorpeo
Subject Json table/column design question
Date
Msg-id CAMXrOMOav1m8Ep01o7_GDLWxLSpgMp+o4d3FNdmOY7RoWe5B7Q@mail.gmail.com
Whole thread Raw
Responses Re: Json table/column design question
Re: Json table/column design question
Re: Json table/column design question
List pgsql-general
Hi,

I was wondering if having unrelated columns in a table is a sound approach when using json.  In other words, if I have two collections of unrelated json objects, for example "Users" and "Inventory", would it be ok to have one table with a "Users" column and a "Inventory" column?  My concern is that from a row perspective the columns could be different lengths, such as more inventory items as users.  And for any given row the data in one column would have no relation to another column. I would only query a single column at a time.

Would this approach be ok or are there pitfalls such that it would be advantageous/recommended to have a separate table for each column?

Any thoughts/inputs are greatly appreciated.

Many thanks.

pgsql-general by date:

Previous
From: Muhammad Salahuddin Manzoor
Date:
Subject: Re: Long running query causing XID limit breach
Next
From: "David G. Johnston"
Date:
Subject: Re: Json table/column design question