How to model tags in the database?

前端 未结 3 921
萌比男神i
萌比男神i 2021-01-04 20:35

I have an existing webapp and want to add a tag feature so that users can tag existing objects. The question is should I add a tag column to each object? or should I normali

3条回答
  •  攒了一身酷
    2021-01-04 20:50

    Yes, you should normalize it. The 'tag column' is either going to support only one tag per record, or is going to have hideous search performance.

提交回复
热议问题