Open Web, Closed Databases?

Web site developers seem to be getting open specifications: more and more, I’m seeing sites developed for specifications like (X)HTML, CSS2, DOM, etc., not sites developed for applications like MSIE or Firefox or Opera; I’m seeing Java-based web apps that work with any J2EE-enabled web server, instead of apps that work only with Tomcat or WebSphere or WebLogic; and so on.

After all this, then, I’m surprised to see how many open source web apps specifically require MySQL rather than just “a SQL database. ” MySQL is a fine database, of course, but here we have an open specification, SQL, that’s been around far longer than most of the web specs, and many open source developers are choosing to lock themselves into a single database anyway.

I wonder what gives. I don’t have a lot of experience with PHP, which is the platform for many simpler web apps (including WordPress, which drives this weblog, though it offers an alternative) — is there no generic SQL database interface for PHP, or do the developers just not care? Are there serious performance issues using generic database interfaces? Or are my observations not representative, and in fact most open source web app developers do avoid locking themselves in to MySQL?

This entry was posted in Uncategorized and tagged , . Bookmark the permalink.

5 Responses to Open Web, Closed Databases?

  1. Mik says:

    There is a DBI type of module in PEAR called PEAR::DB (a possibly more original name than DBI :-)) that does just that. The comany I work in has a web app in PHP written with this, developed against MySQL and deployed in MS SQL Server and Oracle without much problems. You can find it at
    I guess most PHP developers just don’t care enough to use it. It requires a certain discipline to stay in the standard SQl specs.

  2. Hear Hear! I’m quite distressed at having to install an an entirely different project just to get wordpress working with my database. And by the sound of things, WP 1.5 won’t be any better. 😦

  3. Matt says:

    It’s performance and bloat issues with the database abstraction classes out there. One we looked at was bigger than WordPress itself!

  4. Another factor is that mysql is ubiquitous among the most affordable web site hosting providers (though this might raise a chicken-or-egg question). You generally need to spend a bit more money to store your data in something else, probably by paying for a dedicated or colocated server and administering the alternative DBMS yourself. So most potential users – and, quite likely, the project’s developers themselves, if they don’t want to host the project from their bedrooms or offices – only have access to mysql.

    (Contradictory evidence in the form of listings of comparably priced web hosting providers who support postgresql would be most welcome.)

  5. Matt Spong says:

    I used to have the same opinion as you, until I read an article on the subject a few weeks ago (sorry, I don’t have the URL at the moment). Basically the point the article made was that in order to be database-agnostic, you basically have to target the lowest common denomiator – nothing more than simple SQL. Every database has its own strong points, its own unique APIs and abilities, and so on, and if you ignore these, you’re not using your tools to their full potential.

    It’s a good point. Why limit your application, in terms of power and especially performance, by not using your database to its fullest potential?

Comments are closed.