I have a Codeigniter project that follows an MVC pattern and it has worked perfectly with a single database. Our database has multiple entities - applications, users, etc. - not important. Last week, I was presented with a task, that we need a copy of the project, which will have access to our information, but must have a possibility to have its own private information. Another constraint - they must have the ownership of their database.
Variables - Project_1, DB_1, Project_2, DB_2, DB_Shared.
My idea is to create a shared database which will have most of information of DB_1, so Project_1 and Project_2 can access it, and each project will have its own private database, to which the other project will not have access to.
Right now I am in the planning stage - I have never worked with multiple databases, and I think it adds another level of difficulty because from the start I did not plan my project to have multiple databases in the fututre. I am more interested in some tips of how I should tackle the problem, because it seems there are so many solutions, but at the moment, due to the lack of experience, I can't foresee problems that may arise.
Would I have to rewrite all DB calls? Because I have a link system like url/controller/entity/id - id is not longer a unique element, because entities can exist in 2 database. Would I have to write connection fields? Because on pages, where I have to display all data, I would need to merge two responses together and I would need to somehow distinguish the results.