SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Member
    Join Date
    May 2007
    Posts
    20
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    MySQL Database Design Question

    I have done some looking and found some posts, but nothing I felt answered my question completely.

    I am working on a project that is a sort of content management system that has multiple users... the best example I can think of would be similar to Wordpress MU...

    With Wordpress MU each blog that is created gets its own set of tables... so then you end up with a separate posts table for each blog rather than a single posts table with a column that says blog ID...

    What would be the pros/cons of each method?

    Example A
    Table: blog_posts with column blog ID

    Example B
    Table: blog_1_posts (contains posts for blog 1)
    Table: blog_2_posts (contains posts for blog 2)

    Any input concerns/ideas would be great... Thanks!!

  2. #2
    SitePoint Guru
    Join Date
    Jan 2007
    Posts
    936
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    I think adding a new table for each new user doesn't make much sense. Everytime you add a user you need a new table? 1000 users 1000 tables... Sounds like mayhem. The only way I would see it making sense would be if they were completely different sites or contained different types of data.

  3. #3
    From Italy with love silver trophybronze trophy
    guido2004's Avatar
    Join Date
    Sep 2004
    Posts
    9,401
    Mentioned
    147 Post(s)
    Tagged
    4 Thread(s)
    My guess is that WPMU uses a set of tables for each site because it's built on the WP platform, which doesn't have that blog ID column in it's database.
    Who knows, if they could've, maybe they would've chosen your example A scenario


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •