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

后端 未结 7 1193
無奈伤痛
無奈伤痛 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:23

    You can't really talk about slowness based on the data you provided in a question. And I don't think you should even worry too much about performance at this stage of developement. It's called premature optimization.

    However, I'd suggest that you'd include Tag_ID column in the Tags table. It's usually a good practice that every table has an ID column.

提交回复
热议问题