# SQLAlchemy 0.6.5 Documentation

Search:
Version: 0.6.5 Last Updated: 10/24/2010 13:31:44

# MaxDB

Support for the MaxDB database.

This dialect is not ported to SQLAlchemy 0.6.

This dialect is not tested on SQLAlchemy 0.6.

## Overview

The `maxdb` dialect is experimental and has only been tested on 7.6.03.007 and 7.6.00.037. Of these, only 7.6.03.007 will work with SQLAlchemy’s ORM. The earlier version has severe `LEFT JOIN` limitations and will return incorrect results from even very simple ORM queries.

Only the native Python DB-API is currently supported. ODBC driver support is a future enhancement.

## Connecting

The username is case-sensitive. If you usually connect to the database with sqlcli and other tools in lower case, you likely need to use upper case for DB-API.

## Implementation Notes

Also check the DatabaseNotes page on the wiki for detailed information.

With the 7.6.00.37 driver and Python 2.5, it seems that all DB-API generated exceptions are broken and can cause Python to crash.

For ‘somecol.in_([])’ to work, the IN operator’s generation must be changed to cast ‘NULL’ to a numeric, i.e. NUM(NULL). The DB-API doesn’t accept a bind parameter there, so that particular generation must inline the NULL value, which depends on [ticket:807].

The DB-API is very picky about where bind params may be used in queries.

Bind params for some functions (e.g. MOD) need type information supplied. The dialect does not yet do this automatically.

Max will occasionally throw up ‘bad sql, compile again’ exceptions for perfectly valid SQL. The dialect does not currently handle these, more research is needed.

MaxDB 7.5 and Sap DB <= 7.4 reportedly do not support schemas. A very slightly different version of this dialect would be required to support those versions, and can easily be added if there is demand. Some other required components such as an Max-aware ‘old oracle style’ join compiler (thetas with (+) outer indicators) are already done and available for integration- email the devel list if you’re interested in working on this.