Ask a question, I now multi-functional universal set of tags, articles can have multiple tags, the group has multiple tags, people can also have multiple tags, the topic has multiple tags. Database with MySQL.
The relationship between the previous article and the label is implemented through a mapping table that holds the article ID and tag ID.
Now that there are multiple functions in mind, the table structure should be a tagsmap mapping table, and then distinguish it with field identifiers.
or create multiple mapping tables like Tagsmap_article, Tagsmap_topic,tagsmap_group?
What kind of a better way?
The amount of later data may be much higher.
Reply content:
Ask a question, I now multi-functional universal set of tags, articles can have multiple tags, the group has multiple tags, people can also have multiple tags, the topic has multiple tags. Database with MySQL.
The relationship between the previous article and the label is implemented through a mapping table that holds the article ID and tag ID.
Now that there are multiple functions in mind, the table structure should be a tagsmap mapping table, and then distinguish it with field identifiers.
or create multiple mapping tables like Tagsmap_article, Tagsmap_topic,tagsmap_group?
What kind of a better way?
The amount of later data may be much higher.
Initial proposal or just in a table, add a Type field to distinguish the three categories, the structure is simple and clear, the table is a lot of chaos.
After a large amount of millions of data, and then consider the table can be divided into