By Franck Pachot

.
Remember my first try of Oracle cloud when Larry Ellison announced the Cloud in june?
This week at OOW15 Larry Ellison announced that IBM is not a competitor anymore for them, then I checked IBM Cloud: IBM Bluemix offers IaaS, PaaS and SaaS. As I did in my first trial for Oracle, I’m testing the simplest DB2 ‘SQL Database service’.

IBM is nowhere in the Cloud?

IBM nowhere in the cloud? Well… not totally true… Let me Google for you. Big Blue is in the cloud at Bluemix: https://console.ng.bluemix.net/

And when you click on the first button, you can register for a free 30 days trial.

SQL Database service

I’ve created a ‘trial’ space where I choose ‘USE SERVICES & APIs’

CaptureBluemix001

then have a look at all the SaaS services related to database – very large offer:

CaptureBluemix002

Here is what is available with the free version:

CaptureBluemix003

If you want to see the full catalog, it’s quite impressive: https://console.eu-gb.bluemix.net/catalog/

So my SQL Database service is immediately there:

CaptureBluemix004

And I launch it. I’ve 3 options:

CaptureBluemix005

Load Data

Let’s load data from a .csv file. I’ve exported EMP and DEPT from Oracle sample schema SCOTT, using SQL Developer – all default options – and import it with all default options.

CaptureBluemix006

It reads the file and display its content. Don’t worry about the quotes, they are display there but are properly managed when importing

CaptureBluemix007

Here is the load result:

CaptureBluemix008

I did the same with EMP.

Run Queries

I want to directly run a query and the first idea is to join EMP and DEPT.

CaptureBluemix009

What? Syntax error? That the simplest query I can do with two tables!

Don’t tell me that I can’t use ANSI joins. I were doing ANSI joins in DB2 long before there were supported on Oracle. Actually I learned ANSI join syntax when working on the first versions of DB2 on Unix. Let’s look at the documentation:

CaptureBluemix010

Ok, ANSI joins are supported but not the USING clause. I’ve two problems with that:

  • This syntax is defined by SQL-92 and we are in 2015. It’s a pity that database editors are so reluctant to include syntax that makes things simple. It’s a reason why young developers a looking at NoSQL: they don’t want to use a 30 years old language.
  • DB2 has made huge effort to support Oracle specific syntax (datatypes, SQL functions, PL/SQL, concurrency model). It even supports CONNECT BY, (+) outer joins, rownum, dual, etc. But the first query I try, which is standard SQL-92 ANSI join is not possible! I’m doing most of my joins on Oracle with the USING clause.

Ok, let’s rewrite it:

CaptureBluemix011

work with tables

I skipped the ‘work with tables’ because you can’t do a lot with it: “you can view details, browse data, and export data”

CaptureBluemix012

But you’re not limited to that. You can connect with DB2 DBA Studio. Look at the ‘Setup’ menu do download it and get connection information:

CaptureBluemix014

From there you can do everything: backup/recovery, administration, tuning, development, etc. as with any other DB2 database.

Conclusion

This is only a simple test, so only two conclusions here:

  • IBM is not “nowhere” in the cloud. It’s at bluemix.net and has a large catalog of services.
  • Whatever the compatibility level is, and DB2 LUW 10 has very good compatibility when migrating from Oracle, you can’t move to another RDBMS whithout changing code.