arpowers Posted December 6, 2007 Share Posted December 6, 2007 Hey guys, quick question... is it better to have one db table or two in your design of forums? I can see advantages to both approaches.. Thanks Andrew Quote Link to comment https://forums.phpfreaks.com/topic/80375-forums-one-table-or-two/ Share on other sites More sharing options...
Barand Posted December 6, 2007 Share Posted December 6, 2007 I'm subscribing to this thread purely out curiosity - how you plan on doing it with either option Quote Link to comment https://forums.phpfreaks.com/topic/80375-forums-one-table-or-two/#findComment-407467 Share on other sites More sharing options...
phpSensei Posted December 6, 2007 Share Posted December 6, 2007 Wait, what do you mean by design of forum? You mean the structure/framework of the application or as in a forum template/skin? Quote Link to comment https://forums.phpfreaks.com/topic/80375-forums-one-table-or-two/#findComment-407502 Share on other sites More sharing options...
JayBachatero Posted December 6, 2007 Share Posted December 6, 2007 Are you talking about the topics/messages tables? If so two tables would be better than having 1 large table with the topics and the messages. The topics table would be all numeric. The messages table would have a reference column for the id_topic. I suggest you look at other forums and get an idea on how they do it. Some even split it into 3 tables to optimize things but 2 tables is enough. The 3rd table would be just a reference to the id_message and the actual post itself. Quote Link to comment https://forums.phpfreaks.com/topic/80375-forums-one-table-or-two/#findComment-407554 Share on other sites More sharing options...
kts Posted December 6, 2007 Share Posted December 6, 2007 I would suggest writing out a flow chart on paper and you'd be surprised on how easily you can answer your own questions. Quote Link to comment https://forums.phpfreaks.com/topic/80375-forums-one-table-or-two/#findComment-407580 Share on other sites More sharing options...
cooldude832 Posted December 6, 2007 Share Posted December 6, 2007 Let see for forumns I'd use about 15-25 tables. Just to name some Users Threads Thread Data Views/Un Viewed Borads Moderator Levels Profile Data etc. etc. etc Make a bit more sense? Quote Link to comment https://forums.phpfreaks.com/topic/80375-forums-one-table-or-two/#findComment-407611 Share on other sites More sharing options...
arpowers Posted December 6, 2007 Author Share Posted December 6, 2007 Thanks for the replies... yes it makes more sense:) sorry I should have clarified, but what I was looking for was the 'threads and replies' ... I wasn't thinking about the table for forums and categories thanks again.>. Andrew Quote Link to comment https://forums.phpfreaks.com/topic/80375-forums-one-table-or-two/#findComment-407701 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.