NYCPHP Meetup

NYPHP.org

[nycphp-talk] if you were teaching PHP...

Mitch Pirtle mitch.pirtle at gmail.com
Wed Jan 19 13:02:29 EST 2005


Agree wholly with Jay's sentiments. Beyond that, imagine that you are
writing software that you are going to give away (open source) or will
have multiple installations, maybe even become a commercial product.

One of the main reasons MySQL is so pervasive is that nobody wants to
support anything else, dare I say the MS Office of FOSS databases
(gasp!). FOSS is all about choice, and there are plenty of great
choices in the database arena...

Seriously, if you are writing a web-based app that you are going to
distribute, even commercially, you would be insane to tie it directly
with any particluar database's API. Why would you force someone to use
a database when it is so easy to let them decide for themselves?

And this is not an anti-MySQL rant, I'd be just as peeved if all the
sudden everything on sourceforge required PostgreSQL, Firebird or any
other database.

Sure, if you are writing a proprietary application that will only have
one install, and will be deployed such that every minute API call
could make or break performance, then the native API is the only way
to go. But that is the only scenario where I have seen such
justification, and also do not agree with that architectural strategy.

-- Mitch, feeling like a rebellious borg ;-)

On Wed, 19 Jan 2005 12:42:25 -0500, Jayesh Sheth
<jayeshsh at ceruleansky.com> wrote:
> Hi all,
> 
> My take on using PEAR DB is as follows:
> 
> It is a good thing, because it not only helps make your application more
> portable between different database vendors (e.g. between MySQL and
> Oracle) but also between multiple database versions from the same
> database vendor (MySQL 3.x and 4.x vs. MySQL 4.1). What I mean is that
> if you are using the old MySQL client library in PHP (mysql_connect() )
> with MySQL 3.x or MySQL 4.0, and then you upgrade to MySQL 4.1, your
> application will break. This is because to access MySQL 4.1 PHP needs
> the new MySQL client library (mysqli_connect() - note the extra 'i').
> So, if you use PEAR DB, you can make migration of your PHP scripts
> between different versions of MySQL much easier.



More information about the talk mailing list