I’m a simple guy

Because I haven’t moved in yet, there is a dearth of good books at my place. In light of that, I finally picked up a Redbook. No, I don’t mean I’m interested in how to find my inner sex goddess, I mean I wanted to see what IBM’s developer tech support has to say.

This one is called Developing PHP Applications for IBM Data Servers. And that’s a tad ironic because I’m using Oracle. As Chris is fond of saying: people are born with either an I or and O stamped on their foreheads.

I was born with “cheap ass” stamped on my forehead since I’ve tried to stick to MySQL, PostgreSQL, and SQLite. But flipping through the book makes me make an observation from the cheap ass camp.

[Getting me to switch after the jump.]

A description of the book

The quality of the printing is really shoddy. I thought 300dpi photocopies went out with the 80’s. This is not a big deal since the price fits right in with the “cheap ass” thing—I got a free copy when I staggered to IBM’s booth at ZendCon.

(Aside: Holly asks if I’m not Chinese: “You break, you buy. No more than 5 pennies at a time.”)

As you might have guessed the book covers integrating PHP with IBM’s databases. What you might not know is that means the DB2 family, Informix Dynamic Server famly, and Cloudscape. By “DB2 family” I mean: UDB Enterprise Server Edition, Express, Express-C, Workgroup Server Edition, Workgroup Server Unlimited Edition, Personal Edition, Developer Edition, and Personal Developer’s Edition. By “IDS family” I mean SE, IDS, and XPS.

Hmm, it’s starting to sound like IBM is trying to give Windows Vista a run for their money.

(Aside: And by “Cloudscape” I mean some Java database which just goes to show me that the Apache group has drunk the kool-aid and “lost it.” Oh, before all of you jump on me for that last statement, you’re actually going to tell me that this is better for web development than the tag team MySQL and SQLite with a straight face? Sure, I can deploy it anywhere JVM runs. But where is that—my cell phone?)

There are two afterthought chapters. One on porting MySQL to DB2 and one on IBM’s Server Data Objects (SDO) for PHP, which sounds like a cross between Apple’s Core Data and DB DataObject. Which is a roundabout way of saying it’s probably a worthless abstraction for a highly scaled consumer-facing website, but it might be useful for enterprise development.

All of which brings me to the title of this post…

I’m a little bit “special”

You might wonder how someone can devote 415 pages to connecting a database with PHP. Well besides all the databases, there is a choice of ibm_db2, informix, ODBC, PDO_Informix, PDO_ODBC, and the aforementioned SDO. (A nice thing I noticed is that PDO_ODBC seems to have connection pooling.)

But I’ve found that if I’m sufficiently motivated, I’d slog through any shit to get where I want to go. And therein lies the problem.

IBM makes it easier to slog through the shit, but they give me zero in the form of motivation with this book.

Apache motivation

When IBM talks about their HTTP server they have it down. Here is what I learned from the three pages devoted to it. First it’s basically Apache with an optional support license and has the following enhancements:

  • A graphical installer
  • SSL built-in, certified for use in government apps
  • if you use Windows or AIX, it has improved CGI and page caching. The latter is confusing. Is this some sort of built in reverse-proxy?
  • LDAP integration
  • It’s a binary. In fact it’s binary only.

I know what I’m getting and losing by switching to this component of WebSphere. I’ve decided I don’t need it so I move on. Cake.

Show me the money

Instead of devoting 400 pages to how to switch to IBM’s server family, why not devote 40 pages to why. In particular, cheap-asses like me want to know:

  • What databases are free and what costs money
  • Why there are three database families.
  • What do I get now over MySQL? (By “now” I mean get for free)
  • What do I get later over MySQL? (By “later” I mean if I pay for it)
  • What do I get now over Postgres?
  • What do I get later over Postgres?
  • What do I lose when I switch? (Be honest.)

Is that asking too much?

