cancer10
08-06-2011, 03:46 AM
Hello All,
I wish to know how do you design a db for video tagging:
1) Do you create a column in the video table for the tags and add the tags with a comma separate value, like: php, mysql, html, css
OR
2) Do you create a separate table for tags and add one tag in 1 row for the video and then prefer JOINing the video and tags table?, Like:
id | video_id | tag_name
-----------------------------
1 | 556 | php
2 | 556 | mysql
3 | 556 | html
4 | 556 | css
Which approach do you prefer?
Thanks for sharing your thoughts.
I wish to know how do you design a db for video tagging:
1) Do you create a column in the video table for the tags and add the tags with a comma separate value, like: php, mysql, html, css
OR
2) Do you create a separate table for tags and add one tag in 1 row for the video and then prefer JOINing the video and tags table?, Like:
id | video_id | tag_name
-----------------------------
1 | 556 | php
2 | 556 | mysql
3 | 556 | html
4 | 556 | css
Which approach do you prefer?
Thanks for sharing your thoughts.