Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

The API isn't all that matters, though. You have to deal with differences in types, differences in the way foreign keys are dealt with (e.g. in SQLite you can have a foreign key 0, but in Postgres you have to make it nullable and use null), differences in stored procedures. The API alone is minimal compared to the actual functional differences in RDBMS engines.


The API also allows a number of different syntaxes for query parameters: question marks, %-style format codes and one or two others as well and support for any particular style is optional. Last time I checked - a few years ago now - the styles supported by MySQLdb and psycopg were disjoint sets.

Another wart: there is (or was) different named parameters to use when creating a database connection. One driver would use passwd, another would use password, for example.

Those issues aside - and they only bite you if you're using several different databases - I really liked the simplicity of the DB API. Coming from the boilerplate hell that was Java's API it was a godsend.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: