Atealtha Posted December 29, 2003 Share Posted December 29, 2003 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? Quote Link to comment https://forums.phpfreaks.com/topic/1569-best-table-scheme-for-polls/ Share on other sites More sharing options...
gizmola Posted December 29, 2003 Share Posted December 29, 2003 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. Quote Link to comment https://forums.phpfreaks.com/topic/1569-best-table-scheme-for-polls/#findComment-5145 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.