You need to create a database in which to store jobs. Some of these tasks are questions on the establishment of correspondence between something. Tell me how to organize the storage of such data in the database? Compliance issue

Reported as a duplicate member of the Spirit Community Mar 25 '16 at 6:28 .

This question has been marked as a duplicate of an existing one.

    2 answers 2

    I think you can store in the table type

    Field Type Null ID int NO P_ID int YES .... 

    And for all sub-questions fill in P_ID equal to ID - the main question.

      Create 2 tables with a one-to-many connection - questions will be stored in one table, answers in another table will be linked to the question by identifier in the question table

      • I think the question was related to how to be if there should be several answers in one question (or several under questions) - Batanichek