DB & MDB2 Portability
| From: | Paul Scott | Date: | Thu, 02 Mar 2006 05:50:50 +0000 |
| Subject: | DB & MDB2 Portability | ||
| Groups: | php.pear.general | ||
| Request: | Send a blank email to pear-general+get-23189@lists.php.net to get a copy of this message | ||
I have recently started porting one of our (very) large applications
from PHP4 + DB to PHP5 + MDB2.
My question is as follows:
In the PHP4 version, we used MySQL as the primary RDBMS, but in the PHP5
version would like to give the user the option to use Postgres, Oracle
and MSSQL as well. As far as I can see, things should all be OK with the
different backends, but for one question. Can MDB2 abstract the column
types and names properly? I see that there is support for datetime
columns, but not some others, like timestamp, null fields (for Oracle),
booleans, CLOB's, Decimals, etc.
I have looked at an object by Daniel Convissor that does this type of
abstraction correctly, for all of the above quirks (and more). Am I
flogging a dead horse by implementing this as a separate layer in my db
abstraction? or is it still necessary?
I have googled for information around this point, but can't find
anything satisfactory. I have also tried looking through the API docs
for MDB2 as well as the code, but could only find a couple of references
to portability, namely in the terms described above.
Could anyone either confirm or deny my findings? I would hate to carry
on re-inventing the wheel if its not useful!
Any pointers would be a great help!
--Paul