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:
and to the right of it there is:
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?
best table scheme for polls?
1 reply to this topic
Posted 29 December 2003 - 07:51 AM
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.
PHPFreaks is run by Volunteers like me. Want to say thanks? | Follow me on Twitter | My blog | Movie Review Site | Have you read the TOS?
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users