I'm working on a smallish voting webapp. Similar to strawpoll but only authenticated users are allowed to make polls, while everyone is allowed to vote.
- email/password_hash/name/...some other data...
- user_id REFERENCES User.id - notes which user created the poll
- poll_id REFERENCES Poll.id - notes which poll the options belongs to
- count - Number of votes for this option
- poll_id REFERENCES Poll.id - notes which poll was voted on
- user_id REFERENCES User.id - notes the user which voted
- ip_address - If the the person who voted isn't registered, ip_address will be filled to prevent him from voting multiple times.
I want the owner of the poll to be able to delete polls and change the poll (add more options, remove options, ... ) Is my design good enough? If not, what should I change?