Answer the question
In order to leave comments, you need to log in
What is the best way to implement the database structure for a blog (comments)?
I am creating my own blog. There is a table of articles with fields: id, title, date, content
I want to implement the ability to comment on each article.
Would it be correct to create one large table, store all comments in it, and make one of the fields article_id, which will point to the article to which the comment refers? And when displaying comments, select everything by article_id?
This option seems to me the most correct. But a little bulky. But there is no actual experience. So maybe I could be wrong.
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question