Forums - one table or seperate tables?

  • Hi,

    I am working on this website. We currently have one forum, we are planning to add 6 more forums. Can any one tell me which is it better - to create seperate tables for each forum, or use the same tables and add a column to identify which forum (forumid?).

    Thanks.

  • Single table is better.

    Just make sure (ForumId, PostingTime) is a clusterd index on this table.

    _____________
    Code for TallyGenerator

  • Yep... I have to agree... single table would be the way to go... makes for "common code" which makes life simple and you don't have to use dynamic SQL or maintain 7 different "types" of code.

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • Single table also makes searching for content easier... if you went the multiple table approach, every time you added a forum you would have to modify all your queries that searched across all the forums (new postings search, search for a specific text string, etc.).

     

    K. Brian Kelley
    @kbriankelley

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply