Is there a common way of dealing with tags in databases?
I'm thinking of using tinytext with pipes. I think adding another table and using IDs might make it more complicated for little gain.
What's your preferred way of doing this?
and what is the right way of doing queries in a table to find results matching multiple or single tags?
Thanks
Implement a simple N:N relations.
Items:
-id
-name
-title
-foo
-bar
ItemTagRelations:
-Fkey itemId
-Fkey tagId
Tags:
-id
-name
-etc
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With