Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 All TAGS into one column or multiple columns?

Author  Topic 

monaya
Yak Posting Veteran

58 Posts

Posted - 2009-04-13 : 09:24:00
I was wondering which is better should you place each tag in its own individual record or just place all tags in a single comma delimited record?


id tag
254 fun, entertainment, movies

or

id tag
254 fun
255 entertainment
256 movies

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2009-04-13 : 09:40:33
http://www.sqlteam.com/article/parsing-csv-values-into-multiple-rows

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page

karthik_padbanaban
Constraint Violating Yak Guru

263 Posts

Posted - 2009-04-13 : 09:43:44
Using individual id is the best way to make query easy rather than using CSV,


id tag
254 fun
255 entertainment
256 movies

Karthik
Go to Top of Page

monaya
Yak Posting Veteran

58 Posts

Posted - 2009-04-13 : 09:55:24
Thanks guys. Seems multiple columns is best.
Go to Top of Page

karthik_padbanaban
Constraint Violating Yak Guru

263 Posts

Posted - 2009-04-13 : 09:57:55
yes using multiple column is the normalized form.

Karthik
Go to Top of Page
   

- Advertisement -