For Programmers: Free Programming Magazines  


Home > Archive > PHP DB > July 2004 > Re: [PHP-DB] One or Many Databases?









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Re: [PHP-DB] One or Many Databases?
Ross Honniball

2004-07-31, 8:55 pm

At 07:41 AM 1/08/2004, you wrote:
>More server load (??? - Using PEAR, I think each separate database would be
>a separate connection)


No you won't. When you code up your DB Query, you can specify the database
that a table comes from by simply using a period as a seperator. eg.

select * from db1.table1 as t1, db2.table2 as t2 where t1.fld_x = t2.fld_x

The default database that pear FORCES you to connect to is only the default
database.

PS

Overall, if you are only dealing with 25 tables, I don't think it matters
too much to break it into multiple db's or not. If you are possibly
expanding significantly than it may be another story. If it aint broke?
..
.. Ross Honniball. JCU Bookshop Cairns, Qld, Australia.
..
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com