Jump to content

[SOLVED] advice in table decision...


DanDaBeginner

Recommended Posts

:) I am in the middle of making a decision on my dbase structure..I am going to develop a site the same as this site, a forum, which will tuckle about the crisis of one country...now my question is, for example in this forum, they have a topic name: mysql help, php help, HTML help, ORACLE, PHP freelancing, etc...

 

now back to my question, would be best if im going to have a table for each forum?like mysqlhelp_table, phphelp_table, etc.. or an insanity? I thought about having 1 table that has a field name "forum_about" that can contain ORACLE, PHP help, etc... but im concern about the speed? would it be slow if I use 1 table or multiple table? wha is the best?

 

Dan

thanx

Link to comment
Share on other sites

You need to download something like SMF, phpBB, vBulletin or other forum software and thoroughly examine the table structure. It would be insanity to manage a DB structure where you have to insert a new table for each forum. Typically, you'll have a table to hold the forums, another to hold the individual topics and yet another to hold all the posts. These will be referenced to each other and some simple joins will allow you to query and display everything as you will.

Link to comment
Share on other sites

If you go to the main page of this forum, you'll see a forum labeled "MySQL and PHP Forums" or something similar. Within that, you'll see a topic titled "PHP Help," and then there are a ton of individual threads within that topic. Each thread then has multiple posts. Each level of a hierarchy like this really needs to be stored separately with references between them. A well optimized table with clean references is actually going to be faster to query than one that appears simpler because of fewer tables but actually has a much larger data duplication rate.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

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.