4 thoughts on “I’m a simple guy

  1. Terry,

    Thanks for checking out the Redbook 🙂

    Here’s a stab at your questions. I’m not speaking for IBM, just providing the info I can.

    As you noticed, there are three IBM database lines covered in this book. There are also a few others under the Information Management brand that are not covered.

    I’m not an Informix specialist, but these are the free databases I know of:
    * IBM Cloudscape (released to the Apache Software Foundation as Derby, and subsequently adopted as part of JSE by Sun as Java DB).
    * DB2 Express-C (free as in free keg).

    DB2 has been an IBM product for 24 years. You can check out a PDF of its development timeline here. Short version: The history of DB2 is the history of the relational database and SQL.

    Informix and Cloudscape are the result of acquisitions (Informix bought Cloudscape, IBM bought Informix), and they are products that fit a niche that the DB2 series did not at the time:

    * Informix’ strength is OLTP and supports massive retail traffic. Like Mac users, Informix admins tend to be fanatical about what their database does well. Their biggest deployment is Walmart.
    * Cloudscape provide a fairly light footprint database, similar to SQLite. It’s used to provide a no-admin database that can easily be packaged and distributed with an application. In the case of WebSphere and other IBM products, it can store configuration data in memory instead of relying on the filesystem.

    Your other questions are more complex. What are your needs? What application niche are you trying to address? Depending on the application, MySQL or PostgreSQL may be exactly what you need. It all depends.

    Another thing to consider is that the PHP drivers for IBM data servers are constantly evolving to add the functionality that the MySQL drivers have had since the early days of PHP, as well as already supporting the core strengths of DB2. What the interfaces may not have now will be available soon.

    There are many dW articles that might also help you compare the pros and cons (Search MySQL or PostgreSQL with the dW site search). Here’s a good one to start with.
    Migrate from MySQL or PostgreSQL to DB2 Express-C.

    If you do have a chance to try out any of the free databases with PHP, let me know how the experience went. What sucks. What’s missing. What’s great. All that feedback helps.

  2. You misunderstand how IBM and Oracle work. They don’t try to convince you to use their product. Most developers working with their products have little choice. Somebody else up the food chain made the decision. It’s the classic “you won’t get fired for picking IBM/Oracle” mentality.

    They don’t have to sell you on their product vs. competitors’ products. Similarly, they don’t have to sell you on one version (family whatever) of their product vs. another. You don’t have a choice. You’ve already been told which one to use by the time you’re reading their documentation.

    When I used to work in enterprise software, we would certify our products against a huge matrix of database, application server, and operating system combinations. The only IBM database we bothered with was DB2 UDB Enterprise (we did support a couple of different versions.) Some of older products had been certified against Informix, but we weren’t supporting that on newer products. That being said, our most important combination to certify against was DB2 + WebSphere + AIX or Windows. That was by far the dominant stack for healthcare companies, and we sold a lot of software to those guys. We did certify against Linux (RHEL of course) and JBoss on the app server side, but not against MySQL or Postgres. No customers ever used those, so we didn’t bother.

  3. @Daniel

    Thank you for your reply.

    I am aware of the history between IBM and Cloudscape, but the discussion belies my point. Other than Informix users, most people using PHP don’t care. What they want to know is why use these database.

    Right now the ruling best practice in web development is database independance: basically that all databases can and should be interchangeable. This explains approaches like database abstraction layers (from ADODB, PEAR, to PDO). I’m asking for examples as to why a developer might trade database independance for database dependance.

    Unlike Michael, I do not subscribe to the viewpoint that Oracle/IBM is simply a safety thing. I believe there are real benefits that these platforms provide. IBM does not employ such a large database team and three families of database products if there wasn’t a real advantage they can offer to programmers over free software (MySQL, Postgres, SQLite, even SAPDB). The problem is that in order to exploit this IBM is implicitly asking the developer to give up what is gospel in web development without hinting to us what we might get when we “lose our religion.”

    I’m not asking you to ask me what I my needs are. The company I currently work for made their bed with Oracle and I’m happy with that. I hope you understand why I have zero incentive to give suggestions or feedback.

    Instead, I’m suggesting instead that the DB2 team go out there and find out what the needs of web developers are right now and show how their product (DB2, Informix, whatever) addresses those needs better than MySQL. I’m asking for more than just certifying the product to run on DB2, but perform on it.

    The web is a simple world, but web applications don’t have to be simplistic. Right now, many web engineers and architects develop as if the database is a generic and interchangeable component. There is no distinction in this world between a DBA and a DB developer. In fact, often there is often no DBA, no database developer—there is just a web developer who starts up MySQL as if it were a black box.

    That person isn’t going to switch to DB2 because they don’t see a reason. They don’t have a reason because they see no difference between databases other than price. To them, the database is a commodity.

    To really make a database like Oracle and DB2 sing, you have to use the features unique to those databases. This breaks the current paradigm of large-scale (consumer centric, not enterprise) web development of the database as a generic black-box component. Why would someone want to? What can IBM do to address that? Saying “it all depends” is not good enough. Nobody is going out there explaining how IBM’s DB2 solves problems faced in web development better than MySQL or Postgres.

    Before I “migrate” I need to have a reason to migrate.


Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.