views:

319

answers:

5

We had a talk with colleagues about databases yesterday as we will have a DB2 education in few weeks. I'm wondering, what are the differences between DB2 and Oracle as two major enterprise solutions? Are there any limitations in comparison to each other? Are there any tasks more suitable for DB2 or Oracle?

(I found this article, but I somehow doubt it covers everything)

+4  A: 

The major difference in my eyes is that DB2 can tell the difference between a NULL and an empty string :-)

paxdiablo
And Oracle can't????
Mark Baker
No, it can't: http://forums.thedailywtf.com/forums/t/1225.aspx
paxdiablo
It is a matter of point of view . Having an empty piece of data is no different that having a null piece of data. Do not confuse it with Char(0), the ASCII of Null.
borjab
With respect, it is _not_ a point of view, it is a violation of the standard. An empty piece of (known) data is not the same as an unknown NULL quantity. Classic example, people who may or may not have a middle name: "" is an attribute stating that there is no middle name, NULL is an attribute stating we don't know.
paxdiablo
Surprisingly, many users have solved the Middle Initial problem from a practical point of view. I have no MI, but in many systems it shows up as 'X' :)
Peter Schuetze
And yet my real name if Fortescue Xavier Doppleganger. That system won't work for me :-)
paxdiablo
I know. That is the difference between real world and theoretic problems (even though these problems Do occur in the real world).
Peter Schuetze
+2  A: 

Oracle table, schema and column names are still limited to 30 characters, which can get annoying.

Rulmeq
DB2 (on AIX) is limited to 8 characters. And the Username is limited to 8 characters as well, even though the OS (AIX in our case) does not have this limit.
Peter Schuetze
+2  A: 

IMMSMW, an extremely important difference between the two is the way they achieve transaction isolation. Oracle uses MVCC, DB2 uses traditional two-phase locking.

But that might have changed in recent DB2 releases, of course.

Erwin Smout
IMMSMW? If my memory serves me _wrong_? I think DB2 9.7 implemented MVVC, at least on the LUW side, not sure about the "real" DB2 on System z :-)
paxdiablo
A: 

From which point of view?

For developers that stick to some standard, the differences should not be notable. For admins, yes, that's another story.

Ingo
A: 

With the release of db2 9.7 last year there are fewer differences that there every were DB2 has licensed Postgress plus and this is in DB2 9.7. This is being used essentially a set of Oracle compatibility features. One of those features is Concurrency control. The other main ones are SQL dialect, PL/SQL, PL/SQL packages Built-in packages, JDBC client with extensions, OCI client applications, SQL*Plus scripts. More details here http://www.ibm.com/developerworks/data/library/techarticle/dm-0907oracleappsondb2/

I should disclose that I work for IBM now a migration specialist.

ciaran