Answer the question
In order to leave comments, you need to log in
What is the best way to implement adding comments under a topic in MySql (a field in the topics table or a separate table with comments)?
Good day to all!
The bottom line is, let's say there is a blog, a new entry is created (with fields - name, category, and so on), after creating a new blog entry, you must leave comments on this very blog entry. It's better to send these comments to a separate table, or just to a new field in an already existing table with "record name", "category", etc. fields.
Thanks a lot to everyone who will respond. And yes, of course, I understand that the question is stupid and noob, but I'm a newbie, please don't swear, because it's Christmas, holidays and all things .. :)
Answer the question
In order to leave comments, you need to log in
Each entity is a separate table, comments are an entity different from posts, entities are linked through connection keys, that is, there will be a post_id field in the comments that determines which post the comment belongs to. If the comments have a tree structure, another link field with the parent comment is added.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question