# \[SQL\] - designing a tagging system

**URL:** <https://forum.kirupa.com/t/sql-designing-a-tagging-system/233350>\
**Category:** programming\
**Created:** [July 23, 2007, 9:32am UTC](https://forum.kirupa.com/t/sql-designing-a-tagging-system/233350 "2007-07-23T09:32:22Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Neolumi](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/neolumi/32/1306_2.png) [@Neolumi](https://forum.kirupa.com/u/Neolumi)\
**Post date:** [July 23, 2007, 9:32am UTC](https://forum.kirupa.com/t/sql-designing-a-tagging-system/233350/1 "2007-07-23T09:32:22Z")

</div>

Hi people, first off ill detail my database setup being:

product\_id, product\_title, etc  
tag\_id, tag\_name, tag\_value

essentially I cant figure out the best way to implement a tagging system, would it be best to add a row to the tag table like ‘parent\_id’ as an enum/set type and include the product id, or to have a seperate table entirely like ‘tags\_to\_products’, which would have an id, product id and tag id. Im just wondering if theres a better way to execute this?

Thanks! :thumb:
