Meditations on programming, startups, and technology
New Relic

DB2 Express-C 9.7 and the Django adapter released

This is a great day for those of us who love DB2, as DB2 Express-C 9.7 has just been released. As mentioned before, this is the best DB2 ever, and an extremely important release.

To learn more about what’s new in this release, please check out the recording of our latest webinar:

If you run Linux, Unix or Windows, download it while it’s hot.

DB2 9.7 on the Cloud

Another great aspect of this release is that for the first time ever, DB2 has been released both as a product and as a deployment on the Cloud. If you pop over to RightScale, you can get a trial account for free and should see DB2 Express-C 9.7 on both CentOS and Ubuntu within the partner catalog. RightScale has been an amazing partner and they really do wonders to simplify Cloud Computing. In ten minutes time you can be up and running on the Cloud, thanks to the templates provided.

DB2 on the Cloud

DB2 support for Django

But the good times don’t stop there, we are also announcing the first official release of the Django adapter for DB2. It sounded crazy when I first proposed the idea within IBM back in 2006, but now it’s a reality.

You can download the .tar.gz archive from the Google Code homepage for the project, or simply by clicking here. This version fully supports the Django 1.0.2 API. For instructions on how to install it, please read the Getting started with the IBM DB Django adapter guide. The current version supports DB2 for Linux, Unix, Windows and MAC OS X, version 8.2 or higher (9.5 FP2 or higher for MAC OS X). In the future, IBM Cloudscape, Apache Derby, Informix (IDS) and both System i & z/OS will be supported.

ibm_db gem updated to 1.1

I’ll conclude this DB2-centric post with a smaller, but still interesting announcement. The ibm_db gem has been updated to version 1.1. This release includes support for ActiveRecord’s QueryCache mechanism, enhanced support for BigInt (and BigSerial), support for rename_column (requires DB2 9.7), parametrization of the timestamp datatype (requires DB2 9.7), and a few fixes and performance enhancements as well. It is recommended that you upgrade to this version.

If you enjoyed this post, then make sure you subscribe to my Newsletter and/or Feed.

receive my posts by email

9 Responses to “DB2 Express-C 9.7 and the Django adapter released”

  1. Gonçalo Ferreira says:

    Any idea when z/OS will be supported? Is it on the works?

  2. Kevin Teague says:

    Some notes from the PPP (Python Packaging Police):

    1. The DB2 Django adapter project is named ‘ibm_db_django’ (and reflected in the distribution as ibm_db_django-0.1.0.tar.gz). But then the uses ‘django.db.backends.db2’ as the name. The name field is for the project name, not a package name provided by that project, so this field should be ‘ibm_db_django’.

    2. The ‘requires’ field is deprecated, and has been replaced by ‘install_requires’. The ‘requires’ field lists package names (e.g. used in import statements), while ‘install_requires’ lists project names. It’s not possible to do anything useful with a list of requires, where as a list of project’s that a project requires is quite useful. For example, ‘requires’ lists ‘django’ as a requirement … but there is no such project with that name! However, the ‘Django’ project provides the ‘django’ package.

    3. This is bad:

    import ibm_db
    import ibm_db_dbi
    except ImportError:
    print ”’ibm_db/ibm_db_dbi module is not installed.”’

    It’s sufficient to simply list the imb_db project as a dependency in ‘install_requires’. In many cases, a package can be available for import only after doing PATH manipulation, and so may be installed perfectly fine, but isn’t available for import from

    4. Google Code provides a place to release distributions, but it’s better to use PyPI for releasing all python package distributions. This way the distribution is easier to find, and it can also take advantage of any PyPI mirroring to avoid introducing a single-point of failure at installation.

    5. AFAIK, the Django db backends don’t have to live within the ‘django.db.backends’ namespace. It’s probably better to put this package in it’s own namespace outside of the django.* namespaces. e.g. ‘ibm.django.db’ or some such, especially since ‘django.db.backends’ isn’t declared as a namepsace package.

    Yeah, so python packaging is a bit messy – but work is being done to clean it up. If people have questions, they are welcome to ask them on the packaging mailing list (Distutils-SIG) – this is especially helpful if people can pinpoint where they are being tripped up, so that we can make the Python packaging documentation more easily understood. Ideally, a well packaged Python project shouldn’t need any installation instructions at all – people should just need to know the project name, and feed that into their installation tool of choice (Distutils, easy_install, buildout, pip).

  3. Kevin, I will show your comment to the adapter’s developers. Thanks.

  4. Shawn says:

    Any word on when 9.7 for OS X will be released?

  5. Eric says:

    Is there any intent on keeping the db2 adapter sync to Django’s trunk? Django 1.1 changed the database significantly to add aggregation and I know a LOT of Django sites run on near-trunk Django since there is huge time gaps between releases.

  6. I’ll second most of Kevin’s comments, especially item #4. Third-party code which asks to be inserted into the Django source tree is something to be discouraged in the strongest possible terms, and especially in this case since Django can use database backends from anywhere on the Python path.

  7. Tarun Pasrija says:

    Yes z/OS will be supported in future.

    Thanks for your great comments/suggestions. We appreciate them, so please keep them coming. For #1, #2, #3 these will be corrected. For #4, we will be supporting these from PyPI.

    For #5 and also answering James, it was sure not the intent to be asking for insertion into Django this way :-) (although Jacob’s view is public @ ) We didnt spend any much time on this nitty-gritty. An independent package seems more right though.

    The next release will take care of these.

    Django 1.1 support is what we are working on.

  8. […] compatible. For those using dynamic language frameworks like Ruby on Rails and Zend Framework or Django it should be a no-brainer. You can expect very good performance (better than what you have with […]

  9. Robert says:

    YES! Finally. Thanks IBM 😉

  10. Tarun Pasrija says:


    DB2 support for Django 1.1 is now available. I have just released ibm_db_django-0.1.2 and all the above points about packaging, uploading to pypi etc. have been taken care of. For users who are still using Django 1.0.x code line, our adapter is backward compatible. Would love to hear your comments/suggestions for the same.

    Thanks and Regards
    Tarun Pasrija

  11. […] This version extends its support to the recently released Django 1.1, as well as incorporating the feedback that was received earlier on. (For installation instructions, take a look at the README […]

Leave a Reply

I sincerely welcome and appreciate your comments, whether in agreement or dissenting with my article. However, trolling will not be tolerated. Comments are automatically closed 15 days after the publication of each article.

Copyright © 2005-2014 Antonio Cangiano. All rights reserved.