Jump to content

Archived

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

Atealtha

best table scheme for polls?

Recommended Posts

I took a look at the vBulletin source code and noticed that they seperate the questions and votes in only 2 columns.

 

Here is a visualization of the table in phpmyadmin:

 

question

q1|||q2|||q3...

 

and to the right of it there is:

 

votes

13|||2|||77...

 

they seperate their options with pipes. now, is this a good way to do polls? or is it better for me to go and put one poll option per row (with a seperate index which I\'ll organize myself)?

 

Or is there a way to put tables within tables to make this all easier that jelsoft and I don\'t know of?

Share this post


Link to post
Share on other sites

All design decisions like this involve tradeoffs. BBS polls are very simple because they can ask only one question, and then have a fixed set of answers that are always an enumerated list. Since they wanted to KISS, they used a compressed non-database centric structure. If your application was focused on polls, then this might be a bad decision, but since polls are essentially fluff in the context of a forum, it really doesn\'t matter. In their case they opted for a structure that is storage friendly but computationally taxing. This however allows them to focus on the forum code and be database agnostic which was probably one of their design goals.

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.