Hey everyone.
I'm new to development and I'm trying to create a a small app that will act as a checklist for multiple people, but I'm unsure of what the best way to create the checklist tables will be. Users will be able to create their own checklist which will be associated to their profile, and create their own custom questions on each checklist. I have been doing a lot of searching trying to figure out how this would be setup and I have come to a big roadblock on it.
Can anyone let me know what the best option would be for this? What tables would be needed and how would I set these tables up?
My best design so far would be to have the following tables:
Checklist
- Id
- UserID (FK)
- ChecklistName
ChecklistQuestions
- Id
- ChecklistQuestion
- ChecklistsId (fk)
ChecklistAnswers
- Id
- QuestionId (Fk)
- SubmittedAnswer
- DateTimeSubmitted
Am I way off base here? My thought process is:
The checklist table would hold the Checklists name and Associate that checklist with a specific user.
The ChecklistQuestions table would hold the questions listed on the checklist, and the fk would lead back to the ChecklistName on the Checklists Table.
The ChecklistAnswers table would hold the answers submitted by the user, and tie back to the checklistsQuestion answered.
I then got to thinking but what if someone uses the checklist more than once. This creates a whole new issue with how to store the data and not run into an error when retrieving the data for each subsequent submission of the checklist.
Can anyone point me in the right directions for this?
Cheers!
