Any disadvantages to this tagging approach

Posted by donpal on Stack Overflow See other posts from Stack Overflow or by donpal
Published on 2010-05-25T02:05:43Z Indexed on 2010/05/25 2:11 UTC
Read the original article Hit count: 277

Filed under:
|
|
|
|

I have a table of tags

ID      tag
---     ------
1       tagt
2       tagb
3       tagz
4       tagn

In my items table, I'm using those tags in serialized format, comma delimited

ID       field1       tags
----     ------       -----
1        value1       tagt,tagb
2        value2       tagb
3        value3       tagb,tagn
4        value4

When I need to find items that have this tag, I plan to deserialize the tags. But I'm not actually sure how to do it, and if it's better to have a third table for associations instead between the tags and the items.

© Stack Overflow or respective owner

Related posts about php

Related posts about mysql