DB2 on Mac

Python and DB2

We now have a working Python driver for DB2 which is currently undergoing internal testing. The driver is similar to the Ruby and PHP ones, which means that you get an advanced and very easy to use API. It also means that if you are confident with the Ruby driver, you will be able to use the Python one in no time.

Ruby:

require 'ibm_db'

conn = IBM_DB::connect(database, user, password)

if conn
  puts "Connection succeded."
  IBM_DB::close(conn)
else
  puts "Connection failed."
  puts IBM_DB::conn_errormsg
end

Python:

import ibm_db

conn = ibm_db.connect(database, user, password)

if conn:
    print "Connection succeeded."
    ibm_db.close(conn)
else:
    print "Connection failed."
    print ibm_db.conn_errormsg

We made it so that if you know one, you already know the other. These drivers are CLI wrappers that provide you with performance and stability. Also they don’t limit you to user data and are able to retrieve a good deal of metadata about your database. We’ll also provide a thin wrapper for those of you who intend to use a PEP 249 API. The next step, working on SQLAlchemy, has already started.

DB2 on Mac (no, really!)

macpro.pngWhen I first posted about our interest in Python/Django and DB2, the comment thread got hijacked by many people who asked for a Mac client in order to develop on Mac and deploy on Linux. Ask and you shall receive. I’ve promoted the idea of Django/SQLAlchemy/Python in IBM for a while now, and we are finally close to delivering the driver (with the adapter progressing at the same time too). Well, don’t take this as an official announcement, but Python wasn’t the only thing that I’ve been promoting for months within IBM. With the ever growing community of Ruby/Python hackers adopting Mac as their development platform of choice, I strongly believe that an investment in porting the great free version of DB2 to Mac is a very valid one.

I couldn’t talk about this for weeks, and it must be viewed as a rumor until IBM makes an official announcement, but we have been working on porting DB2 to Intel Mac. Not just the client, the whole package. This makes me a happy panda, no longer will a virtual machine be required to develop with DB2 on Rails on my Mac Book Pro. It’s a joy to see DB2 Express-C run on a Mac Pro (shown in picture) next to the other black boxes in the lab. Work is still in progress, but we should have a beta out there relatively soon (before winter kicks in). DB2 Express-C on Mac is intended for development purposes rather than production, this means that we expect you to develop on your shiny Mac but deploy on Linux or Windows. DB2 on Mac will be a beta product, but again it won’t just be a client runtime, it will be the full product and there is no reason why it shouldn’t be just as stable and efficient as the Linux and Windows versions.

Time to employee some of the newly acquired Cocoa-fu. I’m starting to feel that I could even learn Wasabi and IBM would still be able to let me use that skill in my day job. Awesome.

Get more stuff like this

Subscribe to my mailing list to receive similar updates about programming.

Thank you for subscribing. Please check your email to confirm your subscription.

Something went wrong.

39 Comments

  1. David Cesarano September 19, 2007
  2. Antonio Cangiano September 19, 2007
  3. Ian Bjorhovde September 19, 2007
  4. Jake September 20, 2007
  5. Ian Bjorhovde September 20, 2007
  6. Matt September 20, 2007
  7. Richard Cook September 21, 2007
  8. Pingback: Vitor Rodrigues » Blog Archive » DB2 on Mac September 24, 2007
  9. ekkehard gentz September 24, 2007
  10. Clemens Benden September 25, 2007
  11. Nuno Job September 25, 2007
  12. Anant Jhingran September 26, 2007
  13. Antonio Cangiano September 26, 2007
  14. Jeff Self September 27, 2007
  15. Norman Heino October 19, 2007
  16. Gareth October 25, 2007
  17. Peter October 29, 2007
  18. angelo November 21, 2007
  19. John C. Welch December 19, 2007
  20. Tomas January 2, 2008
  21. Tim Hughes January 9, 2008
  22. Antonio Cangiano January 14, 2008
  23. David Anderson January 16, 2008
  24. Patrick Curtain January 22, 2008
  25. Chad Oliver January 25, 2008
  26. Antonio Cangiano January 25, 2008
  27. Stephan Meinl February 15, 2008
  28. Matt G March 3, 2008
  29. Badrul April 1, 2008
  30. Sven April 13, 2008
  31. Antonio Cangiano April 13, 2008
  32. Todd Burch April 13, 2008
  33. Antonio Cangiano April 14, 2008
  34. Sven April 15, 2008
  35. Todd Burch May 30, 2008
  36. Chris July 31, 2008
  37. Todd Burch October 16, 2008
  38. Todd Burch December 13, 2008
  39. Clemens Benden December 17, 2008
  40. Timo Ruohomaki June 6, 2009

Leave a Reply

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