[BioSQL-l] Python ORM mapping for BioSQL

Nick Loman n.j.loman at bham.ac.uk
Fri Nov 28 17:00:58 UTC 2008


Peter wrote:

>> You can still use Django even if you don't want to modify your database,
>> with the caveat that certain functions (e.g. adding a new taxon via the ORM)
>> will not work correctly. If you are just querying data that still might be
>> sufficiently useful.
> 
> Maybe - but given so much of BioSQL uses composite primary keys etc it
> was my impression that trying to use Django would be making life
> difficult for myself.  If you already are familiar with Django, then
> perhaps this wouldn't be so bad.

Depends again on what you want to do. If you wanted to knock up a quick 
web-based genome viewer for example you might not need to amend (or even 
access) the taxon table as it would be pre-populated. And if you REALLY 
had to, you could just fashion some SQL to do it.

>> ... but I would commend Django to anyone using Python who wants an
>> ORM - particularly if they are building a dynamic web site!
> 
> I agree but ONLY if you are not trying to use an existing schema with
> composite primary keys and/or tables with no primary key.  For these
> SQLAlchemy seems to be the current best bet with python, leading to
> the choice of either TurboGears (which I went for) or Pylons (picked
> by Brad).

Well, I wouldn't be that prescriptive - I would say people can just use 
what they feel comfortable with and they can get good results from 
quickly. I've had good experiences with Django so I wouldn't put people 
off it just because of the primary key issue which can be partially 
solved easily enough with a single ALTER TABLE statement :)

Cheers,

Nick.



More information about the BioSQL-l mailing list