homepage Welcome to WebmasterWorld Guest from 54.242.231.109
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Home / Forums Index / Code, Content, and Presentation / Databases
Forum Library, Charter, Moderator: open

Databases Forum

    
Should I create a new TABLE or a new DATABASE?
NeedExpertHelp




msg:4168127
 6:04 pm on Jul 11, 2010 (gmt 0)

Hi,

I have a social networking site programmed from the ground up in PHP/MySQL using 1 Database.

I would like to add a Forum to the site and have looked at the different PHP Forum Classes available at phpclasses.org and the open-source solutions available at sourceforge.net.

I haven't decided which solution to use (and I'm open to suggestions), but I was wondering if I should install the forum within the current (and only) Database of my site as new Tables or as a completely new Database with its own independent Tables?

In other words, when is it a good idea to forgo the main DB of your site and create a new DB for a new feature?

Thanks!

 

LifeinAsia




msg:4168134
 6:56 pm on Jul 11, 2010 (gmt 0)

There's no "one size fits all" answer to that. But in general, I try to compartmentalize functionality as much as possible in my database structure and would most likely create a separate DB for the foums (and have on my sites). There is also the issue of security (using open source software to access a proprietary DB sounds like worrying I could do without).

There are also times when you would want/need to keep everything in the same table (e.g., a hosting limitatiion that only allows 1 DB).

rocknbil




msg:4168224
 1:13 am on Jul 12, 2010 (gmt 0)

Unless you have a specific reason to do so, I'd say separate DB. Especially with open source board software, any security breaches in the board, which is a pretty high profile target for hacking, could potentially affect your other databases. Make sure it logs in to mySQL with a different U and P too.

Or you could have a table with a name that conflicts with your other DBs.

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / Databases
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved