Jason
Jason

Reputation: 61

Most efficient way to design database for tagging system

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

Answers (1)

RQDQ
RQDQ

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

Related Questions