Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Tags list in stackoverflow

I am working on website in asp.net mvc. There is form where user is asked to put some information along with the Tags similar to stackoverflow. this tags information is saved in the same table in field Tags.

Now I want to show them a help to select tags from the list (same as in stackoverflow). how can i extract it from the table. Wont it be too much to run the query again and again for each letter they type, because I will be extracting unique tags from my table. Or should i have another table tagslookup where i should save unique tags.

Help will be appreciated.

Regards

Parminder

like image 548
Parminder Avatar asked Apr 07 '26 15:04

Parminder


1 Answers

When we had to do something like this, we stored the "tags" (words) in memory and created a search tree.

Wont it be too much to run the query again and again for each letter they type, because I will be extracting unique tags from my table.

This really varies on a case by case basis. Personally, I wouldn't go to the db each time, but it may be fine for your scenario.

like image 152
kemiller2002 Avatar answered Apr 10 '26 06:04

kemiller2002



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!