Click here to Skip to main content
15,890,185 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more: , +
Hi Everyone

I am working on a blog type project where I need to set up search for articles.
I am using sql server and asp.net.

I have set up search using article name and some keywords or tags related to the article.

My issue is how to set up keywords or tags list for a particular article

What I have tried:

What I have done currently is

srno | articlename | description | keywords
1 | abc | complete article text | some relevant keywords

A table with the above columns where articlename and keywords or tags will be searchable.
I also separated all keywords or tags with a delimiter ","

The keyword list is 4-5 keywords or tags per article. Max 10 keywords or tags per article.
Is it advisable to use keywords or tags in the blog table columns

Please advise

Thankyou
Posted
Updated 16-Oct-16 7:02am

1 solution

Not sure if I understand your question correctly but:

  • Why do you store the tags/keywords inside a single column? I would split them into separate rows. Storing them as comma separated list will cause you problems in both logic and performance
  • Depending on the definition tags represent a different thing than keywords. Tags typically categorize while keywords are important words that exist in the article
  • Why not store both in a same table. Both are words but just different types so by adding a type column you can separate them

I would also recommend getting to know Full-Text Search[^] since it could help you build good search tools with SQL Server
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



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