Personally I would use the second approach but make a link table which can group all the tags together via a foreign key.
Cheers, Scott
I didn't understood the part about making a link table?
Could you please elaborate that?
So I would have two tables. The first one would contain the a primary key of post_id and the name or that post.
The second table would contain all the individual tags linked to that one post. You could then make a foreign key link to the first table.
Hope that makes sense. But think you’ve done this already in your second approach.
Good job
Right, but using the concept of foreign key we can only link single tab to the post table, not an array of tags. Right?
I might be wrong too, IDK
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Personally I would use the second approach but make a link table which can group all the tags together via a foreign key.
Cheers, Scott
I didn't understood the part about making a link table?
Could you please elaborate that?
So I would have two tables. The first one would contain the a primary key of post_id and the name or that post.
The second table would contain all the individual tags linked to that one post. You could then make a foreign key link to the first table.
Hope that makes sense. But think you’ve done this already in your second approach.
Good job
Right, but using the concept of foreign key we can only link single tab to the post table, not an array of tags. Right?
I might be wrong too, IDK