What is the most efficient way to store tags in a database?

后端 未结 7 1203
無奈伤痛
無奈伤痛 2020-11-27 09:06

I am implementing a tagging system on my website similar to one stackoverflow uses, my question is - what is the most effective way to store tags so that they may be searche

7条回答
  •  悲&欢浪女
    2020-11-27 09:35

    I'd suggest using intermediary third table for storing tags<=>items associations, since we have many-to-many relations between tags and items, i.e. one item can be associated with multiple tags and one tag can be associated with multiple items. HTH, Valve.

提交回复
热议问题