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 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.
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.
Any idea when z/OS will be supported? Is it on the works?
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 setup.py 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:
try:
import ibm_db
import ibm_db_dbi
except ImportError:
print ”’ibm_db/ibm_db_dbi module is not installed.”’
sys.exit()
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 setup.py.
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).
Kevin, I will show your comment to the adapter’s developers. Thanks.
Any word on when 9.7 for OS X will be released?
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.
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.
@Gonçalo
Yes z/OS will be supported in future.
@Kevin
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 @ http://simonwillison.net/2009/Feb/18/db2/#c43517 ) 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.
@Eric,
Django 1.1 support is what we are working on.
YES! Finally. Thanks IBM 😉
@Antonio
@Kevin
@Eric
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.
http://groups.google.com/group/ibm_db/browse_frm/thread/98c2c700412688
Thanks and Regards
Tarun Pasrija