Note that there are some explanatory texts on larger screens.

plurals
  1. POMultiple Databases with Zend
    primarykey
    data
    text
    <p>I'm building an application (using the zend framework) where we will have multiple clients who login and use the application, and each of these clients will be storing lots of data about their users (I'm using MySQL btw).</p> <p>Basically I'm wondering 2 things:</p> <ol> <li><p>Is having multiple databases, one for each client (ie. ipd_client_CLIENTNAME) with identical tables a stupid idea? Or will it actually be more responsive (than putting everything in one database) if we have 50 clients with 20,000 users' data in 'their' database? I've already managed to build the same system but all on one database, my model classes simply grab the name of the client logged in (in the model classes' init() method) and then dynamically change the name of the table they grab data from, is this going to be just fine?</p></li> <li><p>If the "every client on the system gets their own database" makes sense, how exactly would I dynamically change what database my db models connect to (based on which client is logged in)?</p></li> </ol> <p>In case this made no sense, here's an example of what the databases would look like in the two different scenarios (given 2 clients registered on the system):</p> <p><strong>Multiple Databases:</strong></p> <p>ClientA has a database called "ipd_clients_ClientA" with tables "users", "lists".</p> <p>ClientB has a database called "ipd_clients_ClientB" with tables "users","lists".</p> <p><strong>Single Database:</strong></p> <p>ClientA has tables called "users_ClientA", "lists_ClientA".</p> <p>ClientB has tables called "users_ClientB", "lists_ClientB".</p> <p>Hopefully that makes sense.</p> <p>Any help would be GREATLY appreciated, thanks!</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload