Hi, The configuration that you suggest is not as unmaintainable as Paul might have been implying - but he does suggest the simplest and most logical approach.
Some of the systems I've developed saw me at this cross road, and there was always the concerned with Security issues of cross-company data contamination so went for the 'database per client' approach. For me, it added another layer of data security. It also kept things simple from a legal point of view (Exporting data to different countries), backup point of view, and server load-balancing, and some of my more particular clients liked the idea their data was kept away from others. I use a central database for common data, and a database per client for the rest. Each database has a different username and password, so there is very little chance of Client A getting to Client B's data - accidentally or otherwise. Maintenance is largely automated, I use a home-brewed CakePHP Shell and Ruckusing to manage the schemas. It is a bit more work as you have to be really disciplined to make sure you code every database change (and test it) before deploying updates. With the use of cache for the common data, there's no noticeable performance issues with this approach that I've encountered so far. Like I said, it is more work and Pauls approach is simpler but separate databases keep me and my customers happier. Hope this helps! Richard On May 21, 7:33 am, Heidi Grab <[email protected]> wrote: > Hi there, > > I need my cakephp application to support multiple clients. This means, > that people from company A have their very own data, and people from > company B have a completely different set of data. Think of it as an > issue management application: every company has their own software > applications, their own staff, their own administrators that use the > same web based application, but need a company-specific set of data. > > I think the best option would be to specify different databases - > database A for company A right down to database Z for company Z. This > could make it easy to host databases on different servers - e.g. if a > company for security reasons wants to host the mysql data in their > company, or if there are so many companys that one DB server just is > not enough. > > How would I do this with cakephp? > > --> define a table clients that contains information on the client > including which host and which database he wants to use > > --> user has client_id ; means user database would be the same for > everyone; better ideas? > > --> use the specific database, e.g. the model "issues" for user A from > company A is tied to database "company_A". > > Any ideas on how to make that work? > > All the best, > Heidi. > > Check out the new CakePHP Questions sitehttp://cakeqs.organd help others with > their CakePHP related questions. > > You received this message because you are subscribed to the Google Groups > "CakePHP" group. > To post to this group, send email to [email protected] > To unsubscribe from this group, send email to > [email protected] For more options, visit this group > athttp://groups.google.com/group/cake-php?hl=en Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
