Page 2 of 2
Re: Massive Image Organizer
Posted: Sun May 17, 2009 8:31 pm
by allspiritseve
Skara wrote:Ok, what do you mean by an association table between them? As in..
image: id, info, info, info
tag: id, name
assoc: imageid, tagid
?? Why not just have the two tables?
Yeah, that's what I meant. You have to link them somehow. In an earlier example, you had tag1, tag2, tag3 in your images table. This works, but only allows you 3 tags per image. With an association table, one image can have unlimited tags and one tag can be attached to unlimited images.
Re: Massive Image Organizer
Posted: Sun May 17, 2009 9:53 pm
by Christopher
Why not just:
image: id, info, info, info
tag: image_id, name
Search for tag names JOINed on the image table and return DISTINCT image info.
Re: Massive Image Organizer
Posted: Wed May 27, 2009 5:32 pm
by Skara
arborint wrote:Why not just:
image: id, info, info, info
tag: image_id, name
Search for tag names JOINed on the image table and return DISTINCT image info.
Yeah, that was my question. I think this is a better solution.
Also, when I said "tag1, tag2, tag3", I meant that to be a single TEXT block rather than three separate VARCHAR entities. The point being to fulltext search the column. But yeah, a separate table is a better solution. I just don't see the need to have a third association table.