I want to do a question and answer class site, ask a table design questions, a question and some of the following replies with a table?

Source: Internet
Author: User
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.

  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.