0

I have a legacy PHP application that was written in 2004 and uses MSSQL as a database backend.

At this stage MSSQL is still supported by PHP but only just via a Microsoft driver. I have looked at converting to mysql via automated tools, which work quite well, but I have quite complex views which need a lot of individual work to convert. I don't have a great deal of time to do this.

Many tools I wish to use and frameworks I would like to move the application to, don't support MSSQL, so I was considering adding new features using a new mysql database and wondered if anyone had opinions on the pros and cons of using two seperate database backends in a single application?

2
  • take into account performance and reporting needs. If they work fine you may use your suggested approach. however, consolidation of data and further db-design needs to be done with big precaution. Still using single DB is the best practice to follow and maintain.
    – Yusubov
    Commented Jul 3, 2012 at 21:59
  • Another problem being future considerations, you have no guarantee that someday you won't want to have functions and interactions that rely on consolidated data. This is definitely a pros/cons kind of scenario, you need to list each out and see what is most feasible for now (with your mentioned time constraints) against what is likely to come up in the future.
    – JohnP
    Commented Jul 3, 2012 at 22:27

2 Answers 2

1

I think most of the PHP frameworks do not use RDBMS specific function. They use PDO (PHP Data Objects) this library adds a lot of portabilty to the applications because the functions you use are the same for MySQL, MSSQL, Postgres, etc.

If you need more portability you should take a look into an ORM(Object Relational Mapping) like Doctrine.

But as you said, if you are thinking to migrate your app to a framework, the most likely is that this framework already has an abstraction layer.

0

Since I don't know what platforms, frameworks, and tools you want to use, it's tough to present an easy answer. The first thought that comes to mind is some middleware that can map between the MSSQL interface and the data model the tool/framework is using. It's likely that this wheel has already been invented, but requires more specifics to locate.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.