In the past, I did not use specialized DSs for this. Infact, if you want to do this using an RDBMS, kindly read the details of how Wordpress does this using taxonomies . Basically, you will have a separate tag table, and then individual messages can contain several tags (using keys).
Another popular approach is to treat your problem as a facet problem. You should use the full-text indexing infrastructure and develop your faceted view on top of this. Here is a great post from the creator of Lucene / Solr , which explains this very case. Using facsimile scanning, you can display something that stackoverflow does:
algorithm × 21165 search × 8863 data-structures × 5867 tags × 2886 stackoverflow × 721
source share