Before I get too far in to this I’d like to get a couple of things straight:

  1. I am biased and
  2. I actually like Oracle XE but I like DB2 Express-C more … see point 1

Now that I got this off my chest, I wanted to do a quick comparison between these two products from the two leaders in the commercial database server market. Both DB2 Express-C and Oracle XE (Express Edition) have much in common. Both are built on the same code that their very popular and at times expensive commercial counterparts are. Both can be downloaded and used for free to build applications, deploy them in production and even distribute as part of your application. Both DB2 Express-C and Oracle XE claim that you can build your application on them and when you “grow up” and need to scale you can upgrade to a paid edition without expensive recoding and migration of your application. So, what’s the diff?
To be net, the biggest difference is that Oracle XE restricts you to storing maximum of 4GB of data. In my not so humble opinion this is an absolute joy killer. How can you use a product that limits how much data you an collect and stops in its tracks if you go over the limit. Say you are an ISV and you bundled Oracle XE in to your application and distributed to your customers. Now imagine your embarrassment and your customers’ “emotion” directed at your support staff when your application just stops working because they stored more than 4GB of data. You may say “yeah Leon, you are full of it. 4GB is a lot.” Bill Gates once said that nobody would ever need more than 64MB or RAM. For the record, I have 3GB of RAM in my laptop and with all due respect for Mr. Gates, I do need it all of it. But I digress. What is 4GB of data? How about just 2 BLOBs with pictures or a couple dozen or so scans of your purchase orders, invoices and other business documents. What about your digital media library. I have 1TB NAS at home and it is starting to fill up with pictures, home movies and iTunes stuff (yes, all legal; I am glad you asked :-)). iTunes library is in XML and DB2 Express-C does XML really well … more on that later. 4GB is half of a decent memory stick. 4GB is nothing in our digital age. DB2 Express-C has no limit on how much data you can store. If you the disk space it will use it. Gigabytes, terabytes maybe even petabytes.
A few less dramatic points. Oracle XE runs on 32-bit Windows and Linux. DB2 Express-C does both 32 and 64-bit Windows and Linux but it also runs on Solaris X86. And for those with System p or System i servers, it is also a choice for running on Linux partitions on these servers. These POWER processors can give you a lot of oomph. So, if you have an System i (AS/400 for old timers) you can install DB2 Express-C on a Linux partition and get blazing fast replication of your AS/400 data in to DB2 Express-C. And did I mention that DB2 Express-C is available in 64-bit versions while Oracle XE is 32-bit only?
Speaking of hardware resources. Both Oracle XE and DB2 Express-C can be installed on any size machine be that a laptop with a single processor and 1GB of memory (3GB in my case) or a good size server with 4 multi-core CPUs and 16GB of memory. That’s nice! Both products will use up to a set amount of hardware resources though. Oracle XE will use a maximum of 1 processor and will not allocate more than 1GB of memory. DB2 Express-C will go for double that. It will schedule its work on 2 processor cores and will allocate maximum of 2GB of memory. However, if you were to purchase optional subscription you can double resource allocations to 4 processor cores and 4GB of memory. And remember, there is never any restriction on the amount of data you can store. An astute reader may be wondering about the usefulness of the 64-bit version of DB2 Express-C in a 2GB or even 4GB environment. If you are wondering, read my blog post on the subject. So, DB2 Express-C can take advantage of 2-4 times the hardware resource when compared to Oracle XE. But what does this really mean? Well, by itself it means nothing. However, when you consider the fact that for database performance having extra memory is probably the most important aspect you understand that you have a potential of much higher performance with DB2 Express-C. What is more important is not only DB Express-C can take advantage of more memory when available it also needs much less memory to run. It turns out that Oracle XE is not quite the slimmed down version it claims to be. Here Windows task manager shows that while Oracle XE instance is up but is idle (not processing any queries) the commit charge is 1581MB

Memory used by an idle Oracle XE

Memory used by an idle Oracle XE

Now we stop Oracle XE instance

Get 600MB of memory back by just stopping Oracle XE

Get 600MB of memory back by just stopping Oracle XE

If you do a quick math you will see that just starting Oracle XE instance consumed about 600MB.

Let’s get back to the code base. Both products use the same code base as their priced editions. However, Oracle XE is still at 10g R2 level despite the fact that 11g shipped almost a year ago. As a matter of fact, Oracle XE has not to my knowledge had any updates at all, not even for critical security flaws. DB2 Express-C on the other hand is constantly updated to the latest level of the DB2 code base. At this point in time it is v9.5 while initial release was v8.2. The free version of DB2 Express-C does not get Fixpacks but it is updated as the new releases of DB2 come out. However, DB2 Express-C does provide an option of low cost support delivered as a yearly subscription. If you were to purchase this subscription, you would get 24*7 support delivered by IBM engineers world wide. You also get double the resource allowance (4 processor cores and 4GB of memory), SQL based data replication and high availability clustering and off-site disaster recovery (HADR). Nothing like that is available with Oracle XE. If you are looking for data replication (Oracle Streams) you will need to move to Enterprise Edition ($47.5K per processor). Same is true for high availability (DataGuard). Even Oracle backup and recovery (RMAN) requires a move to Oracle Standard Edition One.

I saved the best for last. One of the really cool features in DB2 Express-C (and all other DB2 editions) is pureXML. Basically, DB2 Express-C database engine has hybrid data store. On the one hand, it is a very efficient high performing relational storage and query engine. On the other hand, it is also a storage engine that knows how to store parsed indexed XML trees in their native format and how to query data out of these trees using XQuery language. So, if you want to store your iTunes library in DB2 or maybe a large collection of insurance policy documents using industry standard ACCORD schema you can do so efficiently with full fidelity and be able to query these documents with the speed that you would expect from relational databases. It is really very fast.

As I said at the start of this post, I am naturally biased towards DB2 Express-C. However, I like to think that my bias is not just blind affection for my employer or the product I’ve been associated with for the last 15 years. I do feel that DB2 Express-C represents much better value than Oracel XE for anyone but a hobyist who is already well versed in Oracle. I just do not see how majority of peopel deploying real applcaitions can live with restriction on the amount of data their database can manage and such a low one to boot. Also, given memory consumption of Oracle XE and the very low 1GB memory limit, I am sceptical that one can expect perforamcne levels required for real world applcaitions. Last but not least, our IT peopel made me uninstall Oracle XE because it failed security vulnerability scans … it is an unpatched 10g R2 version with dozens of well document vulnerabilities that I simply have no way of fixing. So, while I like Oracle XE for tinkering because it is much easier than other Oracle database editions, I don’t see it being usefull for any kind of real life deployment.

Tagged with →