for example, like the Q & An on this site, what is the relationship between the structure of the data table?
user list-> question table, one-to-many
question table-> answer table, one-to-many
answer table-> comment form, one-to-many
comment table-> reply table, one-to-many
question
1. Is this the relationship between the tables above?
2. For the reply form, if you reply to me, I reply to you, and other users can also reply, how should the fields of the reply table be designed?
3, performance issues. Suppose there are a total of 100000 questions with 5 answers for each question, 5 comments for each answer and 5 responses for each comment, then the reply table has a total of 10 5 5 reply 5 = 12.5 million data. When you click from the question list page to enter the question details page, how to optimize the performance of so many layers of associated queries?