question

Sapper6fd-2600 avatar image
0 Votes"
Sapper6fd-2600 asked Sapper6fd-2600 commented

Checklist Table Design - EF

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!




not-supported
· 3
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi @Sapper6fd-2600,
You can try the Code First to a New Database which allows you to define the model and create a database.
More details you can refer to this document.
Best Regards,
Daniel Zhang


0 Votes 0 ·

Thanks Daniel.

II know how to create databases in EF, I think I may have posted this in the wrong forum though as I was looking for advice on the proper database structure, not how to make a database.

My apologies!

0 Votes 0 ·

Hi @Sapper6fd-2600,
For questions about database structure, I suggest you modify tag for more professional answer.
The supported products are listed over here(more to be added later on).
Best Regards,
Daniel Zhang


0 Votes 0 ·

1 Answer

karenpayneoregon avatar image
0 Votes"
karenpayneoregon answered Sapper6fd-2600 commented

A design is generally subjective if you look around the web.

Perhaps this might get the ball rolling

116551-figure1.png



figure1.png (182.8 KiB)
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Thank you karenpayneoregon!

This is a great start for me on this. While I looked around high and low for details on "checklists" database design, I never even though of looking for something like a survey which is near identical

Cheers!

0 Votes 0 ·