Answer the question
In order to leave comments, you need to log in
What is the correct way to use the ARRAY data type for image tags?
You need to create a gallery with tags, search for them and top tags.
Considering PostgreSQL capabilities, it seems logical to make the tags field an array of varchars, let's say there is a 'images' table and a tags array field, everything is clear with the search (... tags @> '{fun, anime}'::varchar[];) .. .), but what about the top tags?
I correctly understand that if you create an index for 'tags', there will be no physical duplication of data?
Is such a structure really beneficial for this case, or is it easier to use the standard model, with a separate tag table?
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question