tag cloud
-
hi can some one guide me how to build a tag cloud specially its data fetching. i am using asp.net 1.1 with c# and sql server 2k. details i have problem in counting the tags. i am storing the tags in a single column as varchar entry seprated by space, dont catch up with the idea how to get the distinct tags from single column and then got their weight as well thanks in advance
shezi
-
hi can some one guide me how to build a tag cloud specially its data fetching. i am using asp.net 1.1 with c# and sql server 2k. details i have problem in counting the tags. i am storing the tags in a single column as varchar entry seprated by space, dont catch up with the idea how to get the distinct tags from single column and then got their weight as well thanks in advance
shezi
4GuysFromRolla have an article[^] on this very topic.
-
4GuysFromRolla have an article[^] on this very topic.
i had seen it before. but that is a very simple case just count the products against a category, while i am storing tags in a single column seprated by space first need to get the indivisual tag and then its weight but got problem in making query. need guidance regarding how to fetch tags and their weight from single column of a table
shezi
modified on Monday, January 21, 2008 2:36:47 AM
-
i had seen it before. but that is a very simple case just count the products against a category, while i am storing tags in a single column seprated by space first need to get the indivisual tag and then its weight but got problem in making query. need guidance regarding how to fetch tags and their weight from single column of a table
shezi
modified on Monday, January 21, 2008 2:36:47 AM
shah zad wrote:
while i am storing tags in a single column seprated by space first need to get the indivisual tag and then its weight but got problem in making query
Well, if you normalise your data model you won't have that problem. You should only ever store a single piece of data in a column value. You should not be storing multiple tags in a single row. You need to create a new table and split the tags out into the new table. Then set up a many-to-many join between your original table and your tags table. A many-to-many join requires the setting up of an intermediate table.
shah zad wrote:
need guidance regarding how to fetch tags and their weight from single column of a table
While it is possible, it is increadibly inefficient and goes against decades of guidance on how to define relational databases.
Upcoming FREE developer events: * Developer Day Scotland Recent blog posts: * Follow up on hiring a software developer * The Value of Smaller Methods My website | blog