Best way to implement keywords for image upload gallery

Posted by Dan Berlyoung on Stack Overflow See other posts from Stack Overflow or by Dan Berlyoung
Published on 2010-04-15T15:45:19Z Indexed on 2010/04/15 17:03 UTC
Read the original article Hit count: 313

Filed under:
|
|
|

I'm starting to spec out an image gallery type system similar to Facebook's. Members of the site will be able to create image galleries and upload images for others to view. Images will have keywords the the uploader can specify.

Here's the question, what's the best way to model this? With image and keyword tables linked vi a HABTM relation? Or a single image table with the keywords saved as comma delimited values in a text field in the image record? Then search them using a LIKE or FULL TEXT index function?

I want to be able to pull up all images containing a given keyword as well as generate a keyword cloud.

I'm leaning toward the HABTM setup but I wanted to see what everyone else though. Thanks!!

© Stack Overflow or respective owner

Related posts about php

Related posts about cakephp