NYCPHP Meetup

NYPHP.org

[nycphp-talk] Writing Database Agnostic Code

Brian Dailey support at dailytechnology.net
Wed Feb 14 10:19:09 EST 2007


A lot of the books and other material that I've been reading talk about
database abstraction - developing your application so that you can use
different database backends without significant (or maybe any) changes to
your code. Pear::DB seems to really do a good job with this. However...

In the past, I've always used MySQL or Oracle, but mostly MySQL. Each SQL
distribution has its own peculiar ways of doing some things, and I know that
using some of the MySQL functions makes the code far easier to write and
also optimizes the speed of the query.

So my question boils down to this: how does one balance writing code that
works regardless of the backend and still keep things optimized for speed
and clarity? Are there any generalized tips that any of you can share from
your experiences?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.nyphp.org/pipermail/talk/attachments/20070214/38c76fb4/attachment.html>


More information about the talk mailing list