Reputation: 61
Im new to database design and I would like to know what is the best way to design a tagging system such as the one that stackoverflow has?
I found multiple ways to design such a system on the web, but not sure which one is the most optimal.
Upvotes: 1
Views: 694
Reputation: 15579
How about three tables - one of the entities that is to be tagged, one table that is the tags, and then a final table to link it all together?
EDIT: Another way to do it is to use two tables, one for the entities and one for the tags. Of course, you could use a No-SQL solution that directly supports tags.
Upvotes: 2