Before I get too far in to this I’d like to get a couple of things straight:
- I am biased and
- 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
Now we stop Oracle XE instance
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.
Note that Bill Gates said 640KB not 64MB…
Regards.
Sergio, you are right. I gave him a bit of extra room :-).
Hi,
What I only know is Oracle XE and I am using it now.
I think I will go and take OCA/OCP, I think I will go with Oracle a little bit.
After that, I will take sometime to see DB2, instead of SQL Server.
Peter
I’ve started my friendship with databases from MS SQL 2005 express (due to fact my university is part of Microsoft Academic Alliance). Everything was great until one day when I started to develop a very complicated system that required very big database. So I stared to look for alternative and I’ve chosen DB2 express. It took a lot of time before I got to know it (someone wrote once on some forum -don’t remember where – “…I guess everything is hard with DB2…”). Now I can’t imagine doing any kind of project not build on top of DB2.
I’ve started in the business intelligence world and my experience with SQLServer and Oracle was difficult, in this area DB2 have a Lot of experience and the benefit of this power free, with no limit, could increase the use of DB2.
Hey,
nice article..i am seriously thinking a drift towards db2…
REgards,
We do DB2 in one of our project and DB2 locking is a pain for us. One of the good things is that most middleware solutions supports it
I will not go for DB2 another time due to the level of complexity in the documentation (and the limitations on tools) and the customer support doesnt exactly shine..
Nice article! I didn’t know a modern version of DB2 existed until today (I always thought DB2 was part of AS/400 and died with it) and yes it is annoying to have a 4GB storage limit in your database (I’m looking at you SQL Server Express!)
I also read somewhere that you are supporting the new .NET 3.5’s Entity Framework? Nice!!
I’m downloading DB2 Express-C right now to test it!!
I am working on a project that requires storage of a large RDF database ….. thts XML….. Which Database should I use I was lot confused ….. but this article affirmed me to use DB2….. Any further comments in support of using it/ against it is welcome !!
Even, now the PMC (Partition Memory Controller) is designed pretty good and robust.
Basically it is the partition-specific entity which keeps track of statistics about the various consumers, and allows (or disallows) increases in memory usage across the partition.
Moreover, the new simplified Memory and process model (which can’t be seen in XE) add wings to the success story of db2.
It’s easy to give the impression of low memory consumption thanks to a Win32 API call: SetProcessWorkingSetSize(GetCurrentProcess(), -1, -1);. Perhaps Oracle adopts this strategy.
So.. is it really really that easy to use? Does it install of ‘Windows 2003 Web Edition’?
Is it really that easy to use? Well, the answer as usual “it depends”. it depends what you are comparing to. If you are comparing DB2 to any other DBMS like Oracle, SQL Server, MySQL etc. than the answer is a resounding “yes”. Now, if your point of refference is a Microsoft Access then I will be the first one to say that it is not as easy but neither is SQL Server or MySQL.
Does it install and run on Windows 2003 Web Edition. This is an excellent question for which, I am sorry to say, I do not have an answer based on my personal experience. Windows 2003 Web Edition does support 2GB of memory and a maximum of two processors so from the resource point of view I don’t see an issue. But I will give DB2 Express-C a try on Windows 2003 Web Edition just to be sure as soon as I get a chance.
FYI Bill Gates never said the 640kb quote. See http://en.wikiquote.org/wiki/Bill_Gates#Misattributed
Now on topic, when I just want a quick and dirty application, I typically use either MySQL or SQLServer 2008 (Developer Edition). Anything complicated, worth taking the effort, I use DB2 Express. I tried Oracle’s free offering once, but it never sat well with me.
There is no commercial licence for Oracle XE… if you want an Oracle DB under a production environment for pymes you need buy an Oracle Standart Edition One, or Personal Edition.
Both these database are meant for exploring the product, and for students. I have downloaded Oracle 10g Express and am using it to study for OCA.
These express versions are not suitable for Production implementation unless your application is a tiny one.
Aamir, I agree completely that using Oracle XE for studying for an OCA exam is a great use of the product and using Oracle XE for production applications is just silly. However, that is not true at all for DB2 Express-C. It is actually 100% production ready. As an example, we have a customer that uses DB2 Express-C it in 70000 Point of Sale terminals (cash registers). They bet their entire business on it. In fairness, they do have a subscription that provides them with technical support and extra features and no, they did not pay retail for it.
hello,
how do you get a data replication between DB2 AS/400 and DB2 Express-C ?
DB2 Express-C is a free product. It delivers a great deal of function free of charge. However, it doe not provide all of the DB2 functionality for free. Specifically, replication is the type of function that you get in higher value i.e. priced editions of DB2. By upgrading to the DB2 Express Edition from DB2 Express-C you gain replication, greater resources (double the memory and CPU), high availability and a number of other really useful functions and, of course, technical support and frequent updates with the latest fixes. You can get more information here http://www-01.ibm.com/software/data/db2/express/support.html.