I need to find a better solution to make a normalized DB with the expected large amount of data.
My site has table tags (contain the keyword, id), as well as 4 types of data associated with this tag table (articles, resources, tasks, ...).
The big question: - for the relationship with tags, what is the best solution for optimizing and query speed?
create a table for each relationship, for example:
- table articlesToTags (ArticleID, TagID)
- table jobsToTags (jobid, tagid)
- and etc.
or put everything in one table, for example
- tagrelation table (tagid, itemid, itemtype)
I need your help. Please provide me with articles that will help me in this design.
believe that in the future the site may use the new conation section for the tag
thank