Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
Thread: Emulating a database structure
05-16-2011, 02:36 PM #1
- Join Date
- Oct 2010
- Thanked 1 Time in 1 Post
Emulating a database structure
Hi @ all,
i currently work at a project, that needs a partly db redesign, after running for some time.
But already many php scripts are working with the old structure,
so it would be quite some work to update all the old scripts.
In detail, it´s about separating a table, that had quite many columns, in a couple of smaller tables with each containing a part of the rows.
Now my question:
Is there a possibility, to add to a central place (DbAbstractionLayer) a logic, which would transform all sql queries, to make them suitable for the new structure?
For example SELECT queries would be quite easy, since one would simply have to add some joins to it.
But could this logic work for all possible queries?
If yes, how much time would it take to implement?
05-16-2011, 04:02 PM #2
- Join Date
- Dec 2005
- Utah, USA, Northwestern hemisphere, Earth, Solar System, Milky Way Galaxy, Alpha Quadrant
- Thanked 637 Times in 625 Posts
You may want to try writing some views against the new design that emulate the old tables. You'd have to change your existing code base to point to the views rather than the old tables but your query logic wouldn't have to change (assuming you can get your views set up properly).