Trying to setup a simple Thread/Poll table mapping.
Here is what I have:
Threads table
- ThreadID (Primary Key/Identity Column)
Polls table
- PollID (Primary Key, FK for ThreadID for one-to-one relation)
- Question
PollOptions table
- PollOptionID (Identity/Primary Key)
- Text
- PollID
PollVotes table
- PollVoteID (Primary Key/Identity)
- PollOptionID
I'm not sure if this is a proper relationship. It seems wrong but I'm not sure whats wrong with it.
A Thread can have 0 or 1 Poll.
A Poll can have 2 or more PollOptions.
A PollOption can have 0 or many PollVotes.
I'm going to be using Entity Framework and before I generate the code for it (VS 2010, .NET 4) I want to make sure I have the proper relationship mapping.