Click here to Skip to main content
15,888,521 members
Please Sign up or sign in to vote.
5.00/5 (1 vote)
See more: (untagged)
I have a large number of articles. I have a large number of possible keywords. Each article has at least one keyword associated with it, but may have many keywords. There is a database containing a list of all articles and a boolean variable set to true for each keyword if that keyword applies.
A user has a list of all keywords and selects those which interest them.
I am trying to find a more elegant way to extract the list of relevant articles than a brute force SQL SELECT.
Any suggestions would be appreciated!
Posted

I guess you will not be able to escape from a select statement...maybe you could try to use a stored procedure for that, or try to optimize the select, but not without a select I think

 
Share this answer
 
I think your database design is not ideal.. You should have a table for all the articles and a table for all possible keywords. In a third table you save all keyword-article associations (using the primary key of the article and keyword).
 
Share this answer
 


CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900