Monday, September 28, 2009

Python database abstraction


Even do I am going cover to cover (when I feel like it) in a Python book I sometimes likes to make a exception. This is one of those exceptions. I already have covered ADOdb in a previous blogpost. As you might recall I wrote a piece on on ADOdb in combination with PHP.

However I discovered that ADOdb is also available for Python. Now you have the option to write ADOdb statements and this abstraction layer will create the correct syntax when you deploy it on your database. Meaning that if you ever switch from a MS-sql database to a Oracle database you will not have to revise all your code. Simply tell the abstraction layer that it now should talk Oracle SQL instead of MS SQL and you are in business.


No comments: