I've spent the past days starting a MonetDB backend for SQLAlchemy. My code is currently attached to ticket 874.
Here are my thoughts after spending a bit hacking out the backend (which is really slightly usable if you have nightly of Monetdb):
- I was thinking writing the backend would require me knowing indepths the guts of how monetdb handled sql. It turned out to be pretty easy. I just used kdiff3 to look at the backends of firebird and sqlite (since they were short). The basic idea of a backend is to wrap dbtypes to SQL statements (when used in columns) and convert types back to native python types when pulled out of queries. Then there is a Dialect object that knows how to reflect ones database. Most of my time was really spent getting that working. The only other thing that (so far) has proved annoying is auto increment columns, I'm using a combination of 4 booleans to determine that (including one called autoincrement....).
- Though SA has a big wrapper around unittest that gave me a few minutes pause, I finally figured it out. Writing unittests was a great way to get some basic functionality.
- It'd be nice if SA included a SQL99 or basic compliance testsuite for all the backends. All the tests appear to be silos of tests that may or may not overlap. I pulled/modified tests from sqlite and mysql for monetdb and there wasn't much/any overlap in those tests...
- On that note I started writing doctests against the documentation for SA. This revealed a bug in monetdb, that hopefully should get fixed soon.
- So, while the code is still in a nascent state, testing (both unit and doc) have allowed me to progress quite far and quickly.
- The Monetdb people have been a pleasure to work with. They have been swift to answer questions and fix bugs (3 so far...).
- One final note. The world of opensource is small. I previously had the pleasure of working with one of the monetdb dev's on a non-python, non-db related opensource project. Cool how you can run into great developers again.
So if you are in the market for a column-oriented db and using python (and feeling brave and adventurous) give the new backend a try.