Re: Organisational question: surely someone has implemented many Boolean values (tags) and a solution exist
| From: | Dotan Cohen | Date: | Thu, 20 Jan 2011 16:25:20 +0000 |
| Subject: | Re: Organisational question: surely someone has implemented many Boolean values (tags) and a solution exist | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-310903@lists.php.net to get a copy of this message | ||
On Thu, Jan 20, 2011 at 17:22, Jerry Schwartz <jerry@gii.co.jp> wrote:
> I think the canonical way would be to have one table for your items, one table
> for your tags, and one table for your tag assignments.
>
Thank you, I do agree that this is the best way. Other posters seem to
agree as well!
> Using an ever-lengthening bitmap for the tag assignments is a trap for the
> unwary. The path to perdition is lined with the bodies of those who believed
> "We'll never need more than x..."
>
640 kb?
> As for setting up a hierarchy, that's trickier. One way to handle that is to
> work like libraries do: 10 is "fiction", 10.05 is "crime novels", 10.05.07
> is
> "British authors", and so forth. Your
tags table then
> looks like
>
Thanks. I prefer the "parent tag" field, though, I feel that it is
more flexible.
--
Dotan Cohen
http://gibberish.co.il
http://what-is-what.com