As a personal exercise, I’m building a photo site and implementing keyword search. Currently, I’m in the early stages of the design process and am at a fork.
Which is better
- having a
keywordfield in the photo table and executingFULLTEXTsearches - Separate keyword table with each word referencing
nimages
This may be a case of premature optimization, but I would like some guidance.
I cannot think of a single way in which your database design would be improved by using the
FULLTEXTapproach. The separate keyword table speeds searching, allows declarative relational integrity to be applied to the keyword list, makes gathering statistics much easier, and will be more portable across engines.