PHP is one of my favourite development languages, most times when I develop an application in PHP I need to port in to another database because of hosting limitations or because of further intergration into another system.
Often I needed to use data from another database in my existing application and making a common class which encapsulates the database connection and queries makes this easier.
One thing that I am working on is making the translation of the different SQL dialects a reality so that an application developed in MySQL will port directly to Firebird or Oracle without having to change the SQL statements.
Those new to PHP and database access via PHP will find that this library is a good place to start in obtaining a solution with the databases provided. One can test a couple of databases without even changing the code !
Developers in the Open Source community wanting to make their applications friendly for porting between databases should want to use the Cross Database Engine in their applications making it easier for others to port the applications.
Different SQL dialects make this difficult and merely renaming ibase_query to mysql_query does not work! With this in mind the goals for the CDE Engine are as follows:
There must be a database that you are using that is not supported yet, thats where you can help and test it in a production environment. Also the functionality of the library is by no means complete and there are “gaps” between the various databases which will make it impossible to port certain applications if the commands are not there.
Translating the SQL dialects between each other is going to be the biggest challenge, so if you use more than one database regularly and know the differences then this is where you will be able to assist.
Submit your features and requests on the Sourceforge project page which will then be included in the next release. I welcome requests for database features that are not part of the current native library offerings. Have a look at the import and backup features.
Please be patient with this reference as it is a work in progress and you may assist to fill in the gaps with this Wiki if you can.
I learn best by seeing an API in action. Here are some lovely examples of why you should be using the CDE library for all your development.
The latest release contains a stable CDESimple which has been in development for a year now. Currently CDESimple supports only four databases but has good debugging with database field and metadata extraction.
Last but not least Click here to download from Source Forge