Tags in a table for each?

Asked

Viewed 59 times

0

I have the table "news"and I will make a system of tags, these tags will have to have a table for each or just a table ?

1 answer

1


You don’t need a table for each TAG, you create only another table with the tags and the news id as an example below. Another way is to create a column within the news table where you can put tags separated by comma!

Noticia   | Tag
--------- | ------
Id        | Id
Desc      | IdNoticia
          | Tag 

  • I had thought to put this one way too, but the tags will be registered.

  • Who will register the tags?

  • I will register myself.

  • Then you can do the following, create a TAG-only table! So if you need to link the tags to the news you can have an extra table to join the two information, like Noticiatag, Idnoticia and Idtag, managed to understand?

  • yes intendi, so it’s better, thank you.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.