V
V
VitaliyBorys2018-11-27 11:04:16
MySQL
VitaliyBorys, 2018-11-27 11:04:16

How to properly structure the database for comments?

Good afternoon. The task is to make a system of threads on the site. That is, there is a post under which you can leave a comment, comments can be answered. A file can be attached to the comments.
I don't know yet how to design the database structure for comments. The first thing that comes to mind is:
id_comment
user_id
text
file
parent_id
created_at
I have serious doubts about such a structure. Tell me something better? Thank you!

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
Ivan Shumov, 2018-11-27
@inoise

Not the fact that the solution, but for development , be sure to read

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question