I want to store items in a database. The columns for each item will be things like author, title, description.
I also want to somehow associate keywords with each item. These will be used for a search feature on a website, to locate items that have certain keywords. Each item can have one or more keywords.
What's the easiest way to develop a keyword search feature like this?
I think I could create a Keyword table that includes a new row for each keyword and item, so there would be tons of rows for each keyword/item pair.
But is there an easier way? I'm a lazy programmer, not a database guy. Maybe put the keywords all together in one record for each item, separated by commas? Not sure it this would be easy to search though - I guess I would do the search using LIKE in my SQL query.
What's your "best practice" recommendation?
I also want to somehow associate keywords with each item. These will be used for a search feature on a website, to locate items that have certain keywords. Each item can have one or more keywords.
What's the easiest way to develop a keyword search feature like this?
I think I could create a Keyword table that includes a new row for each keyword and item, so there would be tons of rows for each keyword/item pair.
But is there an easier way? I'm a lazy programmer, not a database guy. Maybe put the keywords all together in one record for each item, separated by commas? Not sure it this would be easy to search though - I guess I would do the search using LIKE in my SQL query.
What's your "best practice" recommendation?