Implementing a tagging system in .net

D

darrel

Has anyone built a tagging system for their .net application akin to way
flickr or del.icio.us implement it?

We're building an internal CMS and all of the structured content will be
organized into categories (basically, folders of information). This is
needed to create a specific structure to all the content being entered.

However, I'm seeing some benefit of also implementing a tagging system for
each individual bit of content. This would make creating an index quite
easy, for example.

There are some issues that I'm looking at:

- how to store the tags in the DB...relationship tables? Just one long
string in a field? Other?
- how to regulate the tags. Allow people to create new ones? Pick from a
list?

Just curious to see if anyone else has implemented this and if they'd be
wiling to share any pitfalls/suggestions they may have.

-Darrel
 
K

Karl Seguin

Darrel:
I'm working on something similar. In all honest, I don't see it as a
complex feature. I have 3 entities. articles, categories and tags.

An article must belong to one and only one category
A tag belongs to one or more categories (these are the tags allowed for the
category)
A article can have zero of more tags

So if an article is in the category "HR", zero or more tags which are
allowed to be used in "HR" can be associated with this article

Here are the relevant fields:

Category
-------
CategoryId

Tag
------
TagId

CategoryTagJoin
-------------
CategoryId
TagId


Article
-------
ArticleId
CategoryId

ArticleTagJoin
-------
ArticleId
TagId


The enforcement of making sure only allowed tags is left to the business
layer (though it could easily be done at the data layer as well)

As far as managing the tags, well, it's like anything else. They can pick
from an existing checkboxlist, or add a new item.

Karl
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,020
Latest member
GenesisGai

Latest Threads

Top