Hello and welcome to our community! Is this your first visit?
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    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?

    Kind regards,

  • #2
    UE Antagonizer Fumigator's Avatar
    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).


    Tags for this Thread

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts