Jump to content


Photo

When to use multiple databases?


  • Please log in to reply
3 replies to this topic

#1 mattcass

mattcass
  • New Members
  • Pip
  • Newbie
  • 1 posts

Posted 21 September 2006 - 07:21 AM

New to the group and I can't find any posts on when it would be good design to use multiple databases.

I am building a website that will allow access for 3 different types of users:  owners, admins, and users.  Each of these user types will have their own unique tables and fields.  I expect there to be over 10,000 users for each type.

Now, I realize that I can just use one database and create a bunch of tables in it, each specific for my 3 user types.  And this would be easier for me to program. Conceptually, however, it seems to make better sense to use a different database for each user type.

I would like to know if it is better/faster/more resource efficient/etc to use one large database with many tables, or to break it down into 3 databases, one for each user type.

Thanks for reading this and your input!
Matt

#2 448191

448191
  • Staff Alumni
  • Advanced Member
  • 3,545 posts
  • LocationNetherlands

Posted 21 September 2006 - 08:39 AM

Now someone may prove me wrong on this, but I don't think 1 application needs more than 1 database. As far as I'm concerned, the database as grouping of tables, serves no other purpose than to group permissions.

Meaning: I'm some ISP, I have a RDMS server, different clients use that server. Different clients logon to that server, and have access to different groups of tables, eg databases.

#3 Jenk

Jenk
  • Members
  • PipPipPip
  • Advanced Member
  • 778 posts

Posted 21 September 2006 - 08:41 AM

Databases are specific to each application. RDMBS' are supposed to represent the design of your application, they are Relational after all.

The only system design I can think of that should allow multiple DB's is a DB manager like phpMyAdmin.

#4 roopurt18

roopurt18
  • Staff Alumni
  • Advanced Member
  • 3,749 posts
  • LocationCalifornia, southern

Posted 21 September 2006 - 10:47 PM

It depends on how the system is intended to be used.  In regards to the OP, I imagine that admins will want access to user data.  Separating that data into another database only serves to make accessing that data slightly more difficult.  Most of the time, a separate database will likely not help much.

In the case of my current project at work, we have multiple clients using the same system.  So we've assigned a separate database to each client.
PHP Forms : Part I | Part II

JavaScript: Singleton

http://www.rbredlau.com




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users