J
J
javanub2019-03-07 21:15:11
MySQL
javanub, 2019-03-07 21:15:11

News with categories, need second normal form SQL?

Any news. News has categories. Categories can be created. Need to create a news table, a table with categories, and a table with post_id category_id? Or is there a simpler option, so as not to get confused in the sample?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
T
Talyan, 2019-03-07
@flapflapjack

Any news. News has categories.

Just create a category_id column in the news table and that's it. Why another table?
PS
The third table makes sense only if several categories can be assigned to one news at once, by analogy with tags on a toaster.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question