such as Segmentfault, such as a question and answer site, a new problem will have a problem ID, then a question can be answered by everyone, each answer can be each other's comments reply.
How does a structure like this build a table?
问题表
, is that 回答表
评论表
so? "
or only with a table can be solved, with a PID field to represent each record (we temporarily put the question, answer, comment as a record) between the relationship, such as PID 0 means that this is a complete problem, directly from the record of the problem, the PID of the problem ID record is the following answer, This relationship can be linked together, but it feels too complex to know if it works.
And this similar like Baidu Bar that mode of, post, thread, comment, reply, DZ is also such, do not know the table structure of DZ is how to design, have the familiar person give me pointing?
Thank you so much!
Reply content:
such as Segmentfault, such as a question and answer site, a new problem will have a problem ID, then a question can be answered by everyone, each answer can be each other's comments reply.
How does a structure like this build a table?
问题表
, is that 回答表
评论表
so? "
or only with a table can be solved, with a PID field to represent each record (we temporarily put the question, answer, comment as a record) between the relationship, such as PID 0 means that this is a complete problem, directly from the record of the problem, the PID of the problem ID record is the following answer, This relationship can be linked together, but it feels too complex to know if it works.
And this similar like Baidu Bar that mode of, post, thread, comment, reply, DZ is also such, do not know the table structure of DZ is how to design, have the familiar person give me pointing?
Thank you so much!
This type of existing open source system has many, the data structure is already quite mature, you can find a installation, you can understand its data structure and even the program.
For example, the following systems
http://www.tipask.com/
The initial study of the open source system, there will be no detours.