[BioSQL-l] Tables without a (composite) primary key

Peter biopython at maubp.freeserve.co.uk
Fri Nov 7 18:35:31 UTC 2008


I've ruled out using Django v1.0 and the current version of SQLObjects
with BioSQL as they don't (yet) support composite primary keys.
However, SQLAlchemy 0.5.0 seems to be happy with the current BioSQL
schema as is :)

http://www.djangoproject.com/  http://www.sqlobject.org/
http://www.sqlalchemy.org/

Hilmar:
>> BioSQL 1.1+ will have surrogate PKs on all tables, but this change may not
>> be backwards compatible for existing language bindings, which is why I'd
>> like to make those changes first that should be fully backwards compatible.

Peter:
> That sounds sensible.

Actually I may have initially misunderstood you.

Are you saying for tables which already have a composite primary key
(e.g. term_dbxref) you plan to add/replace this with a surrogate
(single column) PK - just to accommodate certain simplistic ORMs?  I'm
not so keen on this, it seems like an invasive change with little
benefit, but potentially making lots of work updating the Bio*
bindings.

However, would the smaller step of adding composite primary keys to
tables currently lacking them be possible on the BioSQL v1.0.x
roadmap? e.g. for taxon_name using (taxon_id,name,name_class) as the
composite primary key, currently specified to be unique. Or might this
also cause trouble for the Bio* binding?  If this was possible, it
*might* be useful for certain ORMs.

Was there a reason why tables like taxon_name never had a
(composite/compound) primary key in the first place?

Peter



More information about the BioSQL-l mailing list