PHP, MySQL, and Oracle: An Odd Triangle

Maggie Nelson posted a blog entry recently with a review of an article entitled “Database Design for PHP Programmers” in the February 2008 edition of php|architect magazine. In it, she remarks on the article being MySQL-oriented and how limited MySQL explain plan support is compared to Oracle. I’ve had some thoughts in my head for a while that are related to these points, so I finally decided to, knock on wood, put pen to paper.

First, I’ll agree with Maggie that Oracle beats MySQL hands down in a number of areas. Explain plans in Oracle are significantly more detailed and informative than they are in MySQL. Oracle offers features to support hierarchical data, whereas the most MySQL can recommend is to use the nested set model. Oracle also fully supports set operators, while MySQL still only supports unions. Oracle offers Oracle XE and Oracle SQL Developer to lower the barrier of entry for new developers. MySQL itself is free, but MySQL only currently offers similar developer-targetted features in the form of four separate tools, one of which (Workbench) is still very much in beta. These are just a few places where Oracle comes out the clear victor against MySQL. From a developer perspective, it’s no contest.

The story doesn’t end there, unfortunately. The major issue with Oracle is licensing, which still costs a pretty penny these days. Oracle is lowering this barrier a little to include midsize companies, but obviously MySQL still comes out more cost-effective. MySQL itself isn’t completely innocent of causing licensing issues, but it has at least remained free and compatible with PHP in terms of licensing up to this point. The LAMP platform became popular with good reason: it gives smaller companies a scalable, zero-cost, effective means of rapidly developing applications. At the moment, the most Oracle can claim is two out of those three points.

In addition to licensing, Oracle also comes with additional administration costs. I’ll use the managed server hosting provider Rackspace, with which I’ve had a fair amount of experience, as an example of this. They provide hosting for some fairly big names, Apple being one of them. Take a look at the database services they offer. They support both MySQL and Oracle. If you look closely, though, you’ll notice this statement on the Oracle page: “Oracle Server Support is not available to our Managed Support Level customers. For information about our Intensive Support Level, please click here.” I think that about sums up my point.

I would actually like to see us switch to Oracle where I work. As a developer, I prefer its feature set, enough so that I’m willing to overlook some of its nastier qualities. However, with the additional costs that would come with licensing and administration by Rackspace (which is still very reasonable for what they provide), I don’t think the cost difference is one that I can justify. Until the licensing and administration requirements that come with it are lessened, I don’t believe Oracle is going to be an ideal solution for me or the average PHP developer.

Additionally, though I’m still a bit skeptical, the Sun buyout of MySQL could accelerate MySQL’s development and in time put it closer to being on par with Oracle’s feature set. Only time will tell on that one, but I’d say it’s just as much of a possibility as Oracle expanding its offerings to include smaller companies. It’s still too early after the buyout to make any remotely definitive predictions as to its long-term effects on MySQL as a product.

But, as Dennis Miller would say, “That’s just my opinion, I could be wrong.” What’s your take?

2 Comments

  1. LornaJane says:

    I am with you on everything you say above – Oracle is far superior but I can totally see how “free” trumps any feature set! MySQL has grown and grown in the time that I’ve been working with it (about 7 years) and now has most things that I expect in an RDBMS.

    Another issue is staffing – MySQL is much easier to get into and therefore there are more people around with PHP and MySQL skills. Even with Oracle XE which removes barriers to people playing with Oracle recreationally, the entry bar really is higher because Oracle is harder to install and there are much less resources around it. So there are fewer developers with these skills and they probably cost more.

    Just my tuppence.

  2. …n Development” rel=”category tag”>Development A little while back Matthew Turland posted an interesting item to has blog talking about what he calls the “odd triangle” of PHP, MySQL and Oracle. In…