A conceptual data schema is four tables and a description of the dependencies between them:
Notes:
sequence number of the response in the survey - used only to form a queryset when displaying the page with the survey
name of the survey participant registered on the site - it is filled out only for registered users (non-registered users can also vote and comment). Registered users may suggest creating new polls, but we will not discuss such subtleties in this article.
Dependencies:
Each survey (a row in the Polls table) corresponds to 2 or more answers, i.e. rows in table Answers
Each answer (a row in the Answers table) corresponds to 0 or more comments, i.e. rows in the Comments table
If the site visitor voted for the first time, a new row is created for him in the Visiters table. Users are identified by ip address
After each vote, the number of votes cast for the selected answer in the survey increases by 1
The site must remember what answers each visitor gave and what comments he left: each user comment is written in a new row of the Comments table