[BioSQL-l] Modifications

Hilmar Lapp hlapp@gnf.org
Thu, 12 Sep 2002 12:50:18 -0700


After branch-tagging, I made the following modifications on the HEAD:

- Collapsed Bioentry_Taxa into a FK to Taxa in Bioentry
- Renamed all instances of 'taxa' to 'taxon'
- Renamed Bioentry_Direct_Links to Bioentry_DBLink (please ignore 
case even though MySQL doesn't, hence it's all lower case in the 
DDL), this also made the PK name conform to the naming convention
- Renamed Bioentry_DBLink.Source_Bioentry_Id to Bioentry_Id for 
consistent naming
- Renamed Seqfeature.Seqfeature_Key_Id to Ontology_Term_Id for 
consistent naming
- Renamed Seqfeature_Relationship.Relationship_Type_Id to 
Ontology_Term_Id for consistent naming
- Added column Term_Identifier to Ontology_Term

I also added UKs at several places. The most important is maybe 
(Bioentry_Id,Ontology_Term_Id,Seqfeature_Rank) on Seqfeature. I can 
enumerate the others too, if people don't want to check the DDL.

I also migrated the schema to using the InnoDB table handler and 
enforcing FKs. Most FK constraints now have cascading deletes 
enabled, with the following exceptions:

- FK from Bioentry to Biodatabase
- FK from Bioentry to Taxon
- FK from Seqfeature to Ontology_Term

This is mostly for sanity reasons to protect you from yourself: 
deleting a namespace or species won't zap your database but rather 
raise an error if there are still child records. Similarly deleting 
a feature type won't magically erase all features of that type; if 
people think it's not a problem if it does I can be swayed on this.

More importantly, the consequence of these changes is that for the 
MySQL version you must have at least MySQL 3.23.50 installed. The Pg 
version may fail to auto-generate from the MySQL basis due to a 
richer SQL syntax now being used, I haven't tested the converter on 
that yet.

In case it wasn't obvious, if you want to have a BioSQL schema 
usable with any of the adaptors, check out branch 
bioperl-release-1-1-0, /not/ the HEAD. The HEAD version of the 
schema builds error-free though.

	-hilmar
--
-------------------------------------------------------------
Hilmar Lapp                            email: lapp at gnf.org
GNF, San Diego, Ca. 92121              phone: +1-858-812-1757
-------------------------------------------------------------