Jump to content


This topic is now archived and is closed to further replies.


Table structure help needed

Recommended Posts


I was making a poll thing, but I dont know what is the best way to store data...

Idea #1:

Table "polls":
fields: poll_id, poll_question, poll_options, poll_options_num_votes

being poll_options and poll_options_num_votes serialized arrays.

Idea #2:

Table "polls":
fields: poll_id, poll_question

Table "poll_options":
fields: poll_id_from, option_text, option_votes

Considering a that I may have potentially thousands of polls, thus maybe up to tens of thousands of options, what is the best option?

Thanks [img src=\"style_emoticons/[#EMO_DIR#]/smile.gif\" style=\"vertical-align:middle\" emoid=\":smile:\" border=\"0\" alt=\"smile.gif\" /]

Share this post

Link to post
Share on other sites
Closer to idea 2, for sure -- no serializing in a single column. And 1000s of records is not a problem at all.

Share this post

Link to post
Share on other sites


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.