Unverified Commit ffedb151 authored by Magali Ruffier's avatar Magali Ruffier Committed by GitHub
Browse files

Merge pull request #347 from marcoooo/ontology_model_updates

Updated ensembl_ontology schema scripts
parents 9222dee8 5f3d6bf5
-- Copyright [1999-2015] Wellcome Trust Sanger Institute and the EMBL-European Bioinformatics Institute
-- Copyright [2016-2018] EMBL-European Bioinformatics Institute
--
-- Licensed under the Apache License, Version 2.0 (the "License");
-- you may not use this file except in compliance with the License.
-- You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agreed to in writing, software
-- distributed under the License is distributed on an "AS IS" BASIS,
-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-- See the License for the specific language governing permissions and
-- limitations under the License.
-- patch_95_96_b.sql
--
-- Title: Update schema version.
--
-- Description:
-- Added fields to Term and Ontology tables
-- Added columns
ALTER TABLE `ontology` ADD COLUMN `title` varchar(255) DEFAULT NULL;
ALTER TABLE `term` ADD COLUMN `iri` text NULL;
ALTER TABLE `meta` DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
ALTER TABLE `ontology` DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
ALTER TABLE `subset` DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
ALTER TABLE `term` DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
ALTER TABLE `synonym` DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
CREATE INDEX ix_closure_subparent_term_id ON closure (`subparent_term_id`);
CREATE INDEX ix_closure_ontology_id ON closure (`ontology_id`);
CREATE INDEX `ix_relation_parent_term_id` ON relation (`parent_term_id`);
CREATE INDEX `ix_relation_relation_type_id` ON relation (`relation_type_id`);
CREATE INDEX `ix_relation_ontology_id` ON relation (`ontology_id`);
\ No newline at end of file
......@@ -18,15 +18,14 @@
-- The schema for the ensembl_ontology_NN database.
-- ---------------------------------------------------------------------
CREATE TABLE meta (
meta_id INT UNSIGNED NOT NULL AUTO_INCREMENT,
meta_key VARCHAR(64) NOT NULL,
meta_value VARCHAR(128),
species_id INT UNSIGNED DEFAULT NULL,
PRIMARY KEY (meta_id),
UNIQUE INDEX key_value_idx (meta_key, meta_value)
) COLLATE=latin1_swedish_ci ENGINE=MyISAM;
CREATE TABLE `meta` (
`meta_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`meta_key` varchar(64) NOT NULL,
`meta_value` varchar(128) DEFAULT NULL,
`species_id` int(10) unsigned DEFAULT NULL,
PRIMARY KEY (`meta_id`),
UNIQUE KEY `key_value_idx` (`meta_key`,`meta_value`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
# Add schema type and schema version to the meta table
INSERT INTO meta (meta_key, meta_value) VALUES
......@@ -38,100 +37,98 @@ INSERT INTO meta (meta_key, meta_value)
VALUES ('patch', 'patch_95_96_a.sql|schema_version');
CREATE TABLE ontology (
ontology_id INT UNSIGNED NOT NULL AUTO_INCREMENT,
name VARCHAR(64) NOT NULL,
namespace VARCHAR(64) NOT NULL,
data_version VARCHAR(64) DEFAULT NULL,
PRIMARY KEY (ontology_id),
UNIQUE INDEX name_namespace_idx (name, namespace)
) COLLATE=latin1_swedish_ci ENGINE=MyISAM;
CREATE TABLE subset (
subset_id INT UNSIGNED NOT NULL AUTO_INCREMENT,
name VARCHAR(64) NOT NULL,
definition VARCHAR(128) NOT NULL,
PRIMARY KEY (subset_id),
UNIQUE INDEX name_idx (name)
) COLLATE=latin1_swedish_ci ENGINE=MyISAM;
CREATE TABLE term (
term_id INT UNSIGNED NOT NULL AUTO_INCREMENT,
ontology_id INT UNSIGNED NOT NULL,
subsets TEXT,
accession VARCHAR(64) NOT NULL,
name VARCHAR(255) NOT NULL,
definition TEXT,
is_root INT NOT NULL DEFAULT 0,
is_obsolete INT NOT NULL DEFAULT 0,
PRIMARY KEY (term_id),
UNIQUE INDEX accession_idx (accession),
UNIQUE INDEX ontology_acc_idx (ontology_id, accession),
INDEX name_idx (name)
) COLLATE=latin1_swedish_ci ENGINE=MyISAM;
CREATE TABLE synonym (
synonym_id INT UNSIGNED NOT NULL AUTO_INCREMENT,
term_id INT UNSIGNED NOT NULL,
name TEXT NOT NULL,
type ENUM('EXACT', 'BROAD', 'NARROW', 'RELATED'),
dbxref VARCHAR(258) NULL,
PRIMARY KEY (synonym_id),
UNIQUE INDEX term_synonym_idx (term_id, synonym_id),
INDEX name_idx (name(50))
) COLLATE=utf8_swedish_ci ENGINE=MyISAM;
CREATE TABLE alt_id (
alt_id INT UNSIGNED NOT NULL AUTO_INCREMENT,
term_id INT UNSIGNED NOT NULL,
accession VARCHAR(64) NOT NULL,
PRIMARY KEY (alt_id),
UNIQUE INDEX term_alt_idx (term_id, alt_id),
INDEX accession_idx (accession(50))
) COLLATE=latin1_swedish_ci ENGINE=MyISAM;
CREATE TABLE relation_type (
relation_type_id INT UNSIGNED NOT NULL AUTO_INCREMENT,
name VARCHAR(64) NOT NULL,
PRIMARY KEY (relation_type_id),
UNIQUE INDEX name_idx (name)
) COLLATE=latin1_swedish_ci ENGINE=MyISAM;
CREATE TABLE relation (
relation_id INT UNSIGNED NOT NULL AUTO_INCREMENT,
child_term_id INT UNSIGNED NOT NULL,
parent_term_id INT UNSIGNED NOT NULL,
relation_type_id INT UNSIGNED NOT NULL,
intersection_of TINYINT UNSIGNED NOT NULL DEFAULT 0,
ontology_id INT UNSIGNED NOT NULL,
PRIMARY KEY (relation_id),
UNIQUE INDEX child_parent_idx
(child_term_id, parent_term_id, relation_type_id, intersection_of, ontology_id),
INDEX parent_idx (parent_term_id)
) COLLATE=latin1_swedish_ci ENGINE=MyISAM;
CREATE TABLE closure (
closure_id INT UNSIGNED NOT NULL AUTO_INCREMENT,
child_term_id INT UNSIGNED NOT NULL,
parent_term_id INT UNSIGNED NOT NULL,
subparent_term_id INT UNSIGNED,
distance TINYINT UNSIGNED NOT NULL,
ontology_id INT UNSIGNED NOT NULL,
confident_relationship BOOL NOT NULL DEFAULT 0,
PRIMARY KEY (closure_id),
UNIQUE INDEX child_parent_idx
(child_term_id, parent_term_id, subparent_term_id, ontology_id),
INDEX parent_subparent_idx
(parent_term_id, subparent_term_id)
) COLLATE=latin1_swedish_ci ENGINE=MyISAM;
CREATE TABLE `ontology` (
`ontology_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`name` varchar(64) NOT NULL,
`namespace` varchar(64) NOT NULL,
`data_version` varchar(64) DEFAULT NULL,
`title` varchar(255) DEFAULT NULL,
PRIMARY KEY (`ontology_id`),
UNIQUE KEY `ontology_name_namespace_idx` (`name`,`namespace`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
CREATE TABLE `subset` (
`subset_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`name` varchar(64) NOT NULL,
`definition` varchar(511) NOT NULL DEFAULT '',
PRIMARY KEY (`subset_id`),
UNIQUE KEY `name` (`name`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
CREATE TABLE `term` (
`term_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`ontology_id` int(10) unsigned NOT NULL,
`subsets` text,
`accession` varchar(64) NOT NULL,
`name` varchar(255) COLLATE utf8_general_ci NOT NULL,
`definition` text COLLATE utf8_general_ci,
`is_root` int(11) NOT NULL DEFAULT 0,
`is_obsolete` int(11) NOT NULL DEFAULT 0,
`iri` text,
PRIMARY KEY (`term_id`),
UNIQUE KEY `accession` (`accession`),
UNIQUE KEY `term_ontology_acc_idx` (`ontology_id`,`accession`),
KEY `term_name_idx` (`name`(100))
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
CREATE TABLE `synonym` (
`synonym_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`term_id` int(10) unsigned NOT NULL,
`name` text COLLATE utf8_general_ci NOT NULL,
`type` enum('EXACT','BROAD','NARROW','RELATED') DEFAULT NULL,
`dbxref` varchar(500) DEFAULT NULL,
PRIMARY KEY (`synonym_id`),
UNIQUE KEY `synonym_term_idx` (`term_id`,`synonym_id`),
KEY `synonym_name_idx` (`name`(100))
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
CREATE TABLE `alt_id` (
`alt_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`term_id` int(10) unsigned NOT NULL,
`accession` varchar(64) NOT NULL,
PRIMARY KEY (`alt_id`),
UNIQUE KEY `term_alt_idx` (`term_id`,`alt_id`),
KEY `ix_alt_id_accession` (`accession`)
) ENGINE=MyISAM;
CREATE TABLE `relation_type` (
`relation_type_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`name` varchar(64) NOT NULL,
PRIMARY KEY (`relation_type_id`),
UNIQUE KEY `name` (`name`)
) ENGINE=MyISAM;
CREATE TABLE `relation` (
`relation_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`child_term_id` int(10) unsigned NOT NULL,
`parent_term_id` int(10) unsigned NOT NULL,
`relation_type_id` int(10) unsigned NOT NULL,
`intersection_of` tinyint(1) NOT NULL,
`ontology_id` int(10) unsigned NOT NULL,
PRIMARY KEY (`relation_id`),
UNIQUE KEY `child_parent_idx` (`child_term_id`,`parent_term_id`,`relation_type_id`,`intersection_of`,`ontology_id`),
KEY `ix_relation_parent_term_id` (`parent_term_id`),
KEY `ix_relation_relation_type_id` (`relation_type_id`),
KEY `ix_relation_ontology_id` (`ontology_id`)
) ENGINE=MyISAM;
CREATE TABLE `closure` (
`closure_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`child_term_id` int(10) unsigned NOT NULL,
`parent_term_id` int(10) unsigned NOT NULL,
`subparent_term_id` int(10) unsigned DEFAULT NULL,
`distance` tinyint(3) unsigned NOT NULL,
`ontology_id` int(10) unsigned NOT NULL,
`confident_relationship` tinyint(1) NOT NULL,
PRIMARY KEY (`closure_id`),
UNIQUE KEY `closure_child_parent_idx` (`child_term_id`,`parent_term_id`,`subparent_term_id`,`ontology_id`),
KEY `ix_closure_subparent_term_id` (`subparent_term_id`),
KEY `ix_closure_ontology_id` (`ontology_id`),
KEY `parent_subparent_idx` (`parent_term_id`,`subparent_term_id`)
) ENGINE=MyISAM;
-- There are additional tables in the released databases called
-- "aux_XX_YY_map". These are created by the "add_subset_maps.pl"
......
......@@ -4,120 +4,120 @@ CREATE TABLE `alt_id` (
`accession` varchar(64) NOT NULL,
PRIMARY KEY (`alt_id`),
UNIQUE KEY `term_alt_idx` (`term_id`,`alt_id`),
KEY `accession_idx` (`accession`(50))
) ENGINE=MyISAM AUTO_INCREMENT=7 DEFAULT CHARSET=latin1;
KEY `ix_alt_id_accession` (`accession`)
) ENGINE=MyISAM AUTO_INCREMENT=7;
CREATE TABLE `aux_GO_Cross_product_review_map` (
`term_id` int(10) unsigned NOT NULL,
`subset_term_id` int(10) unsigned NOT NULL,
`distance` tinyint(3) unsigned NOT NULL,
UNIQUE KEY `map_idx` (`term_id`,`subset_term_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
CREATE TABLE `aux_GO_goslim_aspergillus_map` (
`term_id` int(10) unsigned NOT NULL,
`subset_term_id` int(10) unsigned NOT NULL,
`distance` tinyint(3) unsigned NOT NULL,
UNIQUE KEY `map_idx` (`term_id`,`subset_term_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
CREATE TABLE `aux_GO_goslim_candida_map` (
`term_id` int(10) unsigned NOT NULL,
`subset_term_id` int(10) unsigned NOT NULL,
`distance` tinyint(3) unsigned NOT NULL,
UNIQUE KEY `map_idx` (`term_id`,`subset_term_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
CREATE TABLE `aux_GO_goslim_generic_map` (
`term_id` int(10) unsigned NOT NULL,
`subset_term_id` int(10) unsigned NOT NULL,
`distance` tinyint(3) unsigned NOT NULL,
UNIQUE KEY `map_idx` (`term_id`,`subset_term_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
CREATE TABLE `aux_GO_goslim_metagenomics_map` (
`term_id` int(10) unsigned NOT NULL,
`subset_term_id` int(10) unsigned NOT NULL,
`distance` tinyint(3) unsigned NOT NULL,
UNIQUE KEY `map_idx` (`term_id`,`subset_term_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
CREATE TABLE `aux_GO_goslim_pir_map` (
`term_id` int(10) unsigned NOT NULL,
`subset_term_id` int(10) unsigned NOT NULL,
`distance` tinyint(3) unsigned NOT NULL,
UNIQUE KEY `map_idx` (`term_id`,`subset_term_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
CREATE TABLE `aux_GO_goslim_plant_map` (
`term_id` int(10) unsigned NOT NULL,
`subset_term_id` int(10) unsigned NOT NULL,
`distance` tinyint(3) unsigned NOT NULL,
UNIQUE KEY `map_idx` (`term_id`,`subset_term_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
CREATE TABLE `aux_GO_goslim_pombe_map` (
`term_id` int(10) unsigned NOT NULL,
`subset_term_id` int(10) unsigned NOT NULL,
`distance` tinyint(3) unsigned NOT NULL,
UNIQUE KEY `map_idx` (`term_id`,`subset_term_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
CREATE TABLE `aux_GO_goslim_yeast_map` (
`term_id` int(10) unsigned NOT NULL,
`subset_term_id` int(10) unsigned NOT NULL,
`distance` tinyint(3) unsigned NOT NULL,
UNIQUE KEY `map_idx` (`term_id`,`subset_term_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
CREATE TABLE `aux_GO_gosubset_prok_map` (
`term_id` int(10) unsigned NOT NULL,
`subset_term_id` int(10) unsigned NOT NULL,
`distance` tinyint(3) unsigned NOT NULL,
UNIQUE KEY `map_idx` (`term_id`,`subset_term_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
CREATE TABLE `aux_GO_high_level_annotation_qc_map` (
`term_id` int(10) unsigned NOT NULL,
`subset_term_id` int(10) unsigned NOT NULL,
`distance` tinyint(3) unsigned NOT NULL,
UNIQUE KEY `map_idx` (`term_id`,`subset_term_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
CREATE TABLE `aux_GO_mf_needs_review_map` (
`term_id` int(10) unsigned NOT NULL,
`subset_term_id` int(10) unsigned NOT NULL,
`distance` tinyint(3) unsigned NOT NULL,
UNIQUE KEY `map_idx` (`term_id`,`subset_term_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
CREATE TABLE `aux_GO_virus_checked_map` (
`term_id` int(10) unsigned NOT NULL,
`subset_term_id` int(10) unsigned NOT NULL,
`distance` tinyint(3) unsigned NOT NULL,
UNIQUE KEY `map_idx` (`term_id`,`subset_term_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
CREATE TABLE `aux_SO_DBVAR_map` (
`term_id` int(10) unsigned NOT NULL,
`subset_term_id` int(10) unsigned NOT NULL,
`distance` tinyint(3) unsigned NOT NULL,
UNIQUE KEY `map_idx` (`term_id`,`subset_term_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
CREATE TABLE `aux_SO_SOFA_map` (
`term_id` int(10) unsigned NOT NULL,
`subset_term_id` int(10) unsigned NOT NULL,
`distance` tinyint(3) unsigned NOT NULL,
UNIQUE KEY `map_idx` (`term_id`,`subset_term_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
CREATE TABLE `aux_SO_biosapiens_map` (
`term_id` int(10) unsigned NOT NULL,
`subset_term_id` int(10) unsigned NOT NULL,
`distance` tinyint(3) unsigned NOT NULL,
UNIQUE KEY `map_idx` (`term_id`,`subset_term_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
CREATE TABLE `closure` (
`closure_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
......@@ -126,80 +126,86 @@ CREATE TABLE `closure` (
`subparent_term_id` int(10) unsigned DEFAULT NULL,
`distance` tinyint(3) unsigned NOT NULL,
`ontology_id` int(10) unsigned NOT NULL,
`confident_relationship` tinyint(1) NOT NULL DEFAULT '0',
`confident_relationship` tinyint(1) NOT NULL,
PRIMARY KEY (`closure_id`),
UNIQUE KEY `child_parent_idx` (`child_term_id`,`parent_term_id`,`subparent_term_id`,`ontology_id`),
UNIQUE KEY `closure_child_parent_idx` (`child_term_id`,`parent_term_id`,`subparent_term_id`,`ontology_id`),
KEY `ix_closure_subparent_term_id` (`subparent_term_id`),
KEY `ix_closure_ontology_id` (`ontology_id`),
KEY `parent_subparent_idx` (`parent_term_id`,`subparent_term_id`)
) ENGINE=MyISAM AUTO_INCREMENT=1453438 DEFAULT CHARSET=latin1;
) ENGINE=MyISAM AUTO_INCREMENT=1453438;
CREATE TABLE `meta` (
`meta_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`meta_key` varchar(64) NOT NULL,
`meta_value` varchar(128) DEFAULT NULL,
`species_id` int(1) unsigned DEFAULT NULL,
`species_id` int(10) unsigned DEFAULT NULL,
PRIMARY KEY (`meta_id`),
UNIQUE KEY `key_value_idx` (`meta_key`,`meta_value`)
) ENGINE=MyISAM AUTO_INCREMENT=44 DEFAULT CHARSET=latin1;
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=44;
CREATE TABLE `ontology` (
`ontology_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`name` varchar(64) NOT NULL,
`namespace` varchar(64) NOT NULL,
`data_version` varchar(64) DEFAULT NULL,
`title` varchar(255) DEFAULT NULL,
PRIMARY KEY (`ontology_id`),
UNIQUE KEY `name_namespace_idx` (`name`,`namespace`)
) ENGINE=MyISAM AUTO_INCREMENT=8 DEFAULT CHARSET=latin1;
UNIQUE KEY `ontology_name_namespace_idx` (`name`,`namespace`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=8;
CREATE TABLE `relation` (
`relation_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`child_term_id` int(10) unsigned NOT NULL,
`parent_term_id` int(10) unsigned NOT NULL,
`relation_type_id` int(10) unsigned NOT NULL,
`intersection_of` tinyint(3) unsigned NOT NULL DEFAULT '0',
`intersection_of` tinyint(1) NOT NULL,
`ontology_id` int(10) unsigned NOT NULL,
PRIMARY KEY (`relation_id`),
UNIQUE KEY `child_parent_idx` (`child_term_id`,`parent_term_id`,`relation_type_id`,`intersection_of`,`ontology_id`),
KEY `parent_idx` (`parent_term_id`)
) ENGINE=MyISAM AUTO_INCREMENT=68750 DEFAULT CHARSET=latin1;
KEY `ix_relation_parent_term_id` (`parent_term_id`),
KEY `ix_relation_relation_type_id` (`relation_type_id`),
KEY `ix_relation_ontology_id` (`ontology_id`)
) ENGINE=MyISAM AUTO_INCREMENT=68750;
CREATE TABLE `relation_type` (
`relation_type_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`name` varchar(64) NOT NULL,
PRIMARY KEY (`relation_type_id`),
UNIQUE KEY `name_idx` (`name`)
) ENGINE=MyISAM AUTO_INCREMENT=85 DEFAULT CHARSET=latin1;
UNIQUE KEY `name` (`name`)
) ENGINE=MyISAM AUTO_INCREMENT=85;
CREATE TABLE `subset` (
`subset_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`name` varchar(64) NOT NULL,
`definition` varchar(128) NOT NULL,
`definition` varchar(511) NOT NULL DEFAULT '',
PRIMARY KEY (`subset_id`),
UNIQUE KEY `name_idx` (`name`)
) ENGINE=MyISAM AUTO_INCREMENT=18 DEFAULT CHARSET=latin1;
UNIQUE KEY `name` (`name`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=18;
CREATE TABLE `synonym` (
`synonym_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`term_id` int(10) unsigned NOT NULL,
`name` mediumtext COLLATE utf8_swedish_ci NOT NULL,
`type` enum('EXACT','BROAD','NARROW','RELATED') COLLATE utf8_swedish_ci DEFAULT NULL,
`dbxref` varchar(256) COLLATE utf8_swedish_ci NOT NULL,
`name` text COLLATE utf8_general_ci NOT NULL,
`type` enum('EXACT','BROAD','NARROW','RELATED') DEFAULT NULL,
`dbxref` varchar(500) DEFAULT NULL,
PRIMARY KEY (`synonym_id`),
UNIQUE KEY `term_synonym_idx` (`term_id`,`synonym_id`),
KEY `name_idx` (`name`(50))
) ENGINE=MyISAM AUTO_INCREMENT=104283 DEFAULT CHARSET=utf8 COLLATE=utf8_swedish_ci;
UNIQUE KEY `synonym_term_idx` (`term_id`,`synonym_id`),
KEY `synonym_name_idx` (`name`(100))
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=104283;
CREATE TABLE `term` (
`term_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`ontology_id` int(10) unsigned NOT NULL,
`subsets` text,
`accession` varchar(64) NOT NULL,
`name` varchar(255) NOT NULL,
`definition` text,
`is_root` int(11) DEFAULT NULL,
`is_obsolete` int(11) DEFAULT NULL,
`name` varchar(255) COLLATE utf8_general_ci NOT NULL,
`definition` text COLLATE utf8_general_ci,
`is_root` int(11) NOT NULL DEFAULT 0,
`is_obsolete` int(11) NOT NULL DEFAULT 0,
`iri` text,
PRIMARY KEY (`term_id`),
UNIQUE KEY `accession_idx` (`accession`),
UNIQUE KEY `ontology_acc_idx` (`ontology_id`,`accession`),
KEY `name_idx` (`name`)
) ENGINE=MyISAM AUTO_INCREMENT=45001 DEFAULT CHARSET=latin1;
UNIQUE KEY `accession` (`accession`),
UNIQUE KEY `term_ontology_acc_idx` (`ontology_id`,`accession`),
KEY `term_name_idx` (`name`(100))
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=45001;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment