[ensembl-dev] Suggestion for "ensembl_website_XX.release_species"
Youens-Clark, Ken
kclark at cshl.edu
Mon Oct 29 21:49:58 GMT 2012
It would be nice for the PK in the "release_species" table to be an AUTO_INCREMENT field:
alter table release_species modify release_id int unsigned not null auto_increment;
Also, there's a widely varying use of "int" fields in this schema:
`release_id` smallint(5) unsigned NOT NULL AUTO_INCREMENT,
`help_link_id` int(11) NOT NULL AUTO_INCREMENT,
`help_record_id` int(11) DEFAULT NULL,
`help_record_id` int(11) NOT NULL AUTO_INCREMENT,
`help_record_link_id` int(11) NOT NULL AUTO_INCREMENT,
`link_from_id` int(11) NOT NULL DEFAULT '0',
`link_to_id` int(11) NOT NULL DEFAULT '0',
`item_species_id` int(11) NOT NULL DEFAULT '0',
`news_item_id` smallint(5) unsigned NOT NULL DEFAULT '0',
`species_id` smallint(5) unsigned NOT NULL DEFAULT '0',
`news_category_id` int(11) NOT NULL AUTO_INCREMENT,
`news_item_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`release_id` smallint(5) DEFAULT NULL,
`news_category_id` smallint(5) unsigned DEFAULT NULL,
`release_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`species_id` smallint(5) unsigned NOT NULL DEFAULT '0',
`species_id` smallint(5) unsigned NOT NULL AUTO_INCREMENT,
It would be best for all the "_id"/int fields (i.e., those uses as primary and foreign keys) to be exactly the same type and size (for example, if a person wanted to implement this schema using InnoDB).
--
Ken Youens-Clark
kclark at cshl.edu
Ware Lab/CSHL/USDA-ARS
More information about the Dev
mailing list