Results 1 to 3 of 3

Thread: Forum Database

  1. #1
    Join Date
    Apr 2009
    Posts
    15

    Question Forum Database

    Hi everyone,
    i'm gonna make a forum site, but i don't know how to design the database. The forum will have categories like social, academic, and etc., so i think that i should create different databases for each category. For example database "Social", database "Academic"; and each time when user starts a new thread, for example in "Social" category, the new table will be created in "Social" database, and this table will have columns "repliers_name", "date", and of course "text". So, it is my idea, however i think it's not the optimal and correct way of designing the database for a forum. Any ideas?

    Thnx

  2. #2
    Join Date
    Apr 2002
    Location
    Toronto, Canada
    Posts
    20,002
    different databases for each category is wrong

    you'll want a table for categories, a table for forums (each forum belongs to only one category), a table for members, a table for threads (each thread belongs to only one forum, and each thread has only on member as thread starter), and a table for posts (each post belongs to only one thread and has only one member as poster)
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL

  3. #3
    Join Date
    Apr 2009
    Posts
    15
    Thank you very much, r937@!!! It is the optimal way, isn't it?

Posting Permissions

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