Answer the question
In order to leave comments, you need to log in
How are tags organized on websites?
Hello, could you explain how the tags are organized on the sites?
For example, there is an "article" that has several tags,
how is this tagged article stored in the database?
For each tag, a separate table is created in which information about "articles" is stored?
Or is there a general table where each "article" entry has information about tags?
Answer the question
In order to leave comments, you need to log in
there is a table of articles
there is a table of tags
there is a link table that combines tags and articles
search in Google by query Databases many-to-many relationships, crosstabs
This is usually done using a many-to-many relationship. That is, there are two tables - one with tags, the second with articles. And there is a third one - a linking table, in which article IDs are compared with tag IDs.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question