So, lets say I need to create a table. One of the columns will contain an array of strings e.g. fruits someone bought. Now, I need to perform lookups like who bought which fruit e.g. apple, etc. Now, I can choose two data types for the column:
Json type
With this approach, the column will store JSON object and use POSTGRESQL json operators to check existence of a fruit.
string type
With this, we concatenate every fruits e.g. "apple orange grapes". To check existence we can use LIKE function or any other string matching function.
Though I've not benchmarked myself, I wanted to know from the experts which would be the best approach. Lets assume for any row the number of fruits wont get any bigger than 200. We also get updates but those are not that frequent. We will most probably get more queries than updates.