SQLAlchemy is the most promising ORM tool which supports a variety of DBs (SQLite, MySQL, Postrgres, ORACLE and MS-SQL). The SQLAlchemy provides a layer between your business logic and DB. It supports data mapping between table and user classes, one-to-many and many-to-many relationships, mapping your objects to SQL rows, etc. Their web site has excellent documentation, but I found another tutorial as well, you can see it at http://www.rmunn.com/sqlalchemy-tutorial/tutorial.html

I used this tool to prototype the DBS server. Code can be found in attachment. It's fully functional, but may be slightly out of development curve (schema, API) due to rapid development of DBS system. I was mostly interesting in SQL abstraction layer for DBS, rather on full server implementation. The transport layer (with either XML, SOAP messages) can be added on top of that. As a simple example I've used CherryPy toolkit for basic server/client model. A full model is very similar to Ruby on Rails (or turbogears) and written in python w/ python tools. Three databases were successfully tested: SQLite, MySQL and ORACLE. Please note, it's a prototype code and no benchmarks available at this time.

-- ValentinKuznetsov - 05 May 2006

Topic attachments
I Attachment Action Size Date Who Comment
DBSCherryClient.py.txttxt DBSCherryClient.py.txt manage 2 K 23 Jun 2006 - 20:41 ValentinKuznetsov A simple CherryPy client
DBSCherryServer.py.txttxt DBSCherryServer.py.txt manage 4 K 23 Jun 2006 - 20:41 ValentinKuznetsov A simple CherryPy server
XMLToDict.py.txttxt XMLToDict.py.txt manage 5 K 23 Jun 2006 - 20:42 ValentinKuznetsov A simple dictionary <=> XML converter
manager.py.txttxt manager.py.txt manage 35 K 23 Jun 2006 - 20:30 ValentinKuznetsov DBS manager (it's not a server per se, but provide full access to DB)
tables.py.txttxt tables.py.txt manage 16 K 23 Jun 2006 - 20:29 ValentinKuznetsov DBS schema definition
This topic: HEP/SWIG > WebHome > CmsDbs > ObjectRelationalTools > SQLAlchemy
Topic revision: 23 Jun 2006, ValentinKuznetsov
This site is powered by FoswikiCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding CLASSE Wiki? Send feedback