From: <sco...@us...> - 2010-08-25 20:26:26
|
Revision: 23699 http://gmod.svn.sourceforge.net/gmod/?rev=23699&view=rev Author: scottcain Date: 2010-08-25 20:26:10 +0000 (Wed, 25 Aug 2010) Log Message: ----------- updating default schemas for changes in natdiv module Modified Paths: -------------- schema/trunk/chado/modules/default_nofuncs.sql schema/trunk/chado/modules/default_schema.sql Modified: schema/trunk/chado/modules/default_nofuncs.sql =================================================================== --- schema/trunk/chado/modules/default_nofuncs.sql 2010-08-20 19:02:14 UTC (rev 23698) +++ schema/trunk/chado/modules/default_nofuncs.sql 2010-08-25 20:26:10 UTC (rev 23699) @@ -3811,7 +3811,7 @@ -- represent geo information. CREATE TABLE nd_geolocation ( - geolocation_id serial PRIMARY KEY NOT NULL, + nd_geolocation_id serial PRIMARY KEY NOT NULL, description character varying(255), latitude real, longitude real, @@ -3834,55 +3834,55 @@ -CREATE TABLE nd_assay ( - assay_id serial PRIMARY KEY NOT NULL, - geolocation_id integer NOT NULL references nd_geolocation (geolocation_id) on delete cascade INITIALLY DEFERRED, +CREATE TABLE nd_experiment ( + nd_experiment_id serial PRIMARY KEY NOT NULL, + nd_geolocation_id integer NOT NULL references nd_geolocation (nd_geolocation_id) on delete cascade INITIALLY DEFERRED, type_id integer NOT NULL references cvterm (cvterm_id) on delete cascade INITIALLY DEFERRED ); -- ---used to be nd_diversityexperiemnt_project -CREATE TABLE nd_assay_project ( - assay_project_id serial PRIMARY KEY NOT NULL, +--used to be nd_diversityexperiment_project +--then was nd_assay_project +CREATE TABLE nd_experiment_project ( + nd_experiment_project_id serial PRIMARY KEY NOT NULL, project_id integer not null references project (project_id) on delete cascade INITIALLY DEFERRED, - assay_id integer NOT NULL references nd_assay (assay_id) on delete cascade INITIALLY DEFERRED + nd_experiment_id integer NOT NULL references nd_experiment (nd_experiment_id) on delete cascade INITIALLY DEFERRED ); -CREATE TABLE nd_assayprop ( - assayprop_id serial PRIMARY KEY NOT NULL, - assay_id integer NOT NULL references nd_assay (assay_id) on delete cascade INITIALLY DEFERRED, +CREATE TABLE nd_experimentprop ( + nd_experimentprop_id serial PRIMARY KEY NOT NULL, + nd_experiment_id integer NOT NULL references nd_experiment (nd_experiment_id) on delete cascade INITIALLY DEFERRED, cvterm_id integer NOT NULL references cvterm (cvterm_id) on delete cascade INITIALLY DEFERRED , value character varying(255) NOT NULL, rank integer NOT NULL default 0, - constraint nd_assayprop_c1 unique (assay_id,cvterm_id,rank) + constraint nd_experimentprop_c1 unique (nd_experiment_id,cvterm_id,rank) ); -create table nd_assay_pub ( - assay_pub_id serial not null, - primary key (assay_pub_id), - assay_id int not null, - foreign key (assay_id) references nd_assay (assay_id) on delete cascade INITIALLY DEFERRED, +create table nd_experiment_pub ( + nd_experiment_pub_id serial PRIMARY KEY not null, + nd_experiment_id int not null, + foreign key (nd_experiment_id) references nd_experiment (nd_experiment_id) on delete cascade INITIALLY DEFERRED, pub_id int not null, foreign key (pub_id) references pub (pub_id) on delete cascade INITIALLY DEFERRED, - constraint assay_pub_c1 unique (assay_id,pub_id) + constraint nd_experiment_pub_c1 unique (nd_experiment_id,pub_id) ); -create index assay_pub_idx1 on nd_assay_pub (assay_id); -create index assay_pub_idx2 on nd_assay_pub (pub_id); +create index nd_experiment_pub_idx1 on nd_experiment_pub (nd_experiment_id); +create index nd_experiment_pub_idx2 on nd_experiment_pub (pub_id); -COMMENT ON TABLE nd_assay_pub IS 'Linking nd_assay(s) to publication(s)'; +COMMENT ON TABLE nd_experiment_pub IS 'Linking nd_experiment(s) to publication(s)'; CREATE TABLE nd_geolocationprop ( - geolocationprop_id serial PRIMARY KEY NOT NULL, - geolocation_id integer NOT NULL references nd_geolocation (geolocation_id) on delete cascade INITIALLY DEFERRED, + nd_geolocationprop_id serial PRIMARY KEY NOT NULL, + nd_geolocation_id integer NOT NULL references nd_geolocation (nd_geolocation_id) on delete cascade INITIALLY DEFERRED, cvterm_id integer NOT NULL references cvterm (cvterm_id) on delete cascade INITIALLY DEFERRED, value character varying(250), - rank integer NOT NULL, - constraint nd_geolocationprop_c1 unique (geolocation_id,cvterm_id,rank) + rank integer NOT NULL DEFAULT 0, + constraint nd_geolocationprop_c1 unique (nd_geolocation_id,cvterm_id,rank) ); COMMENT ON TABLE nd_geolocationprop IS 'Property/value associations for geolocations. This table can store the properties such as location and environment'; @@ -3895,22 +3895,22 @@ CREATE TABLE nd_protocol ( - protocol_id serial PRIMARY KEY NOT NULL, + nd_protocol_id serial PRIMARY KEY NOT NULL, name character varying(255) NOT NULL unique ); -COMMENT ON TABLE nd_protocol IS 'A protocol can be anything that is done as part of the assay.'; +COMMENT ON TABLE nd_protocol IS 'A protocol can be anything that is done as part of the experiment.'; COMMENT ON COLUMN nd_protocol.name IS 'The protocol name.'; CREATE TABLE nd_reagent ( - reagent_id serial PRIMARY KEY NOT NULL, + nd_reagent_id serial PRIMARY KEY NOT NULL, name character varying(80) NOT NULL, type_id integer NOT NULL references cvterm (cvterm_id) on delete cascade INITIALLY DEFERRED, feature_id integer ); -COMMENT ON TABLE nd_reagent IS 'A reagent such as a primer, an enzyme, an adapter oligo, a linker oligo. Reagents are used in genotyping assays, or in any other kind of assay.'; +COMMENT ON TABLE nd_reagent IS 'A reagent such as a primer, an enzyme, an adapter oligo, a linker oligo. Reagents are used in genotyping experiments, or in any other kind of experiment.'; COMMENT ON COLUMN nd_reagent.name IS 'The name of the reagent. The name should be unique for a given type.'; @@ -3921,25 +3921,25 @@ CREATE TABLE nd_protocol_reagent ( - protocol_reagent_id serial PRIMARY KEY NOT NULL, - protocol_id integer NOT NULL references nd_protocol (protocol_id) on delete cascade INITIALLY DEFERRED, - reagent_id integer NOT NULL references nd_reagent (reagent_id) on delete cascade INITIALLY DEFERRED, + nd_protocol_reagent_id serial PRIMARY KEY NOT NULL, + nd_protocol_id integer NOT NULL references nd_protocol (nd_protocol_id) on delete cascade INITIALLY DEFERRED, + reagent_id integer NOT NULL references nd_reagent (nd_reagent_id) on delete cascade INITIALLY DEFERRED, type_id integer NOT NULL references cvterm (cvterm_id) on delete cascade INITIALLY DEFERRED ); CREATE TABLE nd_protocolprop ( - protocolprop_id serial PRIMARY KEY NOT NULL, - protocol_id integer NOT NULL references nd_protocol (protocol_id) on delete cascade INITIALLY DEFERRED, + nd_protocolprop_id serial PRIMARY KEY NOT NULL, + nd_protocol_id integer NOT NULL references nd_protocol (nd_protocol_id) on delete cascade INITIALLY DEFERRED, cvterm_id integer NOT NULL references cvterm (cvterm_id) on delete cascade INITIALLY DEFERRED, value character varying(255), rank integer DEFAULT 0 NOT NULL, - constraint nd_protocolprop_c1 unique (protocol_id,cvterm_id,rank) + constraint nd_protocolprop_c1 unique (nd_protocol_id,cvterm_id,rank) ); COMMENT ON TABLE nd_protocolprop IS 'Property/value associations for protocol.'; -COMMENT ON COLUMN nd_protocolprop.protocol_id IS 'The protocol to which the property applies.'; +COMMENT ON COLUMN nd_protocolprop.nd_protocol_id IS 'The protocol to which the property applies.'; COMMENT ON COLUMN nd_protocolprop.cvterm_id IS 'The name of the property as a reference to a controlled vocabulary term.'; @@ -3949,53 +3949,53 @@ -CREATE TABLE nd_assay_stock ( - assay_stock_id serial PRIMARY KEY NOT NULL, - assay_id integer NOT NULL references nd_assay (assay_id) on delete cascade INITIALLY DEFERRED, +CREATE TABLE nd_experiment_stock ( + nd_experiment_stock_id serial PRIMARY KEY NOT NULL, + nd_experiment_id integer NOT NULL references nd_experiment (nd_experiment_id) on delete cascade INITIALLY DEFERRED, stock_id integer NOT NULL references stock (stock_id) on delete cascade INITIALLY DEFERRED, type_id integer NOT NULL references cvterm (cvterm_id) on delete cascade INITIALLY DEFERRED ); -COMMENT ON TABLE nd_assay_stock IS 'Part of a stock or a clone of a stock that is used in an assay'; +COMMENT ON TABLE nd_experiment_stock IS 'Part of a stock or a clone of a stock that is used in an experiment'; -COMMENT ON COLUMN nd_assay_stock.stock_id IS 'stock used in the extraction or the corresponding stock for the clone'; +COMMENT ON COLUMN nd_experiment_stock.stock_id IS 'stock used in the extraction or the corresponding stock for the clone'; -CREATE TABLE nd_assay_protocol ( - assay_protocol_id serial PRIMARY KEY NOT NULL, - assay_id integer NOT NULL references nd_assay (assay_id) on delete cascade INITIALLY DEFERRED, - protocol_id integer NOT NULL references nd_protocol (protocol_id) on delete cascade INITIALLY DEFERRED +CREATE TABLE nd_experiment_protocol ( + nd_experiment_protocol_id serial PRIMARY KEY NOT NULL, + nd_experiment_id integer NOT NULL references nd_experiment (nd_experiment_id) on delete cascade INITIALLY DEFERRED, + nd_protocol_id integer NOT NULL references nd_protocol (nd_protocol_id) on delete cascade INITIALLY DEFERRED ); -COMMENT ON TABLE nd_assay_protocol IS 'Linking table: assays to the protocols they involve.'; +COMMENT ON TABLE nd_experiment_protocol IS 'Linking table: experiments to the protocols they involve.'; -CREATE TABLE nd_assay_phenotype ( - assay_phenotype_id serial PRIMARY KEY NOT NULL, - assay_id integer NOT NULL UNIQUE REFERENCES nd_assay (assay_id) on delete cascade INITIALLY DEFERRED, +CREATE TABLE nd_experiment_phenotype ( + nd_experiment_phenotype_id serial PRIMARY KEY NOT NULL, + nd_experiment_id integer NOT NULL UNIQUE REFERENCES nd_experiment (nd_experiment_id) on delete cascade INITIALLY DEFERRED, phenotype_id integer NOT NULL references phenotype (phenotype_id) on delete cascade INITIALLY DEFERRED ); -COMMENT ON TABLE nd_assay_phenotype IS 'Linking table: assays to the phenotypes they produce. There is a one-to-one relationship between an assay and a phenotype since each phenotype record should point to one assay. Add a new assay_id for each phenotype record.'; +COMMENT ON TABLE nd_experiment_phenotype IS 'Linking table: experiments to the phenotypes they produce. There is a one-to-one relationship between an experiment and a phenotype since each phenotype record should point to one experiment. Add a new experiment_id for each phenotype record.'; -CREATE TABLE nd_assay_genotype ( - assay_genotype_id serial PRIMARY KEY NOT NULL, - assay_id integer NOT NULL UNIQUE references nd_assay (assay_id) on delete cascade INITIALLY DEFERRED, +CREATE TABLE nd_experiment_genotype ( + nd_experiment_genotype_id serial PRIMARY KEY NOT NULL, + nd_experiment_id integer NOT NULL UNIQUE references nd_experiment (nd_experiment_id) on delete cascade INITIALLY DEFERRED, genotype_id integer NOT NULL references genotype (genotype_id) on delete cascade INITIALLY DEFERRED ); -COMMENT ON TABLE nd_assay_genotype IS 'Linking table: assays to the genotypes they produce. There is a one-to-one relationship between an assay and a genotype since each genotype record should point to one assay. Add a new assay_id for each genotype record.'; +COMMENT ON TABLE nd_experiment_genotype IS 'Linking table: experiments to the genotypes they produce. There is a one-to-one relationship between an experiment and a genotype since each genotype record should point to one experiment. Add a new experiment_id for each genotype record.'; CREATE TABLE nd_reagent_relationship ( - reagent_relationship_id serial PRIMARY KEY NOT NULL, - subject_reagent_id integer NOT NULL references nd_reagent (reagent_id) on delete cascade INITIALLY DEFERRED, - object_reagent_id integer NOT NULL references nd_reagent (reagent_id) on delete cascade INITIALLY DEFERRED, + nd_reagent_relationship_id serial PRIMARY KEY NOT NULL, + subject_reagent_id integer NOT NULL references nd_reagent (nd_reagent_id) on delete cascade INITIALLY DEFERRED, + object_reagent_id integer NOT NULL references nd_reagent (nd_reagent_id) on delete cascade INITIALLY DEFERRED, type_id integer NOT NULL references cvterm (cvterm_id) on delete cascade INITIALLY DEFERRED ); -COMMENT ON TABLE nd_reagent_relationship IS 'Relationships between reagents. Some reagents form a group. i.e., they are used all together or not at all. Examples are adapter/linker/enzyme assay reagents.'; +COMMENT ON TABLE nd_reagent_relationship IS 'Relationships between reagents. Some reagents form a group. i.e., they are used all together or not at all. Examples are adapter/linker/enzyme experiment reagents.'; COMMENT ON COLUMN nd_reagent_relationship.subject_reagent_id IS 'The subject reagent in the relationship. In parent/child terminology, the subject is the child. For example, in "linkerA 3prime-overhang-linker enzymeA" linkerA is the subject, 3prime-overhand-linker is the type, and enzymeA is the object.'; @@ -4005,55 +4005,55 @@ CREATE TABLE nd_reagentprop ( - reagentprop_id serial PRIMARY KEY NOT NULL, - reagent_id integer NOT NULL references nd_reagent (reagent_id) on delete cascade INITIALLY DEFERRED, + nd_reagentprop_id serial PRIMARY KEY NOT NULL, + nd_reagent_id integer NOT NULL references nd_reagent (nd_reagent_id) on delete cascade INITIALLY DEFERRED, cvterm_id integer NOT NULL references cvterm (cvterm_id) on delete cascade INITIALLY DEFERRED, value character varying(255), rank integer DEFAULT 0 NOT NULL, - constraint nd_reagentprop_c1 unique (reagent_id,cvterm_id,rank) + constraint nd_reagentprop_c1 unique (nd_reagent_id,cvterm_id,rank) ); -CREATE TABLE nd_assay_stockprop ( - assay_stockprop_id serial PRIMARY KEY NOT NULL, - assay_stock_id integer NOT NULL references nd_assay_stock (assay_stock_id) on delete cascade INITIALLY DEFERRED, +CREATE TABLE nd_experiment_stockprop ( + nd_experiment_stockprop_id serial PRIMARY KEY NOT NULL, + nd_experiment_stock_id integer NOT NULL references nd_experiment_stock (nd_experiment_stock_id) on delete cascade INITIALLY DEFERRED, cvterm_id integer NOT NULL references cvterm (cvterm_id) on delete cascade INITIALLY DEFERRED, value character varying(255), rank integer DEFAULT 0 NOT NULL, - constraint nd_assay_stockprop_c1 unique (assay_stock_id,cvterm_id,rank) + constraint nd_experiment_stockprop_c1 unique (nd_experiment_stock_id,cvterm_id,rank) ); -COMMENT ON TABLE nd_assay_stockprop IS 'Property/value associations for assay_stocks. This table can store the properties such as treatment'; +COMMENT ON TABLE nd_experiment_stockprop IS 'Property/value associations for experiment_stocks. This table can store the properties such as treatment'; -COMMENT ON COLUMN nd_assay_stockprop.assay_stock_id IS 'The assay_stock to which the property applies.'; +COMMENT ON COLUMN nd_experiment_stockprop.nd_experiment_stock_id IS 'The experiment_stock to which the property applies.'; -COMMENT ON COLUMN nd_assay_stockprop.cvterm_id IS 'The name of the property as a reference to a controlled vocabulary term.'; +COMMENT ON COLUMN nd_experiment_stockprop.cvterm_id IS 'The name of the property as a reference to a controlled vocabulary term.'; -COMMENT ON COLUMN nd_assay_stockprop.value IS 'The value of the property.'; +COMMENT ON COLUMN nd_experiment_stockprop.value IS 'The value of the property.'; -COMMENT ON COLUMN nd_assay_stockprop.rank IS 'The rank of the property value, if the property has an array of values.'; +COMMENT ON COLUMN nd_experiment_stockprop.rank IS 'The rank of the property value, if the property has an array of values.'; -CREATE TABLE nd_assay_stock_dbxref ( - assay_stock_dbxref_id serial PRIMARY KEY NOT NULL, - assay_stock_id integer NOT NULL references nd_assay_stock (assay_stock_id) on delete cascade INITIALLY DEFERRED, +CREATE TABLE nd_experiment_stock_dbxref ( + nd_experiment_stock_dbxref_id serial PRIMARY KEY NOT NULL, + nd_experiment_stock_id integer NOT NULL references nd_experiment_stock (nd_experiment_stock_id) on delete cascade INITIALLY DEFERRED, dbxref_id integer NOT NULL references dbxref (dbxref_id) on delete cascade INITIALLY DEFERRED ); -COMMENT ON TABLE nd_assay_stock_dbxref IS 'Cross-reference assay_stock to accessions, images, etc'; +COMMENT ON TABLE nd_experiment_stock_dbxref IS 'Cross-reference experiment_stock to accessions, images, etc'; -CREATE TABLE nd_assay_dbxref ( - assay_dbxref_id serial PRIMARY KEY NOT NULL, - assay_id integer NOT NULL references nd_assay (assay_id) on delete cascade INITIALLY DEFERRED, +CREATE TABLE nd_experiment_dbxref ( + nd_experiment_dbxref_id serial PRIMARY KEY NOT NULL, + nd_experiment_id integer NOT NULL references nd_experiment (nd_experiment_id) on delete cascade INITIALLY DEFERRED, dbxref_id integer NOT NULL references dbxref (dbxref_id) on delete cascade INITIALLY DEFERRED ); -COMMENT ON TABLE nd_assay_dbxref IS 'Cross-reference assay to accessions, images, etc'; +COMMENT ON TABLE nd_experiment_dbxref IS 'Cross-reference experiment to accessions, images, etc'; -CREATE TABLE nd_assay_contact ( - assay_contact_id serial PRIMARY KEY NOT NULL, - assay_id integer NOT NULL references nd_assay (assay_id) on delete cascade INITIALLY DEFERRED, +CREATE TABLE nd_experiment_contact ( + nd_experiment_contact_id serial PRIMARY KEY NOT NULL, + nd_experiment_id integer NOT NULL references nd_experiment (nd_experiment_id) on delete cascade INITIALLY DEFERRED, contact_id integer NOT NULL references contact (contact_id) on delete cascade INITIALLY DEFERRED ); Modified: schema/trunk/chado/modules/default_schema.sql =================================================================== --- schema/trunk/chado/modules/default_schema.sql 2010-08-20 19:02:14 UTC (rev 23698) +++ schema/trunk/chado/modules/default_schema.sql 2010-08-25 20:26:10 UTC (rev 23699) @@ -36634,6 +36634,18 @@ -- -- y -- +-- OR, you could execute this command (the materialized view tool has been +-- updated to allow this all to be supplied on the command line): +-- +-- (yes, it's all one really long line, to make copy and pasting easier) +-- gmod_materialized_view_tool.pl --create_view --view_name all_feature_names --table_name public.all_feature_names --refresh_time daily --column_def "feature_id integer,name varchar(255),organism_id integer" --sql_query "SELECT feature_id,CAST(substring(uniquename from 0 for 255) as varchar(255)) as name,organism_id FROM feature UNION SELECT feature_id, name, organism_id FROM feature where name is not null UNION SELECT fs.feature_id,s.name,f.organism_id FROM feature_synonym fs, synonym s, feature f WHERE fs.synonym_id = s.synonym_id AND fs.feature_id = f.feature_id UNION SELECT fp.feature_id, CAST(substring(fp.value from 0 for 255) as varchar(255)) as name,f.organism_id FROM featureprop fp, feature f WHERE f.feature_id = fp.feature_id UNION SELECT fd.feature_id, d.accession, f.organism_id FROM feature_dbxref fd, dbxref d,feature f WHERE fd.dbxref_id = d.dbxref_id AND fd.feature_id = f.feature_id" --index_fields "feature_id,name" --special_index "create index all_feature_names_lower_name on all_feature_names (lower(name))" --yes +-- +-- +-- OR, even more complicated, you could use this command to create a materialized view +-- for use with full text searching on PostgreSQL 8.4 or better: +-- +-- gmod_materialized_view_tool.pl --create_view --view_name all_feature_names --table_name public.all_feature_names --refresh_time daily --column_def "feature_id integer,name varchar(255),organism_id integer,searchable_name tsvector" --sql_query "SELECT feature_id, CAST(substring(uniquename FROM 0 FOR 255) AS varchar(255)) AS name, organism_id, to_tsvector('english', CAST(substring(uniquename FROM 0 FOR 255) AS varchar(255))) AS searchable_name FROM feature UNION SELECT feature_id, name, organism_id, to_tsvector('english', name) AS searchable_name FROM feature WHERE name IS NOT NULL UNION SELECT fs.feature_id, s.name, f.organism_id, to_tsvector('english', s.name) AS searchable_name FROM feature_synonym fs, synonym s, feature f WHERE fs.synonym_id = s.synonym_id AND fs.feature_id = f.feature_id UNION SELECT fp.feature_id, CAST(substring(fp.value FROM 0 FOR 255) AS varchar(255)) AS name, f.organism_id, to_tsvector('english',CAST(substring(fp.value FROM 0 FOR 255) AS varchar(255))) AS searchable_name FROM featureprop fp, feature f WHERE f.feature_id = fp.feature_id UNION SELECT fd.feature_id, d.accession, f.organism_id,to_tsvector('english',d.accession) AS searchable_name FROM feature_dbxref fd, dbxref d,feature f WHERE fd.dbxref_id = d.dbxref_id AND fd.feature_id = f.feature_id" --index_fields "feature_id,name" --special_index "CREATE INDEX searchable_all_feature_names_idx ON all_feature_names USING gin(searchable_name)" --yes +-- CREATE OR REPLACE VIEW all_feature_names ( feature_id, name, @@ -36993,7 +37005,7 @@ -- represent geo information. CREATE TABLE nd_geolocation ( - geolocation_id serial PRIMARY KEY NOT NULL, + nd_geolocation_id serial PRIMARY KEY NOT NULL, description character varying(255), latitude real, longitude real, @@ -37016,55 +37028,55 @@ -CREATE TABLE nd_assay ( - assay_id serial PRIMARY KEY NOT NULL, - geolocation_id integer NOT NULL references nd_geolocation (geolocation_id) on delete cascade INITIALLY DEFERRED, +CREATE TABLE nd_experiment ( + nd_experiment_id serial PRIMARY KEY NOT NULL, + nd_geolocation_id integer NOT NULL references nd_geolocation (nd_geolocation_id) on delete cascade INITIALLY DEFERRED, type_id integer NOT NULL references cvterm (cvterm_id) on delete cascade INITIALLY DEFERRED ); -- ---used to be nd_diversityexperiemnt_project -CREATE TABLE nd_assay_project ( - assay_project_id serial PRIMARY KEY NOT NULL, +--used to be nd_diversityexperiment_project +--then was nd_assay_project +CREATE TABLE nd_experiment_project ( + nd_experiment_project_id serial PRIMARY KEY NOT NULL, project_id integer not null references project (project_id) on delete cascade INITIALLY DEFERRED, - assay_id integer NOT NULL references nd_assay (assay_id) on delete cascade INITIALLY DEFERRED + nd_experiment_id integer NOT NULL references nd_experiment (nd_experiment_id) on delete cascade INITIALLY DEFERRED ); -CREATE TABLE nd_assayprop ( - assayprop_id serial PRIMARY KEY NOT NULL, - assay_id integer NOT NULL references nd_assay (assay_id) on delete cascade INITIALLY DEFERRED, +CREATE TABLE nd_experimentprop ( + nd_experimentprop_id serial PRIMARY KEY NOT NULL, + nd_experiment_id integer NOT NULL references nd_experiment (nd_experiment_id) on delete cascade INITIALLY DEFERRED, cvterm_id integer NOT NULL references cvterm (cvterm_id) on delete cascade INITIALLY DEFERRED , value character varying(255) NOT NULL, rank integer NOT NULL default 0, - constraint nd_assayprop_c1 unique (assay_id,cvterm_id,rank) + constraint nd_experimentprop_c1 unique (nd_experiment_id,cvterm_id,rank) ); -create table nd_assay_pub ( - assay_pub_id serial not null, - primary key (assay_pub_id), - assay_id int not null, - foreign key (assay_id) references nd_assay (assay_id) on delete cascade INITIALLY DEFERRED, +create table nd_experiment_pub ( + nd_experiment_pub_id serial PRIMARY KEY not null, + nd_experiment_id int not null, + foreign key (nd_experiment_id) references nd_experiment (nd_experiment_id) on delete cascade INITIALLY DEFERRED, pub_id int not null, foreign key (pub_id) references pub (pub_id) on delete cascade INITIALLY DEFERRED, - constraint assay_pub_c1 unique (assay_id,pub_id) + constraint nd_experiment_pub_c1 unique (nd_experiment_id,pub_id) ); -create index assay_pub_idx1 on nd_assay_pub (assay_id); -create index assay_pub_idx2 on nd_assay_pub (pub_id); +create index nd_experiment_pub_idx1 on nd_experiment_pub (nd_experiment_id); +create index nd_experiment_pub_idx2 on nd_experiment_pub (pub_id); -COMMENT ON TABLE nd_assay_pub IS 'Linking nd_assay(s) to publication(s)'; +COMMENT ON TABLE nd_experiment_pub IS 'Linking nd_experiment(s) to publication(s)'; CREATE TABLE nd_geolocationprop ( - geolocationprop_id serial PRIMARY KEY NOT NULL, - geolocation_id integer NOT NULL references nd_geolocation (geolocation_id) on delete cascade INITIALLY DEFERRED, + nd_geolocationprop_id serial PRIMARY KEY NOT NULL, + nd_geolocation_id integer NOT NULL references nd_geolocation (nd_geolocation_id) on delete cascade INITIALLY DEFERRED, cvterm_id integer NOT NULL references cvterm (cvterm_id) on delete cascade INITIALLY DEFERRED, value character varying(250), - rank integer NOT NULL, - constraint nd_geolocationprop_c1 unique (geolocation_id,cvterm_id,rank) + rank integer NOT NULL DEFAULT 0, + constraint nd_geolocationprop_c1 unique (nd_geolocation_id,cvterm_id,rank) ); COMMENT ON TABLE nd_geolocationprop IS 'Property/value associations for geolocations. This table can store the properties such as location and environment'; @@ -37077,22 +37089,22 @@ CREATE TABLE nd_protocol ( - protocol_id serial PRIMARY KEY NOT NULL, + nd_protocol_id serial PRIMARY KEY NOT NULL, name character varying(255) NOT NULL unique ); -COMMENT ON TABLE nd_protocol IS 'A protocol can be anything that is done as part of the assay.'; +COMMENT ON TABLE nd_protocol IS 'A protocol can be anything that is done as part of the experiment.'; COMMENT ON COLUMN nd_protocol.name IS 'The protocol name.'; CREATE TABLE nd_reagent ( - reagent_id serial PRIMARY KEY NOT NULL, + nd_reagent_id serial PRIMARY KEY NOT NULL, name character varying(80) NOT NULL, type_id integer NOT NULL references cvterm (cvterm_id) on delete cascade INITIALLY DEFERRED, feature_id integer ); -COMMENT ON TABLE nd_reagent IS 'A reagent such as a primer, an enzyme, an adapter oligo, a linker oligo. Reagents are used in genotyping assays, or in any other kind of assay.'; +COMMENT ON TABLE nd_reagent IS 'A reagent such as a primer, an enzyme, an adapter oligo, a linker oligo. Reagents are used in genotyping experiments, or in any other kind of experiment.'; COMMENT ON COLUMN nd_reagent.name IS 'The name of the reagent. The name should be unique for a given type.'; @@ -37103,25 +37115,25 @@ CREATE TABLE nd_protocol_reagent ( - protocol_reagent_id serial PRIMARY KEY NOT NULL, - protocol_id integer NOT NULL references nd_protocol (protocol_id) on delete cascade INITIALLY DEFERRED, - reagent_id integer NOT NULL references nd_reagent (reagent_id) on delete cascade INITIALLY DEFERRED, + nd_protocol_reagent_id serial PRIMARY KEY NOT NULL, + nd_protocol_id integer NOT NULL references nd_protocol (nd_protocol_id) on delete cascade INITIALLY DEFERRED, + reagent_id integer NOT NULL references nd_reagent (nd_reagent_id) on delete cascade INITIALLY DEFERRED, type_id integer NOT NULL references cvterm (cvterm_id) on delete cascade INITIALLY DEFERRED ); CREATE TABLE nd_protocolprop ( - protocolprop_id serial PRIMARY KEY NOT NULL, - protocol_id integer NOT NULL references nd_protocol (protocol_id) on delete cascade INITIALLY DEFERRED, + nd_protocolprop_id serial PRIMARY KEY NOT NULL, + nd_protocol_id integer NOT NULL references nd_protocol (nd_protocol_id) on delete cascade INITIALLY DEFERRED, cvterm_id integer NOT NULL references cvterm (cvterm_id) on delete cascade INITIALLY DEFERRED, value character varying(255), rank integer DEFAULT 0 NOT NULL, - constraint nd_protocolprop_c1 unique (protocol_id,cvterm_id,rank) + constraint nd_protocolprop_c1 unique (nd_protocol_id,cvterm_id,rank) ); COMMENT ON TABLE nd_protocolprop IS 'Property/value associations for protocol.'; -COMMENT ON COLUMN nd_protocolprop.protocol_id IS 'The protocol to which the property applies.'; +COMMENT ON COLUMN nd_protocolprop.nd_protocol_id IS 'The protocol to which the property applies.'; COMMENT ON COLUMN nd_protocolprop.cvterm_id IS 'The name of the property as a reference to a controlled vocabulary term.'; @@ -37131,53 +37143,53 @@ -CREATE TABLE nd_assay_stock ( - assay_stock_id serial PRIMARY KEY NOT NULL, - assay_id integer NOT NULL references nd_assay (assay_id) on delete cascade INITIALLY DEFERRED, +CREATE TABLE nd_experiment_stock ( + nd_experiment_stock_id serial PRIMARY KEY NOT NULL, + nd_experiment_id integer NOT NULL references nd_experiment (nd_experiment_id) on delete cascade INITIALLY DEFERRED, stock_id integer NOT NULL references stock (stock_id) on delete cascade INITIALLY DEFERRED, type_id integer NOT NULL references cvterm (cvterm_id) on delete cascade INITIALLY DEFERRED ); -COMMENT ON TABLE nd_assay_stock IS 'Part of a stock or a clone of a stock that is used in an assay'; +COMMENT ON TABLE nd_experiment_stock IS 'Part of a stock or a clone of a stock that is used in an experiment'; -COMMENT ON COLUMN nd_assay_stock.stock_id IS 'stock used in the extraction or the corresponding stock for the clone'; +COMMENT ON COLUMN nd_experiment_stock.stock_id IS 'stock used in the extraction or the corresponding stock for the clone'; -CREATE TABLE nd_assay_protocol ( - assay_protocol_id serial PRIMARY KEY NOT NULL, - assay_id integer NOT NULL references nd_assay (assay_id) on delete cascade INITIALLY DEFERRED, - protocol_id integer NOT NULL references nd_protocol (protocol_id) on delete cascade INITIALLY DEFERRED +CREATE TABLE nd_experiment_protocol ( + nd_experiment_protocol_id serial PRIMARY KEY NOT NULL, + nd_experiment_id integer NOT NULL references nd_experiment (nd_experiment_id) on delete cascade INITIALLY DEFERRED, + nd_protocol_id integer NOT NULL references nd_protocol (nd_protocol_id) on delete cascade INITIALLY DEFERRED ); -COMMENT ON TABLE nd_assay_protocol IS 'Linking table: assays to the protocols they involve.'; +COMMENT ON TABLE nd_experiment_protocol IS 'Linking table: experiments to the protocols they involve.'; -CREATE TABLE nd_assay_phenotype ( - assay_phenotype_id serial PRIMARY KEY NOT NULL, - assay_id integer NOT NULL UNIQUE REFERENCES nd_assay (assay_id) on delete cascade INITIALLY DEFERRED, +CREATE TABLE nd_experiment_phenotype ( + nd_experiment_phenotype_id serial PRIMARY KEY NOT NULL, + nd_experiment_id integer NOT NULL UNIQUE REFERENCES nd_experiment (nd_experiment_id) on delete cascade INITIALLY DEFERRED, phenotype_id integer NOT NULL references phenotype (phenotype_id) on delete cascade INITIALLY DEFERRED ); -COMMENT ON TABLE nd_assay_phenotype IS 'Linking table: assays to the phenotypes they produce. There is a one-to-one relationship between an assay and a phenotype since each phenotype record should point to one assay. Add a new assay_id for each phenotype record.'; +COMMENT ON TABLE nd_experiment_phenotype IS 'Linking table: experiments to the phenotypes they produce. There is a one-to-one relationship between an experiment and a phenotype since each phenotype record should point to one experiment. Add a new experiment_id for each phenotype record.'; -CREATE TABLE nd_assay_genotype ( - assay_genotype_id serial PRIMARY KEY NOT NULL, - assay_id integer NOT NULL UNIQUE references nd_assay (assay_id) on delete cascade INITIALLY DEFERRED, +CREATE TABLE nd_experiment_genotype ( + nd_experiment_genotype_id serial PRIMARY KEY NOT NULL, + nd_experiment_id integer NOT NULL UNIQUE references nd_experiment (nd_experiment_id) on delete cascade INITIALLY DEFERRED, genotype_id integer NOT NULL references genotype (genotype_id) on delete cascade INITIALLY DEFERRED ); -COMMENT ON TABLE nd_assay_genotype IS 'Linking table: assays to the genotypes they produce. There is a one-to-one relationship between an assay and a genotype since each genotype record should point to one assay. Add a new assay_id for each genotype record.'; +COMMENT ON TABLE nd_experiment_genotype IS 'Linking table: experiments to the genotypes they produce. There is a one-to-one relationship between an experiment and a genotype since each genotype record should point to one experiment. Add a new experiment_id for each genotype record.'; CREATE TABLE nd_reagent_relationship ( - reagent_relationship_id serial PRIMARY KEY NOT NULL, - subject_reagent_id integer NOT NULL references nd_reagent (reagent_id) on delete cascade INITIALLY DEFERRED, - object_reagent_id integer NOT NULL references nd_reagent (reagent_id) on delete cascade INITIALLY DEFERRED, + nd_reagent_relationship_id serial PRIMARY KEY NOT NULL, + subject_reagent_id integer NOT NULL references nd_reagent (nd_reagent_id) on delete cascade INITIALLY DEFERRED, + object_reagent_id integer NOT NULL references nd_reagent (nd_reagent_id) on delete cascade INITIALLY DEFERRED, type_id integer NOT NULL references cvterm (cvterm_id) on delete cascade INITIALLY DEFERRED ); -COMMENT ON TABLE nd_reagent_relationship IS 'Relationships between reagents. Some reagents form a group. i.e., they are used all together or not at all. Examples are adapter/linker/enzyme assay reagents.'; +COMMENT ON TABLE nd_reagent_relationship IS 'Relationships between reagents. Some reagents form a group. i.e., they are used all together or not at all. Examples are adapter/linker/enzyme experiment reagents.'; COMMENT ON COLUMN nd_reagent_relationship.subject_reagent_id IS 'The subject reagent in the relationship. In parent/child terminology, the subject is the child. For example, in "linkerA 3prime-overhang-linker enzymeA" linkerA is the subject, 3prime-overhand-linker is the type, and enzymeA is the object.'; @@ -37187,55 +37199,55 @@ CREATE TABLE nd_reagentprop ( - reagentprop_id serial PRIMARY KEY NOT NULL, - reagent_id integer NOT NULL references nd_reagent (reagent_id) on delete cascade INITIALLY DEFERRED, + nd_reagentprop_id serial PRIMARY KEY NOT NULL, + nd_reagent_id integer NOT NULL references nd_reagent (nd_reagent_id) on delete cascade INITIALLY DEFERRED, cvterm_id integer NOT NULL references cvterm (cvterm_id) on delete cascade INITIALLY DEFERRED, value character varying(255), rank integer DEFAULT 0 NOT NULL, - constraint nd_reagentprop_c1 unique (reagent_id,cvterm_id,rank) + constraint nd_reagentprop_c1 unique (nd_reagent_id,cvterm_id,rank) ); -CREATE TABLE nd_assay_stockprop ( - assay_stockprop_id serial PRIMARY KEY NOT NULL, - assay_stock_id integer NOT NULL references nd_assay_stock (assay_stock_id) on delete cascade INITIALLY DEFERRED, +CREATE TABLE nd_experiment_stockprop ( + nd_experiment_stockprop_id serial PRIMARY KEY NOT NULL, + nd_experiment_stock_id integer NOT NULL references nd_experiment_stock (nd_experiment_stock_id) on delete cascade INITIALLY DEFERRED, cvterm_id integer NOT NULL references cvterm (cvterm_id) on delete cascade INITIALLY DEFERRED, value character varying(255), rank integer DEFAULT 0 NOT NULL, - constraint nd_assay_stockprop_c1 unique (assay_stock_id,cvterm_id,rank) + constraint nd_experiment_stockprop_c1 unique (nd_experiment_stock_id,cvterm_id,rank) ); -COMMENT ON TABLE nd_assay_stockprop IS 'Property/value associations for assay_stocks. This table can store the properties such as treatment'; +COMMENT ON TABLE nd_experiment_stockprop IS 'Property/value associations for experiment_stocks. This table can store the properties such as treatment'; -COMMENT ON COLUMN nd_assay_stockprop.assay_stock_id IS 'The assay_stock to which the property applies.'; +COMMENT ON COLUMN nd_experiment_stockprop.nd_experiment_stock_id IS 'The experiment_stock to which the property applies.'; -COMMENT ON COLUMN nd_assay_stockprop.cvterm_id IS 'The name of the property as a reference to a controlled vocabulary term.'; +COMMENT ON COLUMN nd_experiment_stockprop.cvterm_id IS 'The name of the property as a reference to a controlled vocabulary term.'; -COMMENT ON COLUMN nd_assay_stockprop.value IS 'The value of the property.'; +COMMENT ON COLUMN nd_experiment_stockprop.value IS 'The value of the property.'; -COMMENT ON COLUMN nd_assay_stockprop.rank IS 'The rank of the property value, if the property has an array of values.'; +COMMENT ON COLUMN nd_experiment_stockprop.rank IS 'The rank of the property value, if the property has an array of values.'; -CREATE TABLE nd_assay_stock_dbxref ( - assay_stock_dbxref_id serial PRIMARY KEY NOT NULL, - assay_stock_id integer NOT NULL references nd_assay_stock (assay_stock_id) on delete cascade INITIALLY DEFERRED, +CREATE TABLE nd_experiment_stock_dbxref ( + nd_experiment_stock_dbxref_id serial PRIMARY KEY NOT NULL, + nd_experiment_stock_id integer NOT NULL references nd_experiment_stock (nd_experiment_stock_id) on delete cascade INITIALLY DEFERRED, dbxref_id integer NOT NULL references dbxref (dbxref_id) on delete cascade INITIALLY DEFERRED ); -COMMENT ON TABLE nd_assay_stock_dbxref IS 'Cross-reference assay_stock to accessions, images, etc'; +COMMENT ON TABLE nd_experiment_stock_dbxref IS 'Cross-reference experiment_stock to accessions, images, etc'; -CREATE TABLE nd_assay_dbxref ( - assay_dbxref_id serial PRIMARY KEY NOT NULL, - assay_id integer NOT NULL references nd_assay (assay_id) on delete cascade INITIALLY DEFERRED, +CREATE TABLE nd_experiment_dbxref ( + nd_experiment_dbxref_id serial PRIMARY KEY NOT NULL, + nd_experiment_id integer NOT NULL references nd_experiment (nd_experiment_id) on delete cascade INITIALLY DEFERRED, dbxref_id integer NOT NULL references dbxref (dbxref_id) on delete cascade INITIALLY DEFERRED ); -COMMENT ON TABLE nd_assay_dbxref IS 'Cross-reference assay to accessions, images, etc'; +COMMENT ON TABLE nd_experiment_dbxref IS 'Cross-reference experiment to accessions, images, etc'; -CREATE TABLE nd_assay_contact ( - assay_contact_id serial PRIMARY KEY NOT NULL, - assay_id integer NOT NULL references nd_assay (assay_id) on delete cascade INITIALLY DEFERRED, +CREATE TABLE nd_experiment_contact ( + nd_experiment_contact_id serial PRIMARY KEY NOT NULL, + nd_experiment_id integer NOT NULL references nd_experiment (nd_experiment_id) on delete cascade INITIALLY DEFERRED, contact_id integer NOT NULL references contact (contact_id) on delete cascade INITIALLY DEFERRED ); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sco...@us...> - 2010-10-21 18:48:00
|
Revision: 24015 http://gmod.svn.sourceforge.net/gmod/?rev=24015&view=rev Author: scottcain Date: 2010-10-21 18:47:50 +0000 (Thu, 21 Oct 2010) Log Message: ----------- in the process of updating the default schema--need to finish on a different machine (no graphviz on this computer) Modified Paths: -------------- schema/trunk/chado/modules/default_nofuncs.sql schema/trunk/chado/modules/default_schema.sql schema/trunk/chado/modules/nofuncs.html schema/trunk/chado/modules/project/project.html Modified: schema/trunk/chado/modules/default_nofuncs.sql =================================================================== --- schema/trunk/chado/modules/default_nofuncs.sql 2010-10-21 17:24:04 UTC (rev 24014) +++ schema/trunk/chado/modules/default_nofuncs.sql 2010-10-21 18:47:50 UTC (rev 24015) @@ -2211,11 +2211,11 @@ PRIMARY KEY (projectprop_id), project_id integer NOT NULL, FOREIGN KEY (project_id) REFERENCES project (project_id) ON DELETE CASCADE, - cvterm_id integer NOT NULL, - FOREIGN KEY (cvterm_id) REFERENCES cvterm (cvterm_id) ON DELETE CASCADE, + type_id integer NOT NULL, + FOREIGN KEY (type_id) REFERENCES cvterm (cvterm_id) ON DELETE CASCADE, value text, rank integer not null default 0, - CONSTRAINT projectprop_c1 UNIQUE (project_id, cvterm_id, rank) + CONSTRAINT projectprop_c1 UNIQUE (project_id, type_id, rank) ); -- ================================================ @@ -3397,6 +3397,33 @@ COMMENT ON TABLE stockcollection_stock IS 'stockcollection_stock links a stock collection to the stocks which are contained in the collection.'; + + + +-- ================================================ +-- TABLE: stock_dbxrefprop +-- ================================================ + +create table stock_dbxrefprop ( + stock_dbxrefprop_id serial not null, + primary key (stock_dbxrefprop_id), + stock_dbxref_id int not null, + foreign key (stock_dbxref_id) references stock_dbxref (stock_dbxref_id) on delete cascade INITIALLY DEFERRED, + type_id int not null, + foreign key (type_id) references cvterm (cvterm_id) on delete cascade INITIALLY DEFERRED, + value text null, + rank int not null default 0, + constraint stock_dbxrefprop_c1 unique (stock_dbxref_id,type_id,rank) +); +create index stock_dbxrefprop_idx1 on stock_dbxrefprop (stock_dbxref_id); +create index stock_dbxrefprop_idx2 on stock_dbxrefprop (type_id); + +COMMENT ON TABLE stock_dbxrefprop IS 'A stock_dbxref can have any number of +slot-value property tags attached to it. This is useful for storing properties related to dbxref annotations of stocks, such as evidence codes, and references, and metadata, such as create/modify dates. This is an alternative to +hardcoding a list of columns in the relational schema, and is +completely extensible. There is a unique constraint, stock_dbxrefprop_c1, for +the combination of stock_dbxref_id, rank, and type_id. Multivalued property-value pairs must be differentiated by rank.'; + -- $Id: library.sql,v 1.10 2008-03-25 16:00:43 emmert Exp $ -- ================================================================= -- Dependencies: @@ -3854,10 +3881,10 @@ CREATE TABLE nd_experimentprop ( nd_experimentprop_id serial PRIMARY KEY NOT NULL, nd_experiment_id integer NOT NULL references nd_experiment (nd_experiment_id) on delete cascade INITIALLY DEFERRED, - cvterm_id integer NOT NULL references cvterm (cvterm_id) on delete cascade INITIALLY DEFERRED , + type_id integer NOT NULL references cvterm (cvterm_id) on delete cascade INITIALLY DEFERRED , value character varying(255) NOT NULL, rank integer NOT NULL default 0, - constraint nd_experimentprop_c1 unique (nd_experiment_id,cvterm_id,rank) + constraint nd_experimentprop_c1 unique (nd_experiment_id,type_id,rank) ); create table nd_experiment_pub ( @@ -3879,15 +3906,15 @@ CREATE TABLE nd_geolocationprop ( nd_geolocationprop_id serial PRIMARY KEY NOT NULL, nd_geolocation_id integer NOT NULL references nd_geolocation (nd_geolocation_id) on delete cascade INITIALLY DEFERRED, - cvterm_id integer NOT NULL references cvterm (cvterm_id) on delete cascade INITIALLY DEFERRED, + type_id integer NOT NULL references cvterm (cvterm_id) on delete cascade INITIALLY DEFERRED, value character varying(250), rank integer NOT NULL DEFAULT 0, - constraint nd_geolocationprop_c1 unique (nd_geolocation_id,cvterm_id,rank) + constraint nd_geolocationprop_c1 unique (nd_geolocation_id,type_id,rank) ); COMMENT ON TABLE nd_geolocationprop IS 'Property/value associations for geolocations. This table can store the properties such as location and environment'; -COMMENT ON COLUMN nd_geolocationprop.cvterm_id IS 'The name of the property as a reference to a controlled vocabulary term.'; +COMMENT ON COLUMN nd_geolocationprop.type_id IS 'The name of the property as a reference to a controlled vocabulary term.'; COMMENT ON COLUMN nd_geolocationprop.value IS 'The value of the property.'; @@ -3931,17 +3958,17 @@ CREATE TABLE nd_protocolprop ( nd_protocolprop_id serial PRIMARY KEY NOT NULL, nd_protocol_id integer NOT NULL references nd_protocol (nd_protocol_id) on delete cascade INITIALLY DEFERRED, - cvterm_id integer NOT NULL references cvterm (cvterm_id) on delete cascade INITIALLY DEFERRED, + type_id integer NOT NULL references cvterm (cvterm_id) on delete cascade INITIALLY DEFERRED, value character varying(255), rank integer DEFAULT 0 NOT NULL, - constraint nd_protocolprop_c1 unique (nd_protocol_id,cvterm_id,rank) + constraint nd_protocolprop_c1 unique (nd_protocol_id,type_id,rank) ); COMMENT ON TABLE nd_protocolprop IS 'Property/value associations for protocol.'; COMMENT ON COLUMN nd_protocolprop.nd_protocol_id IS 'The protocol to which the property applies.'; -COMMENT ON COLUMN nd_protocolprop.cvterm_id IS 'The name of the property as a reference to a controlled vocabulary term.'; +COMMENT ON COLUMN nd_protocolprop.type_id IS 'The name of the property as a reference to a controlled vocabulary term.'; COMMENT ON COLUMN nd_protocolprop.value IS 'The value of the property.'; @@ -4007,26 +4034,26 @@ CREATE TABLE nd_reagentprop ( nd_reagentprop_id serial PRIMARY KEY NOT NULL, nd_reagent_id integer NOT NULL references nd_reagent (nd_reagent_id) on delete cascade INITIALLY DEFERRED, - cvterm_id integer NOT NULL references cvterm (cvterm_id) on delete cascade INITIALLY DEFERRED, + type_id integer NOT NULL references cvterm (cvterm_id) on delete cascade INITIALLY DEFERRED, value character varying(255), rank integer DEFAULT 0 NOT NULL, - constraint nd_reagentprop_c1 unique (nd_reagent_id,cvterm_id,rank) + constraint nd_reagentprop_c1 unique (nd_reagent_id,type_id,rank) ); CREATE TABLE nd_experiment_stockprop ( nd_experiment_stockprop_id serial PRIMARY KEY NOT NULL, nd_experiment_stock_id integer NOT NULL references nd_experiment_stock (nd_experiment_stock_id) on delete cascade INITIALLY DEFERRED, - cvterm_id integer NOT NULL references cvterm (cvterm_id) on delete cascade INITIALLY DEFERRED, + type_id integer NOT NULL references cvterm (cvterm_id) on delete cascade INITIALLY DEFERRED, value character varying(255), rank integer DEFAULT 0 NOT NULL, - constraint nd_experiment_stockprop_c1 unique (nd_experiment_stock_id,cvterm_id,rank) + constraint nd_experiment_stockprop_c1 unique (nd_experiment_stock_id,type_id,rank) ); COMMENT ON TABLE nd_experiment_stockprop IS 'Property/value associations for experiment_stocks. This table can store the properties such as treatment'; COMMENT ON COLUMN nd_experiment_stockprop.nd_experiment_stock_id IS 'The experiment_stock to which the property applies.'; -COMMENT ON COLUMN nd_experiment_stockprop.cvterm_id IS 'The name of the property as a reference to a controlled vocabulary term.'; +COMMENT ON COLUMN nd_experiment_stockprop.type_id IS 'The name of the property as a reference to a controlled vocabulary term.'; COMMENT ON COLUMN nd_experiment_stockprop.value IS 'The value of the property.'; Modified: schema/trunk/chado/modules/default_schema.sql =================================================================== --- schema/trunk/chado/modules/default_schema.sql 2010-10-21 17:24:04 UTC (rev 24014) +++ schema/trunk/chado/modules/default_schema.sql 2010-10-21 18:47:50 UTC (rev 24015) @@ -34790,11 +34790,11 @@ PRIMARY KEY (projectprop_id), project_id integer NOT NULL, FOREIGN KEY (project_id) REFERENCES project (project_id) ON DELETE CASCADE, - cvterm_id integer NOT NULL, - FOREIGN KEY (cvterm_id) REFERENCES cvterm (cvterm_id) ON DELETE CASCADE, + type_id integer NOT NULL, + FOREIGN KEY (type_id) REFERENCES cvterm (cvterm_id) ON DELETE CASCADE, value text, rank integer not null default 0, - CONSTRAINT projectprop_c1 UNIQUE (project_id, cvterm_id, rank) + CONSTRAINT projectprop_c1 UNIQUE (project_id, type_id, rank) ); -- ================================================ @@ -35976,6 +35976,33 @@ COMMENT ON TABLE stockcollection_stock IS 'stockcollection_stock links a stock collection to the stocks which are contained in the collection.'; + + + +-- ================================================ +-- TABLE: stock_dbxrefprop +-- ================================================ + +create table stock_dbxrefprop ( + stock_dbxrefprop_id serial not null, + primary key (stock_dbxrefprop_id), + stock_dbxref_id int not null, + foreign key (stock_dbxref_id) references stock_dbxref (stock_dbxref_id) on delete cascade INITIALLY DEFERRED, + type_id int not null, + foreign key (type_id) references cvterm (cvterm_id) on delete cascade INITIALLY DEFERRED, + value text null, + rank int not null default 0, + constraint stock_dbxrefprop_c1 unique (stock_dbxref_id,type_id,rank) +); +create index stock_dbxrefprop_idx1 on stock_dbxrefprop (stock_dbxref_id); +create index stock_dbxrefprop_idx2 on stock_dbxrefprop (type_id); + +COMMENT ON TABLE stock_dbxrefprop IS 'A stock_dbxref can have any number of +slot-value property tags attached to it. This is useful for storing properties related to dbxref annotations of stocks, such as evidence codes, and references, and metadata, such as create/modify dates. This is an alternative to +hardcoding a list of columns in the relational schema, and is +completely extensible. There is a unique constraint, stock_dbxrefprop_c1, for +the combination of stock_dbxref_id, rank, and type_id. Multivalued property-value pairs must be differentiated by rank.'; + -- $Id: library.sql,v 1.10 2008-03-25 16:00:43 emmert Exp $ -- ================================================================= -- Dependencies: @@ -36452,13 +36479,15 @@ as attribute FROM feature_relationship fr, feature parent WHERE fr.object_id=parent.feature_id AND fr.type_id = (SELECT cvterm_id -FROM cvterm WHERE name='part_of') +FROM cvterm WHERE name='part_of' and cv_id in (select cv_id + FROM cv WHERE name='relationship')) UNION ALL -SELECT fr.subject_id as feature_id, 'Derived_from' as type, +SELECT fr.subject_id as feature_id, 'Derives_from' as type, parent.uniquename as attribute FROM feature_relationship fr, feature parent WHERE fr.object_id=parent.feature_id AND fr.type_id = (SELECT cvterm_id -FROM cvterm WHERE name='derives_from') +FROM cvterm WHERE name='derives_from' and cv_id in (select cv_id + FROM cv WHERE name='relationship')) UNION ALL SELECT fl.feature_id, 'Target' as type, target.name || ' ' || fl.fmin+1 || ' ' || fl.fmax || ' ' || fl.strand as attribute @@ -36485,7 +36514,11 @@ ) AS SELECT f.feature_id, sf.name, gffdbx.accession, cv.name, -fl.fmin+1, fl.fmax, af.significance, fl.strand, +fl.fmin+1, fl.fmax, af.significance, + CASE WHEN fl.strand=-1 THEN '-' + WHEN fl.strand=1 THEN '+' + ELSE '.' + END, fl.phase, f.seqlen, f.name, f.organism_id FROM feature f LEFT JOIN featureloc fl ON (f.feature_id = fl.feature_id) @@ -37048,10 +37081,10 @@ CREATE TABLE nd_experimentprop ( nd_experimentprop_id serial PRIMARY KEY NOT NULL, nd_experiment_id integer NOT NULL references nd_experiment (nd_experiment_id) on delete cascade INITIALLY DEFERRED, - cvterm_id integer NOT NULL references cvterm (cvterm_id) on delete cascade INITIALLY DEFERRED , + type_id integer NOT NULL references cvterm (cvterm_id) on delete cascade INITIALLY DEFERRED , value character varying(255) NOT NULL, rank integer NOT NULL default 0, - constraint nd_experimentprop_c1 unique (nd_experiment_id,cvterm_id,rank) + constraint nd_experimentprop_c1 unique (nd_experiment_id,type_id,rank) ); create table nd_experiment_pub ( @@ -37073,15 +37106,15 @@ CREATE TABLE nd_geolocationprop ( nd_geolocationprop_id serial PRIMARY KEY NOT NULL, nd_geolocation_id integer NOT NULL references nd_geolocation (nd_geolocation_id) on delete cascade INITIALLY DEFERRED, - cvterm_id integer NOT NULL references cvterm (cvterm_id) on delete cascade INITIALLY DEFERRED, + type_id integer NOT NULL references cvterm (cvterm_id) on delete cascade INITIALLY DEFERRED, value character varying(250), rank integer NOT NULL DEFAULT 0, - constraint nd_geolocationprop_c1 unique (nd_geolocation_id,cvterm_id,rank) + constraint nd_geolocationprop_c1 unique (nd_geolocation_id,type_id,rank) ); COMMENT ON TABLE nd_geolocationprop IS 'Property/value associations for geolocations. This table can store the properties such as location and environment'; -COMMENT ON COLUMN nd_geolocationprop.cvterm_id IS 'The name of the property as a reference to a controlled vocabulary term.'; +COMMENT ON COLUMN nd_geolocationprop.type_id IS 'The name of the property as a reference to a controlled vocabulary term.'; COMMENT ON COLUMN nd_geolocationprop.value IS 'The value of the property.'; @@ -37125,17 +37158,17 @@ CREATE TABLE nd_protocolprop ( nd_protocolprop_id serial PRIMARY KEY NOT NULL, nd_protocol_id integer NOT NULL references nd_protocol (nd_protocol_id) on delete cascade INITIALLY DEFERRED, - cvterm_id integer NOT NULL references cvterm (cvterm_id) on delete cascade INITIALLY DEFERRED, + type_id integer NOT NULL references cvterm (cvterm_id) on delete cascade INITIALLY DEFERRED, value character varying(255), rank integer DEFAULT 0 NOT NULL, - constraint nd_protocolprop_c1 unique (nd_protocol_id,cvterm_id,rank) + constraint nd_protocolprop_c1 unique (nd_protocol_id,type_id,rank) ); COMMENT ON TABLE nd_protocolprop IS 'Property/value associations for protocol.'; COMMENT ON COLUMN nd_protocolprop.nd_protocol_id IS 'The protocol to which the property applies.'; -COMMENT ON COLUMN nd_protocolprop.cvterm_id IS 'The name of the property as a reference to a controlled vocabulary term.'; +COMMENT ON COLUMN nd_protocolprop.type_id IS 'The name of the property as a reference to a controlled vocabulary term.'; COMMENT ON COLUMN nd_protocolprop.value IS 'The value of the property.'; @@ -37201,26 +37234,26 @@ CREATE TABLE nd_reagentprop ( nd_reagentprop_id serial PRIMARY KEY NOT NULL, nd_reagent_id integer NOT NULL references nd_reagent (nd_reagent_id) on delete cascade INITIALLY DEFERRED, - cvterm_id integer NOT NULL references cvterm (cvterm_id) on delete cascade INITIALLY DEFERRED, + type_id integer NOT NULL references cvterm (cvterm_id) on delete cascade INITIALLY DEFERRED, value character varying(255), rank integer DEFAULT 0 NOT NULL, - constraint nd_reagentprop_c1 unique (nd_reagent_id,cvterm_id,rank) + constraint nd_reagentprop_c1 unique (nd_reagent_id,type_id,rank) ); CREATE TABLE nd_experiment_stockprop ( nd_experiment_stockprop_id serial PRIMARY KEY NOT NULL, nd_experiment_stock_id integer NOT NULL references nd_experiment_stock (nd_experiment_stock_id) on delete cascade INITIALLY DEFERRED, - cvterm_id integer NOT NULL references cvterm (cvterm_id) on delete cascade INITIALLY DEFERRED, + type_id integer NOT NULL references cvterm (cvterm_id) on delete cascade INITIALLY DEFERRED, value character varying(255), rank integer DEFAULT 0 NOT NULL, - constraint nd_experiment_stockprop_c1 unique (nd_experiment_stock_id,cvterm_id,rank) + constraint nd_experiment_stockprop_c1 unique (nd_experiment_stock_id,type_id,rank) ); COMMENT ON TABLE nd_experiment_stockprop IS 'Property/value associations for experiment_stocks. This table can store the properties such as treatment'; COMMENT ON COLUMN nd_experiment_stockprop.nd_experiment_stock_id IS 'The experiment_stock to which the property applies.'; -COMMENT ON COLUMN nd_experiment_stockprop.cvterm_id IS 'The name of the property as a reference to a controlled vocabulary term.'; +COMMENT ON COLUMN nd_experiment_stockprop.type_id IS 'The name of the property as a reference to a controlled vocabulary term.'; COMMENT ON COLUMN nd_experiment_stockprop.value IS 'The value of the property.'; Modified: schema/trunk/chado/modules/nofuncs.html =================================================================== --- schema/trunk/chado/modules/nofuncs.html 2010-10-21 17:24:04 UTC (rev 24014) +++ schema/trunk/chado/modules/nofuncs.html 2010-10-21 18:47:50 UTC (rev 24015) @@ -17,7 +17,7 @@ <hr /> <!-- - Table listing (168 tables) + Table listing (169 tables) --> <a name="top" /> @@ -1579,6 +1579,18 @@ --> <!-- + Start link to table 'stock_dbxrefprop' + --> + +<tr class="LinkTableRow"> + <td class="LinkTableCell"><a id="stock_dbxrefprop-link" href="#stock_dbxrefprop">stock_dbxrefprop</a></td> +</tr> + +<!-- + End link to table 'stock_dbxrefprop' + --> + +<!-- Start link to table 'library' --> @@ -16029,7 +16041,7 @@ </tr> <tr class="tr-odd"> - <td class="FieldCellName"><a name="projectprop-cvterm_id">cvterm_id</a></td> + <td class="FieldCellName"><a name="projectprop-type_id">type_id</a></td> <td class="FieldCellType">integer</td> <td class="FieldCellSize">10</td> <td class="FieldCellDefault"></td> @@ -16089,12 +16101,12 @@ <tr class="IndexCell"> <td>NOT NULL</td> - <td>cvterm_id</td> + <td>type_id</td> </tr> <tr class="IndexCell"> <td>FOREIGN KEY</td> - <td>cvterm_id</td> + <td>type_id</td> </tr> <tr class="IndexCell"> @@ -16104,7 +16116,7 @@ <tr class="IndexCell"> <td>UNIQUE</td> - <td>project_id, cvterm_id, rank</td> + <td>project_id, type_id, rank</td> </tr> </table> @@ -25635,6 +25647,190 @@ <hr /> <!-- + Starting table 'stock_dbxrefprop' + --> + +<a name="stock_dbxrefprop" /> + +<table class="TableHeader" width="100%"> + <tr class="TableHeaderRow"> + <td class="TableHeaderCell"><h3> + stock_dbxrefprop +</h3></td> + <a name="stock_dbxrefprop"> <td class="TableHeaderCell" align="right"><a href="#top">Top</a></td> + </tr> +</table> + +<b> + Comments: +</b> + +<br /> + +<em> + <br /> + ================================================ <br /> + TABLE: stock_dbxrefprop <br /> + ================================================ <br /> + A stock_dbxref can have any number of + slot-value property tags attached to it. This is useful for storing properties related to dbxref annotations of stocks, such as evidence codes, and references, and metadata, such as create/modify dates. This is an alternative to + hardcoding a list of columns in the relational schema, and is + completely extensible. There is a unique constraint, stock_dbxrefprop_c1, for + the combination of stock_dbxref_id, rank, and type_id. Multivalued property-value pairs must be differentiated by rank. +</em> + +<table border="1"> + +<tr> + <th class="FieldHeader"> + Field Name + </th> + <th class="FieldHeader"> + Data Type + </th> + <th class="FieldHeader"> + Size + </th> + <th class="FieldHeader"> + Default Value + </th> + <th class="FieldHeader"> + Other + </th> + <th class="FieldHeader"> + Foreign Key + </th> +</tr> + +<tr class="tr-odd"> + <td class="FieldCellName"><a name="stock_dbxrefprop-stock_dbxrefprop_id">stock_dbxrefprop_id</a></td> + <td class="FieldCellType">integer</td> + <td class="FieldCellSize">11</td> + <td class="FieldCellDefault"></td> + <td class="FieldCellOther">PRIMARY KEY, NOT NULL</td> + <td class="FieldCellFK"></td> +</tr> + +<tr class="tr-even"> + <td class="FieldCellName"><a name="stock_dbxrefprop-stock_dbxref_id">stock_dbxref_id</a></td> + <td class="FieldCellType">integer</td> + <td class="FieldCellSize">10</td> + <td class="FieldCellDefault"></td> + <td class="FieldCellOther">UNIQUE, NOT NULL</td> + <td class="FieldCellFK"><a href="#stock_dbxref-stock_dbxref_id">stock_dbxref.stock_dbxref_id</a></td> +</tr> + +<tr class="tr-odd"> + <td class="FieldCellName"><a name="stock_dbxrefprop-type_id">type_id</a></td> + <td class="FieldCellType">integer</td> + <td class="FieldCellSize">10</td> + <td class="FieldCellDefault"></td> + <td class="FieldCellOther">UNIQUE, NOT NULL</td> + <td class="FieldCellFK"><a href="#cvterm-cvterm_id">cvterm.cvterm_id</a></td> +</tr> + +<tr class="tr-even"> + <td class="FieldCellName"><a name="stock_dbxrefprop-value">value</a></td> + <td class="FieldCellType">text</td> + <td class="FieldCellSize">64000</td> + <td class="FieldCellDefault">NULL</td> + <td class="FieldCellOther"></td> + <td class="FieldCellFK"></td> +</tr> + +<tr class="tr-odd"> + <td class="FieldCellName"><a name="stock_dbxrefprop-rank">rank</a></td> + <td class="FieldCellType">integer</td> + <td class="FieldCellSize">10</td> + <td class="FieldCellDefault">0</td> + <td class="FieldCellOther">UNIQUE, NOT NULL</td> + <td class="FieldCellFK"></td> +</tr> + +</table> + +<h3> + Indices +</h3> + +<table border="1"> + +<tr class="IndexRow"> + <th> + Name + </th> + <th> + Fields + </th> +</tr> + +<tr class="IndexCell"> + <td>stock_dbxrefprop_idx1</td> + <td>stock_dbxref_id</td> +</tr> + +<tr class="IndexCell"> + <td>stock_dbxrefprop_idx2</td> + <td>type_id</td> +</tr> + +</table> + +<h3> + Constraints +</h3> + +<table border="1"> + +<tr class="IndexRow"> + <th> + Type + </th> + <th> + Fields + </th> +</tr> + +<tr class="IndexCell"> + <td>NOT NULL</td> + <td>stock_dbxrefprop_id</td> +</tr> + +<tr class="IndexCell"> + <td>NOT NULL</td> + <td>stock_dbxref_id</td> +</tr> + +<tr class="IndexCell"> + <td>FOREIGN KEY</td> + <td>stock_dbxref_id</td> +</tr> + +<tr class="IndexCell"> + <td>NOT NULL</td> + <td>type_id</td> +</tr> + +<tr class="IndexCell"> + <td>FOREIGN KEY</td> + <td>type_id</td> +</tr> + +<tr class="IndexCell"> + <td>NOT NULL</td> + <td>rank</td> +</tr> + +<tr class="IndexCell"> + <td>UNIQUE</td> + <td>stock_dbxref_id, type_id, rank</td> +</tr> + +</table> + +<hr /> + +<!-- Starting table 'library' --> @@ -29203,7 +29399,7 @@ </tr> <tr class="tr-odd"> - <td class="FieldCellName"><a name="nd_experimentprop-cvterm_id">cvterm_id</a></td> + <td class="FieldCellName"><a name="nd_experimentprop-type_id">type_id</a></td> <td class="FieldCellType">integer</td> <td class="FieldCellSize">10</td> <td class="FieldCellDefault"></td> @@ -29263,12 +29459,12 @@ <tr class="IndexCell"> <td>NOT NULL</td> - <td>cvterm_id</td> + <td>type_id</td> </tr> <tr class="IndexCell"> <td>FOREIGN KEY</td> - <td>cvterm_id</td> + <td>type_id</td> </tr> <tr class="IndexCell"> @@ -29283,7 +29479,7 @@ <tr class="IndexCell"> <td>UNIQUE</td> - <td>nd_experiment_id, cvterm_id, rank</td> + <td>nd_experiment_id, type_id, rank</td> </tr> <tr class="IndexCell"> @@ -29293,7 +29489,7 @@ <tr class="IndexCell"> <td>FOREIGN KEY</td> - <td>cvterm_id</td> + <td>type_id</td> </tr> </table> @@ -29522,7 +29718,7 @@ </tr> <tr class="tr-odd"> - <td class="FieldCellName"><a name="nd_geolocationprop-cvterm_id">cvterm_id</a></td> + <td class="FieldCellName"><a name="nd_geolocationprop-type_id">type_id</a></td> <td class="FieldCellType">integer</td> <td class="FieldCellSize">10</td> <td class="FieldCellDefault"></td> @@ -29582,12 +29778,12 @@ <tr class="IndexCell"> <td>NOT NULL</td> - <td>cvterm_id</td> + <td>type_id</td> </tr> <tr class="IndexCell"> <td>FOREIGN KEY</td> - <td>cvterm_id</td> + <td>type_id</td> </tr> <tr class="IndexCell"> @@ -29597,7 +29793,7 @@ <tr class="IndexCell"> <td>UNIQUE</td> - <td>nd_geolocation_id, cvterm_id, rank</td> + <td>nd_geolocation_id, type_id, rank</td> </tr> <tr class="IndexCell"> @@ -29607,7 +29803,7 @@ <tr class="IndexCell"> <td>FOREIGN KEY</td> - <td>cvterm_id</td> + <td>type_id</td> </tr> </table> @@ -30061,7 +30257,7 @@ </tr> <tr class="tr-odd"> - <td class="FieldCellName"><a name="nd_protocolprop-cvterm_id">cvterm_id</a></td> + <td class="FieldCellName"><a name="nd_protocolprop-type_id">type_id</a></td> <td class="FieldCellType">integer</td> <td class="FieldCellSize">10</td> <td class="FieldCellDefault"></td> @@ -30121,12 +30317,12 @@ <tr class="IndexCell"> <td>NOT NULL</td> - <td>cvterm_id</td> + <td>type_id</td> </tr> <tr class="IndexCell"> <td>FOREIGN KEY</td> - <td>cvterm_id</td> + <td>type_id</td> </tr> <tr class="IndexCell"> @@ -30136,7 +30332,7 @@ <tr class="IndexCell"> <td>UNIQUE</td> - <td>nd_protocol_id, cvterm_id, rank</td> + <td>nd_protocol_id, type_id, rank</td> </tr> <tr class="IndexCell"> @@ -30146,7 +30342,7 @@ <tr class="IndexCell"> <td>FOREIGN KEY</td> - <td>cvterm_id</td> + <td>type_id</td> </tr> </table> @@ -30928,7 +31124,7 @@ </tr> <tr class="tr-odd"> - <td class="FieldCellName"><a name="nd_reagentprop-cvterm_id">cvterm_id</a></td> + <td class="FieldCellName"><a name="nd_reagentprop-type_id">type_id</a></td> <td class="FieldCellType">integer</td> <td class="FieldCellSize">10</td> <td class="FieldCellDefault"></td> @@ -30988,12 +31184,12 @@ <tr class="IndexCell"> <td>NOT NULL</td> - <td>cvterm_id</td> + <td>type_id</td> </tr> <tr class="IndexCell"> <td>FOREIGN KEY</td> - <td>cvterm_id</td> + <td>type_id</td> </tr> <tr class="IndexCell"> @@ -31003,7 +31199,7 @@ <tr class="IndexCell"> <td>UNIQUE</td> - <td>nd_reagent_id, cvterm_id, rank</td> + <td>nd_reagent_id, type_id, rank</td> </tr> <tr class="IndexCell"> @@ -31013,7 +31209,7 @@ <tr class="IndexCell"> <td>FOREIGN KEY</td> - <td>cvterm_id</td> + <td>type_id</td> </tr> </table> @@ -31088,7 +31284,7 @@ </tr> <tr class="tr-odd"> - <td class="FieldCellName"><a name="nd_experiment_stockprop-cvterm_id">cvterm_id</a></td> + <td class="FieldCellName"><a name="nd_experiment_stockprop-type_id">type_id</a></td> <td class="FieldCellType">integer</td> <td class="FieldCellSize">10</td> <td class="FieldCellDefault"></td> @@ -31148,12 +31344,12 @@ <tr class="IndexCell"> <td>NOT NULL</td> - <td>cvterm_id</td> + <td>type_id</td> </tr> <tr class="IndexCell"> <td>FOREIGN KEY</td> - <td>cvterm_id</td> + <td>type_id</td> </tr> <tr class="IndexCell"> @@ -31163,7 +31359,7 @@ <tr class="IndexCell"> <td>UNIQUE</td> - <td>nd_experiment_stock_id, cvterm_id, rank</td> + <td>nd_experiment_stock_id, type_id, rank</td> </tr> <tr class="IndexCell"> @@ -31173,7 +31369,7 @@ <tr class="IndexCell"> <td>FOREIGN KEY</td> - <td>cvterm_id</td> + <td>type_id</td> </tr> </table> @@ -31566,7 +31762,7 @@ <hr /> Created by <a href="http://sqlfairy.sourceforge.net"> -SQL::Translator 0.11005</a> +SQL::Translator 0.11003</a> </body> </html> Modified: schema/trunk/chado/modules/project/project.html =================================================================== --- schema/trunk/chado/modules/project/project.html 2010-10-21 17:24:04 UTC (rev 24014) +++ schema/trunk/chado/modules/project/project.html 2010-10-21 18:47:50 UTC (rev 24015) @@ -288,7 +288,7 @@ </tr> <tr class="tr-odd"> - <td class="FieldCellName"><a name="projectprop-cvterm_id">cvterm_id</a></td> + <td class="FieldCellName"><a name="projectprop-type_id">type_id</a></td> <td class="FieldCellType">integer</td> <td class="FieldCellSize">10</td> <td class="FieldCellDefault"></td> @@ -348,12 +348,12 @@ <tr class="IndexCell"> <td>NOT NULL</td> - <td>cvterm_id</td> + <td>type_id</td> </tr> <tr class="IndexCell"> <td>FOREIGN KEY</td> - <td>cvterm_id</td> + <td>type_id</td> </tr> <tr class="IndexCell"> @@ -363,7 +363,7 @@ <tr class="IndexCell"> <td>UNIQUE</td> - <td>project_id, cvterm_id, rank</td> + <td>project_id, type_id, rank</td> </tr> </table> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sco...@us...> - 2011-09-19 18:45:51
|
Revision: 25187 http://gmod.svn.sourceforge.net/gmod/?rev=25187&view=rev Author: scottcain Date: 2011-09-19 18:45:46 +0000 (Mon, 19 Sep 2011) Log Message: ----------- fixing a bug caught by Rob Syme. Modified Paths: -------------- schema/trunk/chado/modules/default_schema.sql schema/trunk/chado/modules/general/functions/general-loading.plpgsql Modified: schema/trunk/chado/modules/default_schema.sql =================================================================== --- schema/trunk/chado/modules/default_schema.sql 2011-09-16 20:54:47 UTC (rev 25186) +++ schema/trunk/chado/modules/default_schema.sql 2011-09-19 18:45:46 UTC (rev 25187) @@ -96,7 +96,7 @@ RETURNS INT AS 'DECLARE v_dbname ALIAS FOR $1; - v_accession ALIAS FOR $1; + v_accession ALIAS FOR $2; v_db_id INTEGER; v_dbxref_id INTEGER; Modified: schema/trunk/chado/modules/general/functions/general-loading.plpgsql =================================================================== --- schema/trunk/chado/modules/general/functions/general-loading.plpgsql 2011-09-16 20:54:47 UTC (rev 25186) +++ schema/trunk/chado/modules/general/functions/general-loading.plpgsql 2011-09-19 18:45:46 UTC (rev 25187) @@ -24,7 +24,7 @@ RETURNS INT AS 'DECLARE v_dbname ALIAS FOR $1; - v_accession ALIAS FOR $1; + v_accession ALIAS FOR $2; v_db_id INTEGER; v_dbxref_id INTEGER; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sco...@us...> - 2011-09-20 19:04:52
|
Revision: 25193 http://gmod.svn.sourceforge.net/gmod/?rev=25193&view=rev Author: scottcain Date: 2011-09-20 19:04:39 +0000 (Tue, 20 Sep 2011) Log Message: ----------- adding some left out doc Added Paths: ----------- schema/trunk/chado/modules/cell_line/cell_line.html schema/trunk/chado/modules/stock/stock.html Added: schema/trunk/chado/modules/cell_line/cell_line.html =================================================================== --- schema/trunk/chado/modules/cell_line/cell_line.html (rev 0) +++ schema/trunk/chado/modules/cell_line/cell_line.html 2011-09-20 19:04:39 UTC (rev 25193) @@ -0,0 +1,1832 @@ +<!DOCTYPE html + PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US" xml:lang="en-US"> +<head> +<title>Description of Schema</title> +<meta name="generator" content="SQL::Translator::Producer::HTML" /> +<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> +</head> +<body> + + +<h1 class="SchemaDescription"> + Description of Schema +</h1> + +<hr /> + +<!-- + Table listing (11 tables) + --> + +<a name="top" /> + +<table class="LinkTable" width="100%"> + +<tr> + <td class="LinkTableCell"><h2 class="LinkTableTitle"> + Tables +</h2></td> +</tr> + +<!-- + Start link to table 'cell_line' + --> + +<tr class="LinkTableRow"> + <td class="LinkTableCell"><a id="cell_line-link" href="#cell_line">cell_line</a></td> +</tr> + +<!-- + End link to table 'cell_line' + --> + +<!-- + Start link to table 'cell_line_relationship' + --> + +<tr class="LinkTableRow"> + <td class="LinkTableCell"><a id="cell_line_relationship-link" href="#cell_line_relationship">cell_line_relationship</a></td> +</tr> + +<!-- + End link to table 'cell_line_relationship' + --> + +<!-- + Start link to table 'cell_line_synonym' + --> + +<tr class="LinkTableRow"> + <td class="LinkTableCell"><a id="cell_line_synonym-link" href="#cell_line_synonym">cell_line_synonym</a></td> +</tr> + +<!-- + End link to table 'cell_line_synonym' + --> + +<!-- + Start link to table 'cell_line_cvterm' + --> + +<tr class="LinkTableRow"> + <td class="LinkTableCell"><a id="cell_line_cvterm-link" href="#cell_line_cvterm">cell_line_cvterm</a></td> +</tr> + +<!-- + End link to table 'cell_line_cvterm' + --> + +<!-- + Start link to table 'cell_line_dbxref' + --> + +<tr class="LinkTableRow"> + <td class="LinkTableCell"><a id="cell_line_dbxref-link" href="#cell_line_dbxref">cell_line_dbxref</a></td> +</tr> + +<!-- + End link to table 'cell_line_dbxref' + --> + +<!-- + Start link to table 'cell_lineprop' + --> + +<tr class="LinkTableRow"> + <td class="LinkTableCell"><a id="cell_lineprop-link" href="#cell_lineprop">cell_lineprop</a></td> +</tr> + +<!-- + End link to table 'cell_lineprop' + --> + +<!-- + Start link to table 'cell_lineprop_pub' + --> + +<tr class="LinkTableRow"> + <td class="LinkTableCell"><a id="cell_lineprop_pub-link" href="#cell_lineprop_pub">cell_lineprop_pub</a></td> +</tr> + +<!-- + End link to table 'cell_lineprop_pub' + --> + +<!-- + Start link to table 'cell_line_feature' + --> + +<tr class="LinkTableRow"> + <td class="LinkTableCell"><a id="cell_line_feature-link" href="#cell_line_feature">cell_line_feature</a></td> +</tr> + +<!-- + End link to table 'cell_line_feature' + --> + +<!-- + Start link to table 'cell_line_cvtermprop' + --> + +<tr class="LinkTableRow"> + <td class="LinkTableCell"><a id="cell_line_cvtermprop-link" href="#cell_line_cvtermprop">cell_line_cvtermprop</a></td> +</tr> + +<!-- + End link to table 'cell_line_cvtermprop' + --> + +<!-- + Start link to table 'cell_line_pub' + --> + +<tr class="LinkTableRow"> + <td class="LinkTableCell"><a id="cell_line_pub-link" href="#cell_line_pub">cell_line_pub</a></td> +</tr> + +<!-- + End link to table 'cell_line_pub' + --> + +<!-- + Start link to table 'cell_line_library' + --> + +<tr class="LinkTableRow"> + <td class="LinkTableCell"><a id="cell_line_library-link" href="#cell_line_library">cell_line_library</a></td> +</tr> + +<!-- + End link to table 'cell_line_library' + --> + +</table> + +<!-- + Starting table 'cell_line' + --> + +<a name="cell_line" /> + +<table class="TableHeader" width="100%"> + <tr class="TableHeaderRow"> + <td class="TableHeaderCell"><h3> + cell_line +</h3></td> + <a name="cell_line"> <td class="TableHeaderCell" align="right"><a href="#top">Top</a></td> + </tr> +</table> + +<b> + Comments: +</b> + +<br /> + +<em> + <br /> + ========================================== <br /> + Chado cell line module <br /> + ============ <br /> + DEPENDENCIES <br /> + ============ <br /> + :import feature from sequence <br /> + :import synonym from sequence <br /> + :import library from library <br /> + :import cvterm from cv <br /> + :import dbxref from general <br /> + :import pub from pub <br /> + :import organism from organism <br /> + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ <br /> + ================================================ <br /> + TABLE: cell_line <br /> + ================================================ +</em> + +<table border="1"> + +<tr> + <th class="FieldHeader"> + Field Name + </th> + <th class="FieldHeader"> + Data Type + </th> + <th class="FieldHeader"> + Size + </th> + <th class="FieldHeader"> + Default Value + </th> + <th class="FieldHeader"> + Other + </th> + <th class="FieldHeader"> + Foreign Key + </th> +</tr> + +<tr class="tr-odd"> + <td class="FieldCellName"><a name="cell_line-cell_line_id">cell_line_id</a></td> + <td class="FieldCellType">integer</td> + <td class="FieldCellSize">11</td> + <td class="FieldCellDefault"></td> + <td class="FieldCellOther">PRIMARY KEY, NOT NULL</td> + <td class="FieldCellFK"></td> +</tr> + +<tr class="tr-even"> + <td class="FieldCellName"><a name="cell_line-name">name</a></td> + <td class="FieldCellType">varchar</td> + <td class="FieldCellSize">255</td> + <td class="FieldCellDefault">NULL</td> + <td class="FieldCellOther"></td> + <td class="FieldCellFK"></td> +</tr> + +<tr class="tr-odd"> + <td class="FieldCellName"><a name="cell_line-uniquename">uniquename</a></td> + <td class="FieldCellType">varchar</td> + <td class="FieldCellSize">255</td> + <td class="FieldCellDefault"></td> + <td class="FieldCellOther">UNIQUE, NOT NULL</td> + <td class="FieldCellFK"></td> +</tr> + +<tr class="tr-even"> + <td class="FieldCellName"><a name="cell_line-organism_id">organism_id</a></td> + <td class="FieldCellType">integer</td> + <td class="FieldCellSize">10</td> + <td class="FieldCellDefault"></td> + <td class="FieldCellOther">UNIQUE, NOT NULL</td> + <td class="FieldCellFK"><a href="#organism-organism_id">organism.organism_id</a></td> +</tr> + +<tr class="tr-odd"> + <td class="FieldCellName"><a name="cell_line-timeaccessioned">timeaccessioned</a></td> + <td class="FieldCellType">timestamp</td> + <td class="FieldCellSize">0</td> + <td class="FieldCellDefault">current_timestamp</td> + <td class="FieldCellOther">NOT NULL</td> + <td class="FieldCellFK"></td> +</tr> + +<tr class="tr-even"> + <td class="FieldCellName"><a name="cell_line-timelastmodified">timelastmodified</a></td> + <td class="FieldCellType">timestamp</td> + <td class="FieldCellSize">0</td> + <td class="FieldCellDefault">current_timestamp</td> + <td class="FieldCellOther">NOT NULL</td> + <td class="FieldCellFK"></td> +</tr> + +</table> + +<h3> + Constraints +</h3> + +<table border="1"> + +<tr class="IndexRow"> + <th> + Type + </th> + <th> + Fields + </th> +</tr> + +<tr class="IndexCell"> + <td>NOT NULL</td> + <td>cell_line_id</td> +</tr> + +<tr class="IndexCell"> + <td>NOT NULL</td> + <td>uniquename</td> +</tr> + +<tr class="IndexCell"> + <td>NOT NULL</td> + <td>organism_id</td> +</tr> + +<tr class="IndexCell"> + <td>FOREIGN KEY</td> + <td>organism_id</td> +</tr> + +<tr class="IndexCell"> + <td>NOT NULL</td> + <td>timeaccessioned</td> +</tr> + +<tr class="IndexCell"> + <td>NOT NULL</td> + <td>timelastmodified</td> +</tr> + +<tr class="IndexCell"> + <td>UNIQUE</td> + <td>uniquename, organism_id</td> +</tr> + +</table> + +<hr /> + +<!-- + Starting table 'cell_line_relationship' + --> + +<a name="cell_line_relationship" /> + +<table class="TableHeader" width="100%"> + <tr class="TableHeaderRow"> + <td class="TableHeaderCell"><h3> + cell_line_relationship +</h3></td> + <a name="cell_line_relationship"> <td class="TableHeaderCell" align="right"><a href="#top">Top</a></td> + </tr> +</table> + +<b> + Comments: +</b> + +<br /> + +<em> + <br /> + ================================================ <br /> + TABLE: cell_line_relationship <br /> + ================================================ +</em> + +<table border="1"> + +<tr> + <th class="FieldHeader"> + Field Name + </th> + <th class="FieldHeader"> + Data Type + </th> + <th class="FieldHeader"> + Size + </th> + <th class="FieldHeader"> + Default Value + </th> + <th class="FieldHeader"> + Other + </th> + <th class="FieldHeader"> + Foreign Key + </th> +</tr> + +<tr class="tr-odd"> + <td class="FieldCellName"><a name="cell_line_relationship-cell_line_relationship_id">cell_line_relationship_id</a></td> + <td class="FieldCellType">integer</td> + <td class="FieldCellSize">11</td> + <td class="FieldCellDefault"></td> + <td class="FieldCellOther">PRIMARY KEY, NOT NULL</td> + <td class="FieldCellFK"></td> +</tr> + +<tr class="tr-even"> + <td class="FieldCellName"><a name="cell_line_relationship-subject_id">subject_id</a></td> + <td class="FieldCellType">integer</td> + <td class="FieldCellSize">10</td> + <td class="FieldCellDefault"></td> + <td class="FieldCellOther">UNIQUE, NOT NULL</td> + <td class="FieldCellFK"><a href="#cell_line-cell_line_id">cell_line.cell_line_id</a></td> +</tr> + +<tr class="tr-odd"> + <td class="FieldCellName"><a name="cell_line_relationship-object_id">object_id</a></td> + <td class="FieldCellType">integer</td> + <td class="FieldCellSize">10</td> + <td class="FieldCellDefault"></td> + <td class="FieldCellOther">UNIQUE, NOT NULL</td> + <td class="FieldCellFK"><a href="#cell_line-cell_line_id">cell_line.cell_line_id</a></td> +</tr> + +<tr class="tr-even"> + <td class="FieldCellName"><a name="cell_line_relationship-type_id">type_id</a></td> + <td class="FieldCellType">integer</td> + <td class="FieldCellSize">10</td> + <td class="FieldCellDefault"></td> + <td class="FieldCellOther">UNIQUE, NOT NULL</td> + <td class="FieldCellFK"><a href="#cvterm-cvterm_id">cvterm.cvterm_id</a></td> +</tr> + +</table> + +<h3> + Constraints +</h3> + +<table border="1"> + +<tr class="IndexRow"> + <th> + Type + </th> + <th> + Fields + </th> +</tr> + +<tr class="IndexCell"> + <td>NOT NULL</td> + <td>cell_line_relationship_id</td> +</tr> + +<tr class="IndexCell"> + <td>NOT NULL</td> + <td>subject_id</td> +</tr> + +<tr class="IndexCell"> + <td>FOREIGN KEY</td> + <td>subject_id</td> +</tr> + +<tr class="IndexCell"> + <td>NOT NULL</td> + <td>object_id</td> +</tr> + +<tr class="IndexCell"> + <td>FOREIGN KEY</td> + <td>object_id</td> +</tr> + +<tr class="IndexCell"> + <td>NOT NULL</td> + <td>type_id</td> +</tr> + +<tr class="IndexCell"> + <td>FOREIGN KEY</td> + <td>type_id</td> +</tr> + +<tr class="IndexCell"> + <td>UNIQUE</td> + <td>subject_id, object_id, type_id</td> +</tr> + +</table> + +<hr /> + +<!-- + Starting table 'cell_line_synonym' + --> + +<a name="cell_line_synonym" /> + +<table class="TableHeader" width="100%"> + <tr class="TableHeaderRow"> + <td class="TableHeaderCell"><h3> + cell_line_synonym +</h3></td> + <a name="cell_line_synonym"> <td class="TableHeaderCell" align="right"><a href="#top">Top</a></td> + </tr> +</table> + +<b> + Comments: +</b> + +<br /> + +<em> + <br /> + ================================================ <br /> + TABLE: cell_line_synonym <br /> + ================================================ +</em> + +<table border="1"> + +<tr> + <th class="FieldHeader"> + Field Name + </th> + <th class="FieldHeader"> + Data Type + </th> + <th class="FieldHeader"> + Size + </th> + <th class="FieldHeader"> + Default Value + </th> + <th class="FieldHeader"> + Other + </th> + <th class="FieldHeader"> + Foreign Key + </th> +</tr> + +<tr class="tr-odd"> + <td class="FieldCellName"><a name="cell_line_synonym-cell_line_synonym_id">cell_line_synonym_id</a></td> + <td class="FieldCellType">integer</td> + <td class="FieldCellSize">11</td> + <td class="FieldCellDefault"></td> + <td class="FieldCellOther">PRIMARY KEY, NOT NULL</td> + <td class="FieldCellFK"></td> +</tr> + +<tr class="tr-even"> + <td class="FieldCellName"><a name="cell_line_synonym-cell_line_id">cell_line_id</a></td> + <td class="FieldCellType">integer</td> + <td class="FieldCellSize">10</td> + <td class="FieldCellDefault"></td> + <td class="FieldCellOther">UNIQUE, NOT NULL</td> + <td class="FieldCellFK"><a href="#cell_line-cell_line_id">cell_line.cell_line_id</a></td> +</tr> + +<tr class="tr-odd"> + <td class="FieldCellName"><a name="cell_line_synonym-synonym_id">synonym_id</a></td> + <td class="FieldCellType">integer</td> + <td class="FieldCellSize">10</td> + <td class="FieldCellDefault"></td> + <td class="FieldCellOther">UNIQUE, NOT NULL</td> + <td class="FieldCellFK"><a href="#synonym-synonym_id">synonym.synonym_id</a></td> +</tr> + +<tr class="tr-even"> + <td class="FieldCellName"><a name="cell_line_synonym-pub_id">pub_id</a></td> + <td class="FieldCellType">integer</td> + <td class="FieldCellSize">10</td> + <td class="FieldCellDefault"></td> + <td class="FieldCellOther">UNIQUE, NOT NULL</td> + <td class="FieldCellFK"><a href="#pub-pub_id">pub.pub_id</a></td> +</tr> + +<tr class="tr-odd"> + <td class="FieldCellName"><a name="cell_line_synonym-is_current">is_current</a></td> + <td class="FieldCellType">boolean</td> + <td class="FieldCellSize">0</td> + <td class="FieldCellDefault">false</td> + <td class="FieldCellOther">NOT NULL</td> + <td class="FieldCellFK"></td> +</tr> + +<tr class="tr-even"> + <td class="FieldCellName"><a name="cell_line_synonym-is_internal">is_internal</a></td> + <td class="FieldCellType">boolean</td> + <td class="FieldCellSize">0</td> + <td class="FieldCellDefault">false</td> + <td class="FieldCellOther">NOT NULL</td> + <td class="FieldCellFK"></td> +</tr> + +</table> + +<h3> + Constraints +</h3> + +<table border="1"> + +<tr class="IndexRow"> + <th> + Type + </th> + <th> + Fields + </th> +</tr> + +<tr class="IndexCell"> + <td>NOT NULL</td> + <td>cell_line_synonym_id</td> +</tr> + +<tr class="IndexCell"> + <td>NOT NULL</td> + <td>cell_line_id</td> +</tr> + +<tr class="IndexCell"> + <td>FOREIGN KEY</td> + <td>cell_line_id</td> +</tr> + +<tr class="IndexCell"> + <td>NOT NULL</td> + <td>synonym_id</td> +</tr> + +<tr class="IndexCell"> + <td>FOREIGN KEY</td> + <td>synonym_id</td> +</tr> + +<tr class="IndexCell"> + <td>NOT NULL</td> + <td>pub_id</td> +</tr> + +<tr class="IndexCell"> + <td>FOREIGN KEY</td> + <td>pub_id</td> +</tr> + +<tr class="IndexCell"> + <td>NOT NULL</td> + <td>is_current</td> +</tr> + +<tr class="IndexCell"> + <td>NOT NULL</td> + <td>is_internal</td> +</tr> + +<tr class="IndexCell"> + <td>UNIQUE</td> + <td>synonym_id, cell_line_id, pub_id</td> +</tr> + +</table> + +<hr /> + +<!-- + Starting table 'cell_line_cvterm' + --> + +<a name="cell_line_cvterm" /> + +<table class="TableHeader" width="100%"> + <tr class="TableHeaderRow"> + <td class="TableHeaderCell"><h3> + cell_line_cvterm +</h3></td> + <a name="cell_line_cvterm"> <td class="TableHeaderCell" align="right"><a href="#top">Top</a></td> + </tr> +</table> + +<b> + Comments: +</b> + +<br /> + +<em> + <br /> + ================================================ <br /> + TABLE: cell_line_cvterm <br /> + ================================================ +</em> + +<table border="1"> + +<tr> + <th class="FieldHeader"> + Field Name + </th> + <th class="FieldHeader"> + Data Type + </th> + <th class="FieldHeader"> + Size + </th> + <th class="FieldHeader"> + Default Value + </th> + <th class="FieldHeader"> + Other + </th> + <th class="FieldHeader"> + Foreign Key + </th> +</tr> + +<tr class="tr-odd"> + <td class="FieldCellName"><a name="cell_line_cvterm-cell_line_cvterm_id">cell_line_cvterm_id</a></td> + <td class="FieldCellType">integer</td> + <td class="FieldCellSize">11</td> + <td class="FieldCellDefault"></td> + <td class="FieldCellOther">PRIMARY KEY, NOT NULL</td> + <td class="FieldCellFK"></td> +</tr> + +<tr class="tr-even"> + <td class="FieldCellName"><a name="cell_line_cvterm-cell_line_id">cell_line_id</a></td> + <td class="FieldCellType">integer</td> + <td class="FieldCellSize">10</td> + <td class="FieldCellDefault"></td> + <td class="FieldCellOther">UNIQUE, NOT NULL</td> + <td class="FieldCellFK"><a href="#cell_line-cell_line_id">cell_line.cell_line_id</a></td> +</tr> + +<tr class="tr-odd"> + <td class="FieldCellName"><a name="cell_line_cvterm-cvterm_id">cvterm_id</a></td> + <td class="FieldCellType">integer</td> + <td class="FieldCellSize">10</td> + <td class="FieldCellDefault"></td> + <td class="FieldCellOther">UNIQUE, NOT NULL</td> + <td class="FieldCellFK"><a href="#cvterm-cvterm_id">cvterm.cvterm_id</a></td> +</tr> + +<tr class="tr-even"> + <td class="FieldCellName"><a name="cell_line_cvterm-pub_id">pub_id</a></td> + <td class="FieldCellType">integer</td> + <td class="FieldCellSize">10</td> + <td class="FieldCellDefault"></td> + <td class="FieldCellOther">UNIQUE, NOT NULL</td> + <td class="FieldCellFK"><a href="#pub-pub_id">pub.pub_id</a></td> +</tr> + +<tr class="tr-odd"> + <td class="FieldCellName"><a name="cell_line_cvterm-rank">rank</a></td> + <td class="FieldCellType">integer</td> + <td class="FieldCellSize">10</td> + <td class="FieldCellDefault">0</td> + <td class="FieldCellOther">UNIQUE, NOT NULL</td> + <td class="FieldCellFK"></td> +</tr> + +</table> + +<h3> + Constraints +</h3> + +<table border="1"> + +<tr class="IndexRow"> + <th> + Type + </th> + <th> + Fields + </th> +</tr> + +<tr class="IndexCell"> + <td>NOT NULL</td> + <td>cell_line_cvterm_id</td> +</tr> + +<tr class="IndexCell"> + <td>NOT NULL</td> + <td>cell_line_id</td> +</tr> + +<tr class="IndexCell"> + <td>FOREIGN KEY</td> + <td>cell_line_id</td> +</tr> + +<tr class="IndexCell"> + <td>NOT NULL</td> + <td>cvterm_id</td> +</tr> + +<tr class="IndexCell"> + <td>FOREIGN KEY</td> + <td>cvterm_id</td> +</tr> + +<tr class="IndexCell"> + <td>NOT NULL</td> + <td>pub_id</td> +</tr> + +<tr class="IndexCell"> + <td>FOREIGN KEY</td> + <td>pub_id</td> +</tr> + +<tr class="IndexCell"> + <td>NOT NULL</td> + <td>rank</td> +</tr> + +<tr class="IndexCell"> + <td>UNIQUE</td> + <td>cell_line_id, cvterm_id, pub_id, rank</td> +</tr> + +</table> + +<hr /> + +<!-- + Starting table 'cell_line_dbxref' + --> + +<a name="cell_line_dbxref" /> + +<table class="TableHeader" width="100%"> + <tr class="TableHeaderRow"> + <td class="TableHeaderCell"><h3> + cell_line_dbxref +</h3></td> + <a name="cell_line_dbxref"> <td class="TableHeaderCell" align="right"><a href="#top">Top</a></td> + </tr> +</table> + +<b> + Comments: +</b> + +<br /> + +<em> + <br /> + ================================================ <br /> + TABLE: cell_line_dbxref <br /> + ================================================ +</em> + +<table border="1"> + +<tr> + <th class="FieldHeader"> + Field Name + </th> + <th class="FieldHeader"> + Data Type + </th> + <th class="FieldHeader"> + Size + </th> + <th class="FieldHeader"> + Default Value + </th> + <th class="FieldHeader"> + Other + </th> + <th class="FieldHeader"> + Foreign Key + </th> +</tr> + +<tr class="tr-odd"> + <td class="FieldCellName"><a name="cell_line_dbxref-cell_line_dbxref_id">cell_line_dbxref_id</a></td> + <td class="FieldCellType">integer</td> + <td class="FieldCellSize">11</td> + <td class="FieldCellDefault"></td> + <td class="FieldCellOther">PRIMARY KEY, NOT NULL</td> + <td class="FieldCellFK"></td> +</tr> + +<tr class="tr-even"> + <td class="FieldCellName"><a name="cell_line_dbxref-cell_line_id">cell_line_id</a></td> + <td class="FieldCellType">integer</td> + <td class="FieldCellSize">10</td> + <td class="FieldCellDefault"></td> + <td class="FieldCellOther">UNIQUE, NOT NULL</td> + <td class="FieldCellFK"><a href="#cell_line-cell_line_id">cell_line.cell_line_id</a></td> +</tr> + +<tr class="tr-odd"> + <td class="FieldCellName"><a name="cell_line_dbxref-dbxref_id">dbxref_id</a></td> + <td class="FieldCellType">integer</td> + <td class="FieldCellSize">10</td> + <td class="FieldCellDefault"></td> + <td class="FieldCellOther">UNIQUE, NOT NULL</td> + <td class="FieldCellFK"><a href="#dbxref-dbxref_id">dbxref.dbxref_id</a></td> +</tr> + +<tr class="tr-even"> + <td class="FieldCellName"><a name="cell_line_dbxref-is_current">is_current</a></td> + <td class="FieldCellType">boolean</td> + <td class="FieldCellSize">0</td> + <td class="FieldCellDefault">true</td> + <td class="FieldCellOther">NOT NULL</td> + <td class="FieldCellFK"></td> +</tr> + +</table> + +<h3> + Constraints +</h3> + +<table border="1"> + +<tr class="IndexRow"> + <th> + Type + </th> + <th> + Fields + </th> +</tr> + +<tr class="IndexCell"> + <td>NOT NULL</td> + <td>cell_line_dbxref_id</td> +</tr> + +<tr class="IndexCell"> + <td>NOT NULL</td> + <td>cell_line_id</td> +</tr> + +<tr class="IndexCell"> + <td>FOREIGN KEY</td> + <td>cell_line_id</td> +</tr> + +<tr class="IndexCell"> + <td>NOT NULL</td> + <td>dbxref_id</td> +</tr> + +<tr class="IndexCell"> + <td>FOREIGN KEY</td> + <td>dbxref_id</td> +</tr> + +<tr class="IndexCell"> + <td>NOT NULL</td> + <td>is_current</td> +</tr> + +<tr class="IndexCell"> + <td>UNIQUE</td> + <td>cell_line_id, dbxref_id</td> +</tr> + +</table> + +<hr /> + +<!-- + Starting table 'cell_lineprop' + --> + +<a name="cell_lineprop" /> + +<table class="TableHeader" width="100%"> + <tr class="TableHeaderRow"> + <td class="TableHeaderCell"><h3> + cell_lineprop +</h3></td> + <a name="cell_lineprop"> <td class="TableHeaderCell" align="right"><a href="#top">Top</a></td> + </tr> +</table> + +<b> + Comments: +</b> + +<br /> + +<em> + <br /> + ================================================ <br /> + TABLE: cell_lineprop <br /> + ================================================ +</em> + +<table border="1"> + +<tr> + <th class="FieldHeader"> + Field Name + </th> + <th class="FieldHeader"> + Data Type + </th> + <th class="FieldHeader"> + Size + </th> + <th class="FieldHeader"> + Default Value + </th> + <th class="FieldHeader"> + Other + </th> + <th class="FieldHeader"> + Foreign Key + </th> +</tr> + +<tr class="tr-odd"> + <td class="FieldCellName"><a name="cell_lineprop-cell_lineprop_id">cell_lineprop_id</a></td> + <td class="FieldCellType">integer</td> + <td class="FieldCellSize">11</td> + <td class="FieldCellDefault"></td> + <td class="FieldCellOther">PRIMARY KEY, NOT NULL</td> + <td class="FieldCellFK"></td> +</tr> + +<tr class="tr-even"> + <td class="FieldCellName"><a name="cell_lineprop-cell_line_id">cell_line_id</a></td> + <td class="FieldCellType">integer</td> + <td class="FieldCellSize">10</td> + <td class="FieldCellDefault"></td> + <td class="FieldCellOther">UNIQUE, NOT NULL</td> + <td class="FieldCellFK"><a href="#cell_line-cell_line_id">cell_line.cell_line_id</a></td> +</tr> + +<tr class="tr-odd"> + <td class="FieldCellName"><a name="cell_lineprop-type_id">type_id</a></td> + <td class="FieldCellType">integer</td> + <td class="FieldCellSize">10</td> + <td class="FieldCellDefault"></td> + <td class="FieldCellOther">UNIQUE, NOT NULL</td> + <td class="FieldCellFK"><a href="#cvterm-cvterm_id">cvterm.cvterm_id</a></td> +</tr> + +<tr class="tr-even"> + <td class="FieldCellName"><a name="cell_lineprop-value">value</a></td> + <td class="FieldCellType">text</td> + <td class="FieldCellSize">64000</td> + <td class="FieldCellDefault">NULL</td> + <td class="FieldCellOther"></td> + <td class="FieldCellFK"></td> +</tr> + +<tr class="tr-odd"> + <td class="FieldCellName"><a name="cell_lineprop-rank">rank</a></td> + <td class="FieldCellType">integer</td> + <td class="FieldCellSize">10</td> + <td class="FieldCellDefault">0</td> + <td class="FieldCellOther">UNIQUE, NOT NULL</td> + <td class="FieldCellFK"></td> +</tr> + +</table> + +<h3> + Constraints +</h3> + +<table border="1"> + +<tr class="IndexRow"> + <th> + Type + </th> + <th> + Fields + </th> +</tr> + +<tr class="IndexCell"> + <td>NOT NULL</td> + <td>cell_lineprop_id</td> +</tr> + +<tr class="IndexCell"> + <td>NOT NULL</td> + <td>cell_line_id</td> +</tr> + +<tr class="IndexCell"> + <td>FOREIGN KEY</td> + <td>cell_line_id</td> +</tr> + +<tr class="IndexCell"> + <td>NOT NULL</td> + <td>type_id</td> +</tr> + +<tr class="IndexCell"> + <td>FOREIGN KEY</td> + <td>type_id</td> +</tr> + +<tr class="IndexCell"> + <td>NOT NULL</td> + <td>rank</td> +</tr> + +<tr class="IndexCell"> + <td>UNIQUE</td> + <td>cell_line_id, type_id, rank</td> +</tr> + +</table> + +<hr /> + +<!-- + Starting table 'cell_lineprop_pub' + --> + +<a name="cell_lineprop_pub" /> + +<table class="TableHeader" width="100%"> + <tr class="TableHeaderRow"> + <td class="TableHeaderCell"><h3> + cell_lineprop_pub +</h3></td> + <a name="cell_lineprop_pub"> <td class="TableHeaderCell" align="right"><a href="#top">Top</a></td> + </tr> +</table> + +<b> + Comments: +</b> + +<br /> + +<em> + <br /> + ================================================ <br /> + TABLE: cell_lineprop_pub <br /> + ================================================ +</em> + +<table border="1"> + +<tr> + <th class="FieldHeader"> + Field Name + </th> + <th class="FieldHeader"> + Data Type + </th> + <th class="FieldHeader"> + Size + </th> + <th class="FieldHeader"> + Default Value + </th> + <th class="FieldHeader"> + Other + </th> + <th class="FieldHeader"> + Foreign Key + </th> +</tr> + +<tr class="tr-odd"> + <td class="FieldCellName"><a name="cell_lineprop_pub-cell_lineprop_pub_id">cell_lineprop_pub_id</a></td> + <td class="FieldCellType">integer</td> + <td class="FieldCellSize">11</td> + <td class="FieldCellDefault"></td> + <td class="FieldCellOther">PRIMARY KEY, NOT NULL</td> + <td class="FieldCellFK"></td> +</tr> + +<tr class="tr-even"> + <td class="FieldCellName"><a name="cell_lineprop_pub-cell_lineprop_id">cell_lineprop_id</a></td> + <td class="FieldCellType">integer</td> + <td class="FieldCellSize">10</td> + <td class="FieldCellDefault"></td> + <td class="FieldCellOther">UNIQUE, NOT NULL</td> + <td class="FieldCellFK"><a href="#cell_lineprop-cell_lineprop_id">cell_lineprop.cell_lineprop_id</a></td> +</tr> + +<tr class="tr-odd"> + <td class="FieldCellName"><a name="cell_lineprop_pub-pub_id">pub_id</a></td> + <td class="FieldCellType">integer</td> + <td class="FieldCellSize">10</td> + <td class="FieldCellDefault"></td> + <td class="FieldCellOther">UNIQUE, NOT NULL</td> + <td class="FieldCellFK"><a href="#pub-pub_id">pub.pub_id</a></td> +</tr> + +</table> + +<h3> + Constraints +</h3> + +<table border="1"> + +<tr class="IndexRow"> + <th> + Type + </th> + <th> + Fields + </th> +</tr> + +<tr class="IndexCell"> + <td>NOT NULL</td> + <td>cell_lineprop_pub_id</td> +</tr> + +<tr class="IndexCell"> + <td>NOT NULL</td> + <td>cell_lineprop_id</td> +</tr> + +<tr class="IndexCell"> + <td>FOREIGN KEY</td> + <td>cell_lineprop_id</td> +</tr> + +<tr class="IndexCell"> + <td>NOT NULL</td> + <td>pub_id</td> +</tr> + +<tr class="IndexCell"> + <td>FOREIGN KEY</td> + <td>pub_id</td> +</tr> + +<tr class="IndexCell"> + <td>UNIQUE</td> + <td>cell_lineprop_id, pub_id</td> +</tr> + +</table> + +<hr /> + +<!-- + Starting table 'cell_line_feature' + --> + +<a name="cell_line_feature" /> + +<table class="TableHeader" width="100%"> + <tr class="TableHeaderRow"> + <td class="TableHeaderCell"><h3> + cell_line_feature +</h3></td> + <a name="cell_line_feature"> <td class="TableHeaderCell" align="right"><a href="#top">Top</a></td> + </tr> +</table> + +<b> + Comments: +</b> + +<br /> + +<em> + <br /> + ================================================ <br /> + TABLE: cell_line_feature <br /> + ================================================ +</em> + +<table border="1"> + +<tr> + <th class="FieldHeader"> + Field Name + </th> + <th class="FieldHeader"> + Data Type + </th> + <th class="FieldHeader"> + Size + </th> + <th class="FieldHeader"> + Default Value + </th> + <th class="FieldHeader"> + Other + </th> + <th class="FieldHeader"> + Foreign Key + </th> +</tr> + +<tr class="tr-odd"> + <td class="FieldCellName"><a name="cell_line_feature-cell_line_feature_id">cell_line_feature_id</a></td> + <td class="FieldCellType">integer</td> + <td class="FieldCellSize">11</td> + <td class="FieldCellDefault"></td> + <td class="FieldCellOther">PRIMARY KEY, NOT NULL</td> + <td class="FieldCellFK"></td> +</tr> + +<tr class="tr-even"> + <td class="FieldCellName"><a name="cell_line_feature-cell_line_id">cell_line_id</a></td> + <td class="FieldCellType">integer</td> + <td class="FieldCellSize">10</td> + <td class="FieldCellDefault"></td> + <td class="FieldCellOther">UNIQUE, NOT NULL</td> + <td class="FieldCellFK"><a href="#cell_line-cell_line_id">cell_line.cell_line_id</a></td> +</tr> + +<tr class="tr-odd"> + <td class="FieldCellName"><a name="cell_line_feature-feature_id">feature_id</a></td> + <td class="FieldCellType">integer</td> + <td class="FieldCellSize">10</td> + <td class="FieldCellDefault"></td> + <td class="FieldCellOther">UNIQUE, NOT NULL</td> + <td class="FieldCellFK"><a href="#feature-feature_id">feature.feature_id</a></td> +</tr> + +<tr class="tr-even"> + <td class="FieldCellName"><a name="cell_line_feature-pub_id">pub_id</a></td> + <td class="FieldCellType">integer</td> + <td class="FieldCellSize">10</td> + <td class="FieldCellDefault"></td> + <td class="FieldCellOther">UNIQUE, NOT NULL</td> + <td class="FieldCellFK"><a href="#pub-pub_id">pub.pub_id</a></td> +</tr> + +</table> + +<h3> + Constraints +</h3> + +<table border="1"> + +<tr class="IndexRow"> + <th> + Type + </th> + <th> + Fields + </th> +</tr> + +<tr class="IndexCell"> + <td>NOT NULL</td> + <td>cell_line_feature_id</td> +</tr> + +<tr class="IndexCell"> + <td>NOT NULL</td> + <td>cell_line_id</td> +</tr> + +<tr class="IndexCell"> + <td>FOREIGN KEY</td> + <td>cell_line_id</td> +</tr> + +<tr class="IndexCell"> + <td>NOT NULL</td> + <td>feature_id</td> +</tr> + +<tr class="IndexCell"> + <td>FOREIGN KEY</td> + <td>feature_id</td> +</tr> + +<tr class="IndexCell"> + <td>NOT NULL</td> + <td>pub_id</td> +</tr> + +<tr class="IndexCell"> + <td>FOREIGN KEY</td> + <td>pub_id</td> +</tr> + +<tr class="IndexCell"> + <td>UNIQUE</td> + <td>cell_line_id, feature_id, pub_id</td> +</tr> + +</table> + +<hr /> + +<!-- + Starting table 'cell_line_cvtermprop' + --> + +<a name="cell_line_cvtermprop" /> + +<table class="TableHeader" width="100%"> + <tr class="TableHeaderRow"> + <td class="TableHeaderCell"><h3> + cell_line_cvtermprop +</h3></td> + <a name="cell_line_cvtermprop"> <td class="TableHeaderCell" align="right"><a href="#top">Top</a></td> + </tr> +</table> + +<b> + Comments: +</b> + +<br /> + +<em> + <br /> + ================================================ <br /> + TABLE: cell_line_cvtermprop <br /> + ================================================ +</em> + +<table border="1"> + +<tr> + <th class="FieldHeader"> + Field Name + </th> + <th class="FieldHeader"> + Data Type + </th> + <th class="FieldHeader"> + Size + </th> + <th class="FieldHeader"> + Default Value + </th> + <th class="FieldHeader"> + Other + </th> + <th class="FieldHeader"> + Foreign Key + </th> +</tr> + +<tr class="tr-odd"> + <td class="FieldCellName"><a name="cell_line_cvtermprop-cell_line_cvtermprop_id">cell_line_cvtermprop_id</a></td> + <td class="FieldCellType">integer</td> + <td class="FieldCellSize">11</td> + <td class="FieldCellDefault"></td> + <td class="FieldCellOther">PRIMARY KEY, NOT NULL</td> + <td class="FieldCellFK"></td> +</tr> + +<tr class="tr-even"> + <td class="FieldCellName"><a name="cell_line_cvtermprop-cell_line_cvterm_id">cell_line_cvterm_id</a></td> + <td class="FieldCellType">integer</td> + <td class="FieldCellSize">10</td> + <td class="FieldCellDefault"></td> + <td class="FieldCellOther">UNIQUE, NOT NULL</td> + <td class="FieldCellFK"><a href="#cell_line_cvterm-cell_line_cvterm_id">cell_line_cvterm.cell_line_cvterm_id</a></td> +</tr> + +<tr class="tr-odd"> + <td class="FieldCellName"><a name="cell_line_cvtermprop-type_id">type_id</a></td> + <td class="FieldCellType">integer</td> + <td class="FieldCellSize">10</td> + <td class="FieldCellDefault"></td> + <td class="FieldCellOther">UNIQUE, NOT NULL</td> + <td class="FieldCellFK"><a href="#cvterm-cvterm_id">cvterm.cvterm_id</a></td> +</tr> + +<tr class="tr-even"> + <td class="FieldCellName"><a name="cell_line_cvtermprop-value">value</a></td> + <td class="FieldCellType">text</td> + <td class="FieldCellSize">64000</td> + <td class="FieldCellDefault">NULL</td> + <td class="FieldCellOther"></td> + <td class="FieldCellFK"></td> +</tr> + +<tr class="tr-odd"> + <td class="FieldCellName"><a name="cell_line_cvtermprop-rank">rank</a></td> + <td class="FieldCellType">integer</td> + <td class="FieldCellSize">10</td> + <td class="FieldCellDefault">0</td> + <td class="FieldCellOther">UNIQUE, NOT NULL</td> + <td class="FieldCellFK"></td> +</tr> + +</table> + +<h3> + Constraints +</h3> + +<table border="1"> + +<tr class="IndexRow"> + <th> + Type + </th> + <th> + Fields + </th> +</tr> + +<tr class="IndexCell"> + <td>NOT NULL</td> + <td>cell_line_cvtermprop_id</td> +</tr> + +<tr class="IndexCell"> + <td>NOT NULL</td> + <td>cell_line_cvterm_id</td> +</tr> + +<tr class="IndexCell"> + <td>FOREIGN KEY</td> + <td>cell_line_cvterm_id</td> +</tr> + +<tr class="IndexCell"> + <td>NOT NULL</td> + <td>type_id</td> +</tr> + +<tr class="IndexCell"> + <td>FOREIGN KEY</td> + <td>type_id</td> +</tr> + +<tr class="IndexCell"> + <td>NOT NULL</td> + <td>rank</td> +</tr> + +<tr class="IndexCell"> + <td>UNIQUE</td> + <td>cell_line_cvterm_id, type_id, rank</td> +</tr> + +</table> + +<hr /> + +<!-- + Starting table 'cell_line_pub' + --> + +<a name="cell_line_pub" /> + +<table class="TableHeader" width="100%"> + <tr class="TableHeaderRow"> + <td class="TableHeaderCell"><h3> + cell_line_pub +</h3></td> + <a name="cell_line_pub"> <td class="TableHeaderCell" align="right"><a href="#top">Top</a></td> + </tr> +</table> + +<b> + Comments: +</b> + +<br /> + +<em> + <br /> + ================================================ <br /> + TABLE: cell_line_pub <br /> + ================================================ +</em> + +<table border="1"> + +<tr> + <th class="FieldHeader"> + Field Name + </th> + <th class="FieldHeader"> + Data Type + </th> + <th class="FieldHeader"> + Size + </th> + <th class="FieldHeader"> + Default Value + </th> + <th class="FieldHeader"> + Other + </th> + <th class="FieldHeader"> + Foreign Key + </th> +</tr> + +<tr class="tr-odd"> + <td class="FieldCellName"><a name="cell_line_pub-cell_line_pub_id">cell_line_pub_id</a></td> + <td class="FieldCellType">integer</td> + <td class="FieldCellSize">11</td> + <td class="FieldCellDefault"></td> + <td class="FieldCellOther">PRIMARY KEY, NOT NULL</td> + <td class="FieldCellFK"></td> +</tr> + +<tr class="tr-even"> + <td class="FieldCellName"><a name="cell_line_pub-cell_line_id">cell_line_id</a></td> + <td class="FieldCellType">integer</td> + <td class="FieldCellSize">10</td> + <td class="FieldCellDefault"></td> + <td class="FieldCellOther">UNIQUE, NOT NULL</td> + <td class="FieldCellFK"><a href="#cell_line-cell_line_id">cell_line.cell_line_id</a></td> +</tr> + +<tr class="tr-odd"> + <td class="FieldCellName"><a name="cell_line_pub-pub_id">pub_id</a></td> + <td class="FieldCellType">integer</td> + <td class="FieldCellSize">10</td> + <td class="FieldCellDefault"></td> + <td class="FieldCellOther">UNIQUE, NOT NULL</td> + <td class="FieldCellFK"><a href="#pub-pub_id">pub.pub_id</a></td> +</tr> + +</table> + +<h3> + Constraints +</h3> + +<table border="1"> + +<tr class="IndexRow"> + <th> + Type + </th> + <th> + Fields + </th> +</tr> + +<tr class="IndexCell"> + <td>NOT NULL</td> + <td>cell_line_pub_id</td> +</tr> + +<tr class="IndexCell"> + <td>NOT NULL</td> + <td>cell_line_id</td> +</tr> + +<tr class="IndexCell"> + <td>FOREIGN KEY</td> + <td>cell_line_id</td> +</tr> + +<tr class="IndexCell"> + <td>NOT NULL</td> + <td>pub_id</td> +</tr> + +<tr class="IndexCell"> + <td>FOREIGN KEY</td> + <td>pub_id</td> +</tr> + +<tr class="IndexCell"> + <td>UNIQUE</td> + <td>cell_line_id, pub_id</td> +</tr> + +</table> + +<hr /> + +<!-- + Starting table 'cell_line_library' + --> + +<a name="cell_line_library" /> + +<table class="TableHeader" width="100%"> + <tr class="TableHeaderRow"> + <td class="TableHeaderCell"><h3> + cell_line_library +</h3></td> + <a name="cell_line_library"> <td class="TableHeaderCell" align="right"><a href="#top">Top</a></td> + </tr> +</table> + +<b> + Comments: +</b> + +<br /> + +<em> + <br /> + ================================================ <br /> + TABLE: cell_line_library <br /> + ================================================ +</em> + +<table border="1"> + +<tr> + <th class="FieldHeader"> + Field Name + </th> + <th class="FieldHeader"> + Data Type + </th> + <th class="FieldHeader"> + Size + </th> + <th class="FieldHeader"> + Default Value + </th> + <th class="FieldHeader"> + Other + </th> + <th class="FieldHeader"> + Foreign Key + </th> +</tr> + +<tr class="tr-odd"> + <td class="FieldCellName"><a name="cell_line_library-cell_line_library_id">cell_line_library_id</a></td> + <td class="FieldCellType">integer</td> + <td class="FieldCellSize">11</td> + <td class="FieldCellDefault"></td> + <td class="FieldCellOther">PRIMARY KEY, NOT NULL</td> + <td class="FieldCellFK"></td> +</tr> + +<tr class="tr-even"> + <td class="FieldCellName"><a name="cell_line_library-cell_line_id">cell_line_id</a></td> + <td class="FieldCellType">integer</td> + <td class="FieldCellSize">10</td> + <td class="FieldCellDefault"></td> + <td class="FieldCellOther">UNIQUE, NOT NULL</td> + <td class="FieldCellFK"><a href="#cell_line-cell_line_id">cell_line.cell_line_id</a></td> +</tr> + +<tr class="tr-odd"> + <td class="FieldCellName"><a name="cell_line_library-library_id">library_id</a></td> + <td class="FieldCellType">integer</td> + <td class="FieldCellSize">10</td> + <td class="FieldCellDefault"></td> + <td class="FieldCellOther">UNIQUE, NOT NULL</td> + <td class="FieldCellFK"><a href="#library-library_id">library.library_id</a></td> +</tr> + +<tr class="tr-even"> + <td class="FieldCellName"><a name="cell_line_library-pub_id">pub_id</a></td> + <td class="FieldCellType">integer</td> + <td class="FieldCellSize">10</td> + <td class="FieldCellDefault"></td> + <td class="FieldCellOther">UNIQUE, NOT NULL</td> + <td class="FieldCellFK"><a href="#pub-pub_id">pub.pub_id</a></td> +</tr> + +</table> + +<h3> + Constraints +</h3> + +<table border="1"> + +<tr class="IndexRow"> + <th> + Type + </th> + <th> + Fields + </th> +</tr> + +<tr class="IndexCell"> + <td>NOT NULL</td> + <td>cell_line_library_id</td> +</tr> + +<tr class="IndexCell"> + <td>NOT NULL</td> + <td>cell_line_id</td> +</tr> + +<tr class="IndexCell"> + <td>FOREIGN KEY</td> + <td>cell_line_id</td> +</tr> + +<tr class="IndexCell"> + <td>NOT NULL</td> + <td>library_id</td> +</tr> + +<tr class="IndexCell"> + <td>FOREIGN KEY</td> + <td>library_id</td> +</tr> + +<tr class="IndexCell"> + <td>NOT NULL</td> + <td>pub_id</td> +</tr> + +<tr class="IndexCell"> + <td>FOREIGN KEY</td> + <td>pub_id</td> +</tr> + +<tr class="IndexCell"> + <td>UNIQUE</td> + <td>cell_line_id, library_id, pub_id</td> +</tr> + +</table> + +<hr /> + +Created by <a href="http://sqlfairy.sourceforge.net"> +SQL::Translator 0.11003</a> + +</body> +</html> Added: schema/trunk/chado/modules/stock/stock.html =================================================================== --- schema/trunk/chado/modules/stock/stock.html (rev 0) +++ schema/trunk/chado/modules/stock/stock.html 2011-09-20 19:04:39 UTC (rev 25193) @@ -0,0 +1,2895 @@ +<!DOCTYPE html + PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US" xml:lang="en-US"> +<head> +<title>Description of Schema</title> +<meta name="generator" content="SQL::Translator::Producer::HTML" /> +<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> +</head> +<body> + + +<h1 class="SchemaDescription"> + Description of Schema +</h1> + +<hr /> + +<!-- + Table listing (15 tables) + --> + +<a name="top" /> + +<table class="LinkTable" width="100%"> + +<tr> + <td class="LinkTableCell"><h2 class="LinkTableTitle"> + Tables +</h2></td> +</tr> + +<!-- + Start link to table 'stock' + --> + +<tr class="LinkTableRow"> + <td class="LinkTableCell"><a id="stock-link" href="#stock">stock</a></td> +</tr> + +<!-- + End link to table 'stock' + --> + +<!-- + Start link to table 'stock_pub' + --> + +<tr class="LinkTableRow"> + <td class="LinkTableCell"><a id="stock_pub-link" href="#stock_pub">stock_pub</a></td> +</tr> + +<!-- + End link to table 'stock_pub' + --> + +<!-- + Start link to table 'stockprop' + --> + +<tr class="LinkTableRow"> + <td class="LinkTableCell"><a id="stockprop-link" href="#stockprop">stockprop</a></td> +</tr> + +<!-- + End link to table 'stockprop' + --> + +<!-- + Start link to table 'stockprop_pub' + --> + +<tr class="LinkTableRow"> + <td class="LinkTableCell"><a id="stockprop_pub-link" href="#stockprop_pub">stockprop_pub</a></td> +</tr> + +<!-- + End link to table 'stockprop_pub' + --> + +<!-- + Start link to table 'stock_relationship' + --> + +<tr class="LinkTableRow"> + <td class="LinkTableCell"><a id="stock_relationship-link" href="#stock_relationship">stock_relationship</a></td> +</tr> + +<!-- + End link to table 'stock_relationship' + --> + +<!-- + Start link to table 'stock_relationship_cvterm' + --> + +<tr class="LinkTableRow"> + <td class="LinkTableCell"><a id="stock_relationship_cvterm-link" href="#stock_relationship_cvterm">stock_relationship_cvterm</a></td> +</tr> + +<!-- + End link to table 'stock_relationship_cvterm' + --> + +<!-- + Start link to table 'stock_relationship_pub' + --> + +<tr class="LinkTableRow"> + <td class="LinkTableCell"><a id="stock_relationship_pub-link" href="#stock_relationship_pub">stock_relationship_pub</a></td> +</tr> + +<!-- + End link to table 'stock_relationship_pub' + --> + +<!-- + Start link to table 'stock_dbxref' + --> + +<tr class="LinkTableRow"> + <td class="LinkTableCell"><a id="stock_dbxref-link" href="#stock_dbxref">stock_dbxref</a></td> +</tr> + +<!-- + End link to table 'stock_dbxref' + --> + +<!-- + Start link to table 'stock_cvterm' + --> + +<tr class="LinkTableRow"> + <td class="LinkTableCell"><a id="stock_cvterm-link" href="#stock_cvterm">stock_cvterm</a></td> +</tr> + +<!-- + End link to table 'stock_cvterm' + --> + +<!-- + Start link to table 'stock_cvtermprop' + --> + +<tr class="LinkTableRow"> + <td class="LinkTableCell"><a id="stock_cvtermprop-link" href="#stock_cvtermprop">stock_cvtermprop</a></td> +</tr> + +<!-- + End link to table 'stock_cvtermprop' + --> + +<!-- + Start link to table 'stock_genotype' + --> + +<tr class="LinkTableRow"> + <td class="LinkTableCell"><a id="stock_genotype-link" href="#stock_genotype">stock_genotype</a></td> +</tr> + +<!-- + End link to table 'stock_genotype' + --> + +<!-- + Start link to table 'stockcollection' + --> + +<tr class="LinkTableRow"> + <td class="LinkTableCell"><a id="stockcollection-link" href="#stockcollection">stockcollection</a></td> +</tr> + +<!-- + End link to table 'stockcollection' + --> + +<!-- + Start link to table 'stockcollectionprop' + --> + +<tr class="LinkTableRow"> + <td class="LinkTableCell"><a id="stockcollectionprop-link" href="#stockcollectionprop">stockcollectionprop</a></td> +</tr> + +<!-- + End link to table 'stockcollectionprop' + --> + +<!-- + Start link to table 'stockcollection_stock' + --> + +<tr class="LinkTableRow"> + <td class="LinkTableCell"><a id="stockcollection_stock-link" href="#stockcollection_stock">stockcollection_stock</a></td> +</tr> + +<!-- + End link to table 'stockcollection_stock' + --> + +<!-- + Start link to table 'stock_dbxrefprop' + --> + +<tr class="LinkTableRow"> + <td class="LinkTableCell"><a id="stock_dbxrefprop-link" href="#stock_dbxrefprop">stock_dbxrefprop</a></td> +</tr> + +<!-- + End link to table 'stock_dbxrefprop' + --> + +</table> + +<!-- + Starting table 'stock' + --> + +<a name="stock" /> + +<table class="TableHeader" width="100%"> + <tr class="TableHeaderRow"> + <td class="TableHeaderCell"><h3> + stock +</h3></td> + <a name="stock"> <td class="TableHeaderCell" align="right"><a href="#top">Top</a></td> + </tr> +</table> + +<b> + Comments: +</b> + +<br /> + +<em> + <br /> + $Id: stock.sql,v 1.7 2007-03-23 15:18:03 scottcain Exp $ <br /> + ========================================== <br /> + Chado stock module <br /> + DEPENDENCIES <br /> + ============ <br /> + :import cvterm from cv <br /> + :import pub from pub <br /> + :import dbxref from general <br /> + :import organism from organism <br /> + :import genotype from genetic <br /> + :import contact from contact <br /> + ================================================ <br /> + TABLE: stock <br /> + ================================================ <br /> + Any stock can be globally identified by the + combination of organism, uniquename and stock type. A stock is the physical entities, either living or preserved, held by collections. Stocks belong to a collection; they have IDs, type, organism, description and may have a genotype. +</em> + +<table border="1"> + +<tr> + <th class="FieldHeader"> + Field Name + </th> + <th class="FieldHeader"> + Data Type + </th> + <th class="FieldHeader"> + Size + </th> + <th class="FieldHeader"> + Default Value + </th> + <th class="FieldHeader"> + Other + </th> + <th class="FieldHeader"> + Foreign Key + </th> +</tr> + +<tr class="tr-odd"> + <td class="FieldCellName"><a name="stock-stock_id">stock_id</a></td> + <td class="FieldCellType">integer</td> + <td class="FieldCellSize">11</td> + <td class="FieldCellDefault"></td> + <td class="FieldCellOther">PRIMARY KEY, NOT NULL</td> + <td class="FieldCellFK"></td> +</tr> + +<tr class="tr-even"> + <td class="FieldCellName"><a name="stock-dbxref_id">dbxref_id</a></td> + <td class="FieldCellType">integer</td> + <td class="FieldCellSize">10</td> + <td class="FieldCellDefault"></td> + <td class="FieldCellOther">The dbxref_id is an optional primary stable identifier for this stock. Secondary indentifiers and external dbxrefs go in table: stock_dbxref. </td> + <td class="FieldCellFK"><a href="#dbxref-dbxref_id">dbxref.dbxref_id</a></td> +</tr> + +<tr class="tr-odd"> + <td class="FieldCellName"><a name="stock-organism_id">organism_id</a></td> + <td class="FieldCellType">integer</td> + <td class="FieldCellSize">10</td> + <td class="FieldCellDefault"></td> + <td class="FieldCellOther">UNIQUE, The organism_id is the organism to which the stock belongs. This column should only be left blank if the organism cannot be determined. </td> + <td class="FieldCellFK"><a href="#organism-organism_id">organism.organism_id</a></td> +</tr> + +<tr class="tr-even"> + <td class="FieldCellName"><a name="stock-name">name</a></td> + <td class="FieldCellType">varchar</td> + <td class="FieldCellSize">255</td> + <td class="FieldCellDefault"></td> + <td class="FieldCellOther">The name is a human-readable local name for a stock. </td> + <td class="FieldCellFK"></td> +</tr> + +<tr class="tr-odd"> + <td class="FieldCellName"><a name="stock-uniquename">uniquename</a></td> + <td class="FieldCellType">text</td> + <td class="FieldCellSize">64000</td> + <td class="FieldCellDefault"></td> + <td class="FieldCellOther">UNIQUE, NOT NULL</td> + <td class="FieldCellFK"></td> +</tr> + +<tr class="tr-even"> + <td class="FieldCellName"><a name="stock-description">description</a></td> + <td class="FieldCellType">text</td> + <td class="FieldCellSize">64000</td> + <td class="FieldCellDefault"></td> + <td class="FieldCellOther">The description is the genetic description provided in the stock list. </td> + <td class="FieldCellFK"></td> +</tr> + +<tr class="tr-odd"> + <td class="FieldCellName"><a name="stock-type_id">type_id</a></td> + <td class="FieldCellType">integer</td> + <td class="FieldCellSize">10</td> + <td class="FieldCellDefault"></td> + <td class="FieldCellOther">UNIQUE, NOT NULL, The type_id foreign key links to a controlled vocabulary of stock types. The would include living stock, genomic DNA, preserved specimen. Secondary cvterms for stocks would go in stock_cvterm. </td> + <td class="FieldCellFK"><a href="#cvterm-cvterm_id">cvterm.cvterm_id</a></td> +</tr> + +<tr class="tr-even"> + <td class="FieldCellName"><a name="stock-is_obsolete">is_obsolete</a></td> + <td class="FieldCellType">boolean</td> + <td class="FieldCellSize">0</td> + <td class="FieldCellDefault">false</td> + <td class="FieldCellOther">NOT NULL</td> + <td class="FieldCellFK"></td> +</tr> + +</table> + +<h3> + Indices +</h3> + +<table border="1"> + +<tr class="IndexRow"> + <th> + Name + </th> + <th> + Fields + </th> +</tr> + +<tr class="IndexCell"> + <td>stock_name_ind1</td> + <td>name</td> +</tr> + +<tr class="IndexCell"> + <td>stock_idx1</td> + <td>dbxref_id</td> +</tr> + +<tr class="IndexCell"> + <td>stock_idx2</td> + <td>organism_id</td> +</tr> + +<tr class="IndexCell"> + <td>stock_idx3</td> + <td>type_id</td> +</tr> + +<tr class="IndexCell"> + <td>stock_idx4</td> + <td>uniquename</td> +</tr> + +</table> + +<h3> + Constraints +</h3> + +<table border="1"> + +<tr class="IndexRow"> + <th> + Type + </th> + <th> + Fields + </th> +</tr> + +<tr class="IndexCell"> + <td>NOT NULL</td> + <td>stock_id</td> +</tr> + +<tr class="IndexCell"> + <td>FOREIGN KEY</td> + <td>dbxref_id</td> +</tr> + +<tr class="IndexCell"> + <td>FOREIGN KEY</td> + <td>organism_id</td> +</tr> + +<tr class="IndexCell"> + <td>NOT NULL</td> + <td>uniquename</td> +</tr> + +<tr class="IndexCell"> + <td>NOT NULL</td> + <td>type_id</td> +</tr> + +<tr class="IndexCell"> + <td>FOREIGN KEY</td> + <td>type_id</td> +</tr> + +<tr class="IndexCell"> + <td>NOT NULL</td> + <td>is_obsolete</td> +</tr> + +<tr class="IndexCell"> + <td>UNIQUE</td> + <td>organism_id, uniquename, type_id</td> +</tr> + +</table> + +<hr /> + +<!-- + Starting table 'stock_pub' + --> + +<a name="stock_pub" /> + +<table class="TableHeader" width="100%"> + <tr class="TableHeaderRow"> + <td class="TableHeaderCell"><h3> + stock_pub +</h3></td> + <a name="stock_pub"> <td class="TableHeaderCell" align="right"><a href="#top">Top</a></td> + </tr> +</table> + +<b> + Comments: +</b> + +<br /> + +<em> + <br /> + ================================================ <br /> + TABLE: stock_pub <br /> + ================================================ <br /> + Provenance. Linking table between stocks and, for example, a stocklist computer file. +</em> + +<table border="1"> + +<tr> + <th class="FieldHeader"> + Field Name + </th> + <th class="FieldHeader"> + Data Type + </th> + <th class="FieldHeader"> + Size + </th> + <th class="FieldHeader"> + Default Value + </th> + <th class="FieldHeader"> + Other + </th> + <th class="FieldHeader"> + Foreign Key + </th> +</tr> + +<tr class="tr-odd"> + <td class="FieldCellName"><a name="stock_pub-stock_pub_id">stock_pub_id</a></td> + <td class="FieldCellType">integer</td> + <td class="FieldCellSize">11</td> + <td class="FieldCellDefault"></td> + <td class="FieldCellOther">PRIMARY KEY, NOT NULL</td> + <td class="FieldCellFK"></td> +</tr> + +<tr class="tr-even"> + <td class="FieldCellName"><a name="stock_pub-stock_id">stock_id</a></td> + <td class="FieldCellType">integer</td> + <td class="FieldCellSize">10</td> + <td class="FieldCellDefault"></td> + <td class="FieldCellOther">UNIQUE, NOT NULL</td> + <td class="FieldCellFK"><a href="#stock-stock_id">stock.stock_id</a></td> +</tr> + +<tr class="tr-odd"> + <td class="FieldCellName"><a name="stock_pub-pub_id">pub_id</a></td> + <td class="FieldCellType">integer</td> + <td class="FieldCellSize">10</td> + <td class="FieldCellDefault"></td> + <td class="FieldCellOther">UNIQUE, NOT NULL</td> + <td class="FieldCellFK"><a href="#pub-pub_id">pub.pub_id</a></td> +</tr> + +</table> + +<h3> + Indices +</h3> + +<table border="1"> + +<tr class="IndexRow"> + <th> + Name + </th> + <th> + Fields + </th> +</tr> + +<tr class="IndexCell"> + <td>stock_pub_idx1</td> + <td>stock_id</td> +</tr> + +<tr class="IndexCell"> + <td>stock_pub_idx2</td> + <td>pub_id</td> +</tr> + +</table> + +<h3> + Constraints +</h3> + +<table border="1"> + +<tr class="IndexRow"> + <th> + Type + </th> + <th> + Fields + </th> +</tr> + +<tr class="IndexCell"> + <td>NOT NULL</td> + <td>stock_pub_id</td> +</tr> + +<tr class="IndexCell"> + <td>NOT NULL</td> + <td>stock_id</td> +</tr> + +<tr class="IndexCell"> + <td>FOREIGN KEY</td> + <td>stock_id</td> +</tr> + +<tr class="IndexCell"> + <td>NOT NULL</td> + <td>pub_id</td> +</tr> + +<tr class="IndexCell"> + <td>FOREIGN KEY</td> + <td>pub_id</td> +</tr> + +<tr class="IndexCell"> + <td>UNIQUE</td> + <td>stock_id, pub_id</td> +</tr> + +</table> + +<hr /> + +<!-- + Starting table 'stockprop' + --> + +<a name="stockprop" /> + +<table class="TableHeader" width="100%"> + <tr class="TableHeaderRow"> + <td class="TableHeaderCell"><h3> + stockprop +</h3></td> + <a name="stockprop"> <td class="TableHeaderCell" align="right"><a href="#top">Top</a></td> + </tr> +</table> + +<b> + Comments: +</b> + +<br /> + +<em> + <br /> + ================================================ <br /> + TABLE: stockprop <br /> + ================================================ <br /> + A stock can have any number of + slot-value property tags attached to it. This is an alternative to + hardcoding a list of columns in the relational schema, and is + completely extensible. There is a unique constraint, stockprop_c1, for + the combination of stock_id, rank, and type_id. Multivalued property-value pairs must be differentiated by rank. +</em> + +<table border="1"> + +<tr> + <th class="FieldHeader"> + Field Name + </th> + <th class="FieldHeader"> + Data Type + </th> + <th class="FieldHeader"> + Size + </th> + <th class="FieldHeader"> + Default Value + </th> + <th class="FieldHeader"> + Other + </th> + <th class="FieldHeader"> + Foreign Key + </th> +</tr> + +<tr class="tr-odd"> + <td class="FieldCellName"><a name="stockprop-stockprop_id">stockprop_id</a></td> + <td class="FieldCellType">integer</td> + <td class="FieldCellSize">11</td> + <td class="FieldCellDefault"></td> + <td class="FieldCellOther">PRIMARY KEY, NOT NULL</td> + <td class="FieldCellFK"></td> +</tr> + +<tr class="tr-even"> + <td class="FieldCellName"><a name="stockprop-stock_id">stock_id</a></td> + <td class="FieldCellType">integer</td> + <td class="FieldCellSize">10</td> + <td class="FieldCellDefault"></td> + <td class="FieldCellOther">UNIQUE, NOT NULL</td> + <td class="FieldCellFK"><a href="#stock-stock_id">stock.stock_id</a></td> +</tr> + +<tr class="tr-odd"> + <td class="FieldCellName"><a name="stockprop-type_id">type_id</a></td> + <td class="FieldCellType">integer</td> + <td class="FieldCellSize">10</td> + <td class="FieldCellDefault"></td> + <td class="FieldCellOther">UNIQUE, NOT NULL</td> + <td class="FieldCellFK"><a href="#cvterm-cvterm_id">cvterm.cvterm_id</a></td> +</tr> + +<tr class="tr-even"> + <td class="FieldCellName"><a name="stockprop-value">value</a></td> + <td class="FieldCellType">text</td> + <td class="FieldCellSize">64000</td> + <td class="FieldCellDefault">NULL</td> + <td class="FieldCellOther"></td> + <td class="FieldCellFK"></td> +</tr> + +<tr class="tr-odd"> + <td class="FieldCellName"><a name="stockprop-rank">rank</a></td> + <td class="FieldCellType">integer</td> + <td class="FieldCellSize">10</td> + <td class="FieldCellDefault">0</td> + <td class="FieldCellOther">UNIQUE, NOT NULL</td> + <td class="FieldCellFK"></td> +</tr> + +</table> + +<h3> + Indices +</h3> + +<table border="1"> + +<tr class="IndexRow"> + <th> + Name + </th> + <th> + Fields + </th> +</tr> + +<tr class="IndexCell"> + <td>stockprop_idx1</td> + <td>stock_id</td> +</tr> + +<tr class="IndexCell"> + <td>stockprop_idx2</td> + <td>type_id</td> +</tr> + +</table> + +<h3> + Constraints +</h3> + +<table border="1"> + +<tr class="IndexRow"> + <th> + Type + </th> + <th> + Fields + </th> +</tr> + +<tr class="IndexCell"> + <td>NOT NULL</td> + <td>stockprop_id</td> +</tr> + +<tr class="IndexCell"> + <td>NOT NULL</td> + <td>stock_id</td> +</tr> + +<tr class="IndexCell"> + <td>FOREIGN KEY</td> + <td>stock_id</td> +</tr> + +<tr class="IndexCell"> + <td>NOT NULL</td> + <td>type_id</td> +</tr> + +<tr class="IndexCell"> + <td>FOREIGN KEY</td> + <td>type_id</td> +</tr> + +<tr class="IndexCell"> + <td>NOT NULL</td> + <td>rank</td> +</tr> + +<tr class="IndexCell"> + <td>UNIQUE</td> + <td>stock_id, type_id, rank</td> +</tr> + +</table> + +<hr /> + +<!-- + Starting table 'stockprop_pub' + --> + +<a name="stockprop_pub" /> + +<table class="TableHeader" width="100%"> + <tr class="TableHeaderRow"> + <td class="TableHeaderCell"><h3> + stockprop_pub +</h3></td> + <a name="stockprop_pub"> <td class="TableHeaderCell" align="right"><a href="#top">Top</a></td> + </tr> +</table> + +<b> + Comments: +</b> + +<br /> + +<em> + <br /> + ================================================ <br /> + TABLE: stockprop_pub <br /> + ================================================ <br /> + Provenance. Any stockprop assignment can optionally be supported by a publication. +</em> + +<table border="1"> + +<tr> + <th class="FieldHeader"> + Field Name + </th> + <th class="FieldHeader"> + Data Type + </th> + <th class="FieldHeader"> + Size + </th> + <th class="FieldHeader"> + Default Value + </th> + <th class="FieldHeader"> + Other + </th> + <th class="FieldHeader"> + Foreign Key + </th> +</tr> + +<tr class="tr-odd"> + <td class="FieldCellName"><a name="stockprop_pub-stockprop_pub_id">stockprop_pub_id</a></td> + <td class="FieldCellType">integer</td> + <td class="FieldCellSize">11</td> + <td class="FieldCellDefault"></td> + <td class="FieldCellOther">PRIMARY KEY, NOT NULL</td> + <td class="FieldCellFK"></td> +</tr> + +<tr class="tr-even"> + <td class="FieldCellName"><a name="stockprop_pub-stockprop_id">stockprop_id</a></td> + <td class="FieldCellType">integer</td> + <td class="FieldCellSize">10</td> + <td class="FieldCellDefault"></td> + <td class="FieldCellOther">UNIQUE, NOT NULL</td> + <td class="FieldCellFK"><a href="#stockprop-stockprop_id">stockprop.stockprop_id</a></td> +</tr> + +<tr class="tr-odd"> + <td class="FieldCellName"><a name="stockprop_pub-pub_id">pub_id</a></td> + <td class="FieldCellType">integer</td> + <td class="FieldCellSize">10</td> + <td class="FieldCellDefault"></td> + <td class="FieldCellOther">UNIQUE, NOT NULL</td> + <td class="FieldCellFK"><a href="#pub-pub_id">pub.pub_id</a></td> +</tr> + +</table> + +<h3> + Indices +</h3> + +<table border="1"> + +<tr class="IndexRow"> + <th> + Name + </th> + <th> + Fields + </th> +</tr> + +<tr class="IndexCell"> + <td>stockprop_pub_idx1</td> + <td>stockprop_id</td> +</tr> + +<tr class="IndexCell"> + <td>stockprop_pub_idx2</td> + <td>pub_id</td> +</tr> + +</table> + +<h3> + Constraints +</h3> + +<table border="1"> + +<tr class="IndexRow"> + <th> + Type + </th> + <th> + Fields + </th> +</tr> + +<tr class="IndexCell"> + <td>NOT NULL</td> + <td>stockprop_pub_id</td> +</tr> + +<tr class="IndexCell"> + <td>NOT NULL</td> + <td>stockprop_id</td> +</tr> + +<tr class="IndexCell"> + <td>FOREIGN KEY</td> + <td>stockprop_id</td> +</tr> + +<tr class="IndexCell"> + <td>NOT NULL</td> + <td>pub_id</td> +</tr> + +<tr class="IndexCell"> + <td>FOREIGN KEY</td> + <td>pub_id</td> +</tr> + +<tr class="IndexCell"> + <td>UNIQUE</td> + <td>stockprop_id, pub_id</td> +</tr> + +</table> + +<hr /> + +<!-- + Starting table 'stock_relationship' + --> + +<a name="stock_relationship" /> + +<table class="TableHeader" width="100%"> + <tr class="TableHeaderRow"> + <td class="TableHeaderCell"><h3> + stock_relationship +</h3></td> + <a name="stock_relationship"> <td class="TableHeaderCell" align="right"><a href="#top">Top</a></td> + </tr> +</table> + +<b> + Comments: +</b> + +<br /> + +<em> + <br /> + ================================================ <br /> + TABLE: stock_relationship <br /> + ================================================ +</em> + +<table border="1"> + +<tr> + <th class="FieldHeader"> + Field Name + </th> + <th class="FieldHeader"> + Data Type + </th> + <th class="FieldHeader"> + Size + </th> + <th class="FieldHeader"> + Default Value + </th> + <th class="FieldHeader"> + Other + </th> + <th class="FieldHeader"> + Foreign Key + </th> +</tr> + +<tr class="tr-odd"> + <td class="FieldC... [truncated message content] |
From: <sco...@us...> - 2012-03-29 16:23:25
|
Revision: 25262 http://gmod.svn.sourceforge.net/gmod/?rev=25262&view=rev Author: scottcain Date: 2012-03-29 16:23:06 +0000 (Thu, 29 Mar 2012) Log Message: ----------- commiting Dave's/FlyBase's interaction module Added Paths: ----------- schema/trunk/chado/modules/interaction/ schema/trunk/chado/modules/interaction/interaction.sql Added: schema/trunk/chado/modules/interaction/interaction.sql =================================================================== --- schema/trunk/chado/modules/interaction/interaction.sql (rev 0) +++ schema/trunk/chado/modules/interaction/interaction.sql 2012-03-29 16:23:06 UTC (rev 25262) @@ -0,0 +1,316 @@ + + +-- ========================================== +-- Chado interaction module +-- +-- ========================================== +-- NOTES: +-- +-- Designed to represent various types of interactions +-- initially to be deployed for physical interactions (protein-protein) +-- between n number of chado features +-- +-- prop and pub tables follow usual chado conventions +-- +-- table:interaction serves as a coalescing table for all aspects of the interaction +-- a uniquename and link to a cvterm for the type of interaction are stored here +-- +-- table:feature_interaction links features to the interaction +-- a cvterm_id for the role that the feature is playing in the interaction +-- must be specified (eg. prey, bait, evidence_for) +-- rank may be used to order interacting features in an interaction +-- + +-- ================================================ +-- TABLE: interaction +-- ================================================ +drop table interaction cascade; +create table interaction ( + interaction_id serial NOT NULL, + primary key (interaction_id), + uniquename text NOT NULL, + type_id int NOT NULL, + foreign key (type_id) references cvterm (cvterm_id) + on delete cascade INITIALLY DEFERRED, + description text, + is_obsolete boolean not null default false, + constraint interaction_c1 unique(uniquename,type_id) +); +create index interaction_idx1 on interaction (uniquename); +create index interaction_idx2 on interaction (type_id); + +grant all on interaction to public; +grant all on interaction_interaction_id_seq to public; + +-- ================================================ +-- TABLE: interactionprop +-- ================================================ + +drop table interactionprop cascade; +create table interactionprop ( + interactionprop_id serial not null, + primary key (interactionprop_id), + interaction_id int not null, + foreign key (interaction_id) references interaction (interaction_id) on delete cascade INITIALLY DEFERRED, + type_id int not null, + foreign key (type_id) references cvterm (cvterm_id) on delete cascade INITIALLY DEFERRED, + value text null, + rank int not null default 0, + constraint interactionprop_c1 unique (interaction_id,type_id,rank) +); +create index interactionprop_idx1 on interactionprop (interaction_id); +create index interactionprop_idx2 on interactionprop (type_id); + +grant all on interactionprop to public; +grant all on interactionprop_interactionprop_id_seq to public; + +-- ================================================ +-- TABLE: interactionprop_pub +-- ================================================ +create table interactionprop_pub ( + interactionprop_pub_id serial not null, + primary key (interactionprop_pub_id), + interactionprop_id int not null, + foreign key (interactionprop_id) references interactionprop (interactionprop_id) on delete cascade INITIALLY DEFERRED, + pub_id int not null, + foreign key (pub_id) references pub (pub_id) on delete cascade INITIALLY DEFERRED, + constraint interactionprop_pub_c1 unique (interactionprop_id,pub_id) +); +create index interactionprop_pub_idx1 on interactionprop_pub (interactionprop_id); +create index interactionprop_pub_idx2 on interactionprop_pub (pub_id); + + +grant all on interactionprop_pub to public; +grant all on interactionprop_pub_interactionprop_pub_id_seq to public; + +-- ================================================ +-- TABLE: interaction_pub +-- ================================================ + +drop table interaction_pub cascade; +create table interaction_pub ( + interaction_pub_id serial not null, + primary key (interaction_pub_id), + interaction_id int not null, + foreign key (interaction_id) references interaction (interaction_id) on delete cascade INITIALLY DEFERRED, + pub_id int not null, + foreign key (pub_id) references pub (pub_id) on delete cascade INITIALLY DEFERRED, + constraint interaction_pub_c1 unique(interaction_id,pub_id) +); +create index interaction_pub_idx1 on interaction_pub (interaction_id); +create index interaction_pub_idx2 on interaction_pub (pub_id); + +grant all on interaction_pub to public; +grant all on interaction_pub_interaction_pub_id_seq to public; + +-- ================================================ +-- TABLE: interaction_expression +-- ================================================ + +drop table interaction_expression cascade; + +create table interaction_expression ( + interaction_expression_id serial not null, + primary key (interaction_expression_id), + expression_id int not null, + foreign key (expression_id) references expression (expression_id) on delete cascade INITIALLY DEFERRED, + interaction_id int not null, + foreign key (interaction_id) references interaction (interaction_id) on delete cascade INITIALLY DEFERRED, + pub_id int not null, + foreign key (pub_id) references pub (pub_id) on delete cascade INITIALLY DEFERRED, + unique(expression_id,interaction_id,pub_id) +); +create index interaction_expression_idx1 on interaction_expression (expression_id); +create index interaction_expression_idx2 on interaction_expression (interaction_id); +create index interaction_expression_idx3 on interaction_expression (pub_id); + +grant all on interaction_expression to public; +grant all on interaction_expression_interaction_expression_id_seq to public; + +--================================================ +-- TABLE: interaction_expressionprop +-- ================================================ + +drop table interaction_expressionprop; +create table interaction_expressionprop ( + interaction_expressionprop_id serial not null, + primary key (interaction_expressionprop_id), + interaction_expression_id int not null, + foreign key (interaction_expression_id) references interaction_expression (interaction_expression_id) on delete cascade, + type_id int not null, + foreign key (type_id) references cvterm (cvterm_id) on delete cascade INITIALLY DEFERRED, + value text null, + rank int not null default 0, + unique (interaction_expression_id,type_id,rank) +); + + +create index interaction_expressionprop_idx1 on interaction_expressionprop (interaction_expression_id); +create index interaction_expressionprop_idx2 on interaction_expressionprop (type_id); + +grant all on interaction_expressionprop to public; +grant all on interaction_expressionprop_interaction_expressionprop_id_seq to public; + +-- ================================================ +-- TABLE: interaction_cvterm +-- ================================================ + +drop table interaction_cvterm cascade; + +create table interaction_cvterm ( + interaction_cvterm_id serial not null, + primary key (interaction_cvterm_id), + interaction_id int not null, + foreign key (interaction_id) references interaction (interaction_id) on delete cascade INITIALLY DEFERRED, + cvterm_id int not null, + foreign key (cvterm_id) references cvterm (cvterm_id) on delete cascade INITIALLY DEFERRED, + unique(interaction_id,cvterm_id) +); +create index interaction_cvterm_idx1 on interaction_cvterm (interaction_id); +create index interaction_cvterm_idx2 on interaction_cvterm (cvterm_id); +create index interaction_cvterm_idx3 on interaction_cvterm (pub_id); + +grant all on interaction_cvterm to public; +grant all on interaction_cvterm_interaction_cvterm_id_seq to public; + +--================================================ +-- TABLE: interaction_cvtermprop +-- ================================================ + +drop table interaction_cvtermprop; +create table interaction_cvtermprop ( + interaction_cvtermprop_id serial not null, + primary key (interaction_cvtermprop_id), + interaction_cvterm_id int not null, + foreign key (interaction_cvterm_id) references interaction_cvterm (interaction_cvterm_id) on delete cascade, + type_id int not null, + foreign key (type_id) references cvterm (cvterm_id) on delete cascade INITIALLY DEFERRED, + value text null, + rank int not null default 0, + unique (interaction_cvterm_id,type_id,rank) +); + + +create index interaction_cvtermprop_idx1 on interaction_cvtermprop (interaction_cvterm_id); +create index interaction_cvtermprop_idx2 on interaction_cvtermprop (type_id); + +grant all on interaction_cvtermprop to public; +grant all on interaction_cvtermprop_interaction_cvtermprop_id_seq to public; + + +-- ================================================ +-- TABLE: library_interaction +-- ================================================ + +drop table library_interaction cascade; + +create table library_interaction ( + library_interaction_id serial not null, + primary key (library_interaction_id), + interaction_id int not null, + foreign key (interaction_id) references interaction (interaction_id) on delete cascade INITIALLY DEFERRED, + library_id int not null, + foreign key (library_id) references library (library_id) on delete cascade INITIALLY DEFERRED, + pub_id int not null, + foreign key (pub_id) references pub (pub_id) on delete cascade INITIALLY DEFERRED, + unique(interaction_id,library_id,pub_id) +); +create index library_interaction_idx1 on library_interaction (interaction_id); +create index library_interaction_idx2 on library_interaction (library_id); +create index library_interaction_idx3 on library_interaction (pub_id); + +grant all on library_interaction to public; +grant all on library_interaction_library_interaction_id_seq to public; + +-- ================================================ +-- TABLE: feature_interaction +-- ================================================ + +drop table feature_interaction cascade; +create table feature_interaction ( + feature_interaction_id serial not null, + primary key (feature_interaction_id), + feature_id int not null, + foreign key (feature_id) references feature (feature_id) on delete cascade INITIALLY DEFERRED, + interaction_id int not null, + foreign key (interaction_id) references interaction (interaction_id) on delete cascade INITIALLY DEFERRED, + role_id int not null, + foreign key (role_id) references cvterm (cvterm_id) on delete cascade INITIALLY DEFERRED, + rank int not null default 0, + unique(feature_id,interaction_id, role_id) +); +create index feature_interaction_idx1 on feature_interaction (feature_id); +create index feature_interaction_idx2 on feature_interaction (interaction_id); +create index feature_interaction_idx3 on feature_interaction (role_id); + +grant all on feature_interaction to public; +grant all on feature_interaction_feature_interaction_id_seq to public; + +-- ? do we want to add rank to the unique key ? thinking stochiometry issues +-- and might we have one form modified and not another ? may be too much + +-- ================================================ +-- TABLE: feature_interactionprop +-- ================================================ + +drop table feature_interactionprop cascade; +create table feature_interactionprop ( + feature_interactionprop_id serial not null, + primary key (feature_interactionprop_id), + feature_interaction_id int not null, + foreign key (feature_interaction_id) references feature_interaction (feature_interaction_id) on delete cascade INITIALLY DEFERRED, + type_id int not null, + foreign key (type_id) references cvterm (cvterm_id) on delete cascade INITIALLY DEFERRED, + value text null, + rank int not null default 0, + constraint feature_interactionprop_c1 unique (feature_interaction_id,type_id,rank) +); +create index feature_interactionprop_idx1 on feature_interactionprop (feature_interaction_id); +create index feature_interactionprop_idx2 on feature_interactionprop (type_id); + +grant all on feature_interactionprop to public; +grant all on feature_interactionprop_feature_interactionprop_id_seq to public; + +-- ================================================ +-- TABLE: feature_interaction_pub +-- ================================================ + +drop table feature_interaction_pub cascade; +create table feature_interaction_pub ( + feature_interaction_pub_id serial not null, + primary key (feature_interaction_pub_id), + feature_interaction_id int not null, + foreign key (feature_interaction_id) references feature_interaction (feature_interaction_id) on delete cascade INITIALLY DEFERRED, + pub_id int not null, + foreign key (pub_id) references pub (pub_id) on delete cascade INITIALLY DEFERRED, + constraint feature_interaction_pub_c1 unique(feature_interaction_id,pub_id) +); +create index feature_interaction_pub_idx1 on feature_interaction_pub (feature_interaction_id); +create index feature_interaction_pub_idx2 on feature_interaction_pub (pub_id); + +grant all on feature_interaction_pub to public; +grant all on feature_interaction_pub_feature_interaction_pub_id_seq to public; + +-- ================================================ +-- TABLE: interaction_cell_line +-- ================================================ + +drop table interaction_cell_line cascade; + +create table interaction_cell_line ( + interaction_cell_line_id serial not null, + primary key (interaction_cell_line_id), + cell_line_id int not null, + foreign key (cell_line_id) references cell_line (cell_line_id) on delete cascade INITIALLY DEFERRED, + interaction_id int not null, + foreign key (interaction_id) references interaction (interaction_id) on delete cascade INITIALLY DEFERRED, + pub_id int not null, + foreign key (pub_id) references pub (pub_id) on delete cascade INITIALLY DEFERRED, + unique(cell_line_id,interaction_id,pub_id) +); +create index interaction_cell_line_idx1 on interaction_cell_line (cell_line_id); +create index interaction_cell_line_idx2 on interaction_cell_line (interaction_id); +create index interaction_cell_line_idx3 on interaction_cell_line (pub_id); + +grant all on interaction_cell_line to public; +grant all on interaction_cell_line_interaction_cell_line_id_seq to public; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <em...@us...> - 2013-01-15 15:11:03
|
Revision: 25279 http://gmod.svn.sourceforge.net/gmod/?rev=25279&view=rev Author: emmert Date: 2013-01-15 15:10:50 +0000 (Tue, 15 Jan 2013) Log Message: ----------- Extensions to interaction, expression, and organism modules; extension to library module to link to these. All changes are back-compatible. Modified Paths: -------------- schema/trunk/chado/modules/expression/expression.sql schema/trunk/chado/modules/interaction/interaction.sql schema/trunk/chado/modules/library/library.sql schema/trunk/chado/modules/organism/organism.sql Modified: schema/trunk/chado/modules/expression/expression.sql =================================================================== --- schema/trunk/chado/modules/expression/expression.sql 2012-12-13 19:59:18 UTC (rev 25278) +++ schema/trunk/chado/modules/expression/expression.sql 2013-01-15 15:10:50 UTC (rev 25279) @@ -21,11 +21,12 @@ uniquename text not null, md5checksum character(32), description text, - constraint expression_c1 unique(uniquename) + constraint expression_c1 unique (uniquename) ); COMMENT ON TABLE expression IS 'The expression table is essentially a bridge table.'; + -- ================================================ -- TABLE: expression_cvterm -- ================================================ @@ -40,12 +41,13 @@ rank int not null default 0, cvterm_type_id int not null, foreign key (cvterm_type_id) references cvterm (cvterm_id) on delete cascade INITIALLY DEFERRED, - constraint expression_cvterm_c1 unique(expression_id,cvterm_id,cvterm_type_id) + constraint expression_cvterm_c1 unique (expression_id,cvterm_id,rank,cvterm_type_id) ); create index expression_cvterm_idx1 on expression_cvterm (expression_id); create index expression_cvterm_idx2 on expression_cvterm (cvterm_id); create index expression_cvterm_idx3 on expression_cvterm (cvterm_type_id); + --================================================ -- TABLE: expression_cvtermprop -- ================================================ @@ -112,7 +114,7 @@ foreign key (expression_id) references expression (expression_id) on delete cascade INITIALLY DEFERRED, pub_id int not null, foreign key (pub_id) references pub (pub_id) on delete cascade INITIALLY DEFERRED, - constraint expression_pub_c1 unique(expression_id,pub_id) + constraint expression_pub_c1 unique (expression_id,pub_id) ); create index expression_pub_idx1 on expression_pub (expression_id); create index expression_pub_idx2 on expression_pub (pub_id); @@ -131,7 +133,7 @@ foreign key (feature_id) references feature (feature_id) on delete cascade INITIALLY DEFERRED, pub_id int not null, foreign key (pub_id) references pub (pub_id) on delete cascade INITIALLY DEFERRED, - constraint feature_expression_c1 unique(expression_id,feature_id,pub_id) + constraint feature_expression_c1 unique (expression_id,feature_id,pub_id) ); create index feature_expression_idx1 on feature_expression (expression_id); create index feature_expression_idx2 on feature_expression (feature_id); Modified: schema/trunk/chado/modules/interaction/interaction.sql =================================================================== --- schema/trunk/chado/modules/interaction/interaction.sql 2012-12-13 19:59:18 UTC (rev 25278) +++ schema/trunk/chado/modules/interaction/interaction.sql 2013-01-15 15:10:50 UTC (rev 25279) @@ -24,6 +24,7 @@ -- ================================================ -- TABLE: interaction -- ================================================ + drop table interaction cascade; create table interaction ( interaction_id serial NOT NULL, @@ -34,13 +35,11 @@ on delete cascade INITIALLY DEFERRED, description text, is_obsolete boolean not null default false, - constraint interaction_c1 unique(uniquename,type_id) + constraint interaction_c1 unique (uniquename,type_id) ); create index interaction_idx1 on interaction (uniquename); create index interaction_idx2 on interaction (type_id); -grant all on interaction to public; -grant all on interaction_interaction_id_seq to public; -- ================================================ -- TABLE: interactionprop @@ -61,12 +60,12 @@ create index interactionprop_idx1 on interactionprop (interaction_id); create index interactionprop_idx2 on interactionprop (type_id); -grant all on interactionprop to public; -grant all on interactionprop_interactionprop_id_seq to public; -- ================================================ -- TABLE: interactionprop_pub -- ================================================ + +drop table interactionprop_pub cascade; create table interactionprop_pub ( interactionprop_pub_id serial not null, primary key (interactionprop_pub_id), @@ -80,9 +79,6 @@ create index interactionprop_pub_idx2 on interactionprop_pub (pub_id); -grant all on interactionprop_pub to public; -grant all on interactionprop_pub_interactionprop_pub_id_seq to public; - -- ================================================ -- TABLE: interaction_pub -- ================================================ @@ -100,15 +96,12 @@ create index interaction_pub_idx1 on interaction_pub (interaction_id); create index interaction_pub_idx2 on interaction_pub (pub_id); -grant all on interaction_pub to public; -grant all on interaction_pub_interaction_pub_id_seq to public; -- ================================================ -- TABLE: interaction_expression -- ================================================ drop table interaction_expression cascade; - create table interaction_expression ( interaction_expression_id serial not null, primary key (interaction_expression_id), @@ -118,14 +111,12 @@ foreign key (interaction_id) references interaction (interaction_id) on delete cascade INITIALLY DEFERRED, pub_id int not null, foreign key (pub_id) references pub (pub_id) on delete cascade INITIALLY DEFERRED, - unique(expression_id,interaction_id,pub_id) + constraint interaction_expression_c1 unique (expression_id,interaction_id,pub_id) ); create index interaction_expression_idx1 on interaction_expression (expression_id); create index interaction_expression_idx2 on interaction_expression (interaction_id); create index interaction_expression_idx3 on interaction_expression (pub_id); -grant all on interaction_expression to public; -grant all on interaction_expression_interaction_expression_id_seq to public; --================================================ -- TABLE: interaction_expressionprop @@ -141,22 +132,17 @@ foreign key (type_id) references cvterm (cvterm_id) on delete cascade INITIALLY DEFERRED, value text null, rank int not null default 0, - unique (interaction_expression_id,type_id,rank) + constraint interaction_expressionprop_c1 unique (interaction_expression_id,type_id,rank) ); - - create index interaction_expressionprop_idx1 on interaction_expressionprop (interaction_expression_id); create index interaction_expressionprop_idx2 on interaction_expressionprop (type_id); -grant all on interaction_expressionprop to public; -grant all on interaction_expressionprop_interaction_expressionprop_id_seq to public; -- ================================================ -- TABLE: interaction_cvterm -- ================================================ drop table interaction_cvterm cascade; - create table interaction_cvterm ( interaction_cvterm_id serial not null, primary key (interaction_cvterm_id), @@ -164,20 +150,17 @@ foreign key (interaction_id) references interaction (interaction_id) on delete cascade INITIALLY DEFERRED, cvterm_id int not null, foreign key (cvterm_id) references cvterm (cvterm_id) on delete cascade INITIALLY DEFERRED, - unique(interaction_id,cvterm_id) + constraint interaction_cvterm_c1 unique (interaction_id,cvterm_id) ); create index interaction_cvterm_idx1 on interaction_cvterm (interaction_id); create index interaction_cvterm_idx2 on interaction_cvterm (cvterm_id); -create index interaction_cvterm_idx3 on interaction_cvterm (pub_id); -grant all on interaction_cvterm to public; -grant all on interaction_cvterm_interaction_cvterm_id_seq to public; --================================================ -- TABLE: interaction_cvtermprop -- ================================================ -drop table interaction_cvtermprop; +drop table interaction_cvtermprop cascade; create table interaction_cvtermprop ( interaction_cvtermprop_id serial not null, primary key (interaction_cvtermprop_id), @@ -187,42 +170,13 @@ foreign key (type_id) references cvterm (cvterm_id) on delete cascade INITIALLY DEFERRED, value text null, rank int not null default 0, - unique (interaction_cvterm_id,type_id,rank) + constraint interaction_cvtermprop_c1 unique (interaction_cvterm_id,type_id,rank) ); - - create index interaction_cvtermprop_idx1 on interaction_cvtermprop (interaction_cvterm_id); create index interaction_cvtermprop_idx2 on interaction_cvtermprop (type_id); -grant all on interaction_cvtermprop to public; -grant all on interaction_cvtermprop_interaction_cvtermprop_id_seq to public; - -- ================================================ --- TABLE: library_interaction --- ================================================ - -drop table library_interaction cascade; - -create table library_interaction ( - library_interaction_id serial not null, - primary key (library_interaction_id), - interaction_id int not null, - foreign key (interaction_id) references interaction (interaction_id) on delete cascade INITIALLY DEFERRED, - library_id int not null, - foreign key (library_id) references library (library_id) on delete cascade INITIALLY DEFERRED, - pub_id int not null, - foreign key (pub_id) references pub (pub_id) on delete cascade INITIALLY DEFERRED, - unique(interaction_id,library_id,pub_id) -); -create index library_interaction_idx1 on library_interaction (interaction_id); -create index library_interaction_idx2 on library_interaction (library_id); -create index library_interaction_idx3 on library_interaction (pub_id); - -grant all on library_interaction to public; -grant all on library_interaction_library_interaction_id_seq to public; - --- ================================================ -- TABLE: feature_interaction -- ================================================ @@ -237,18 +191,16 @@ role_id int not null, foreign key (role_id) references cvterm (cvterm_id) on delete cascade INITIALLY DEFERRED, rank int not null default 0, - unique(feature_id,interaction_id, role_id) + constraint feature_interaction_c1 unique (feature_id,interaction_id, role_id) ); create index feature_interaction_idx1 on feature_interaction (feature_id); create index feature_interaction_idx2 on feature_interaction (interaction_id); create index feature_interaction_idx3 on feature_interaction (role_id); -grant all on feature_interaction to public; -grant all on feature_interaction_feature_interaction_id_seq to public; - -- ? do we want to add rank to the unique key ? thinking stochiometry issues -- and might we have one form modified and not another ? may be too much + -- ================================================ -- TABLE: feature_interactionprop -- ================================================ @@ -268,8 +220,6 @@ create index feature_interactionprop_idx1 on feature_interactionprop (feature_interaction_id); create index feature_interactionprop_idx2 on feature_interactionprop (type_id); -grant all on feature_interactionprop to public; -grant all on feature_interactionprop_feature_interactionprop_id_seq to public; -- ================================================ -- TABLE: feature_interaction_pub @@ -288,15 +238,12 @@ create index feature_interaction_pub_idx1 on feature_interaction_pub (feature_interaction_id); create index feature_interaction_pub_idx2 on feature_interaction_pub (pub_id); -grant all on feature_interaction_pub to public; -grant all on feature_interaction_pub_feature_interaction_pub_id_seq to public; -- ================================================ -- TABLE: interaction_cell_line -- ================================================ drop table interaction_cell_line cascade; - create table interaction_cell_line ( interaction_cell_line_id serial not null, primary key (interaction_cell_line_id), @@ -306,11 +253,43 @@ foreign key (interaction_id) references interaction (interaction_id) on delete cascade INITIALLY DEFERRED, pub_id int not null, foreign key (pub_id) references pub (pub_id) on delete cascade INITIALLY DEFERRED, - unique(cell_line_id,interaction_id,pub_id) + constraint interaction_cell_line_c1 unique (cell_line_id,interaction_id,pub_id) ); create index interaction_cell_line_idx1 on interaction_cell_line (cell_line_id); create index interaction_cell_line_idx2 on interaction_cell_line (interaction_id); create index interaction_cell_line_idx3 on interaction_cell_line (pub_id); -grant all on interaction_cell_line to public; -grant all on interaction_cell_line_interaction_cell_line_id_seq to public; + +-- ================================================ +-- TABLE: interaction_group +-- ================================================ + +drop table interaction_group cascade; +create table interaction_group ( + interaction_group_id serial not null, + primary key (interaction_group_id), + uniquename text NOT NULL, + is_obsolete boolean not null default false, + description text, + constraint interaction_group_c1 unique (uniquename) +); +create index interaction_group_idx1 on interaction_group (uniquename); + + +-- ================================================ +-- TABLE: interaction_group_feature_interaction +-- ================================================ + +drop table interaction_group_feature_interaction cascade; +create table interaction_group_feature_interaction ( + interaction_group_feature_interaction_id serial not null, + primary key (interaction_group_feature_interaction_id), + interaction_group_id int not null, + foreign key (interaction_group_id) references interaction_group (interaction_group_id) on delete cascade INITIALLY DEFERRED, + feature_interaction_id int not null, + foreign key (feature_interaction_id) references feature_interaction (feature_interaction_id) on delete cascade INITIALLY DEFERRED, + rank int not null default 0, + constraint interaction_group_feature_interaction_c1 unique (interaction_group_id,feature_interaction_id,rank) +); +create index interaction_group_feature_interaction_idx1 on interaction_group_feature_interaction (interaction_group_id); +create index interaction_group_feature_interaction_idx2 on interaction_group_feature_interaction (feature_interaction_id); Modified: schema/trunk/chado/modules/library/library.sql =================================================================== --- schema/trunk/chado/modules/library/library.sql 2012-12-13 19:59:18 UTC (rev 25278) +++ schema/trunk/chado/modules/library/library.sql 2013-01-15 15:10:50 UTC (rev 25279) @@ -7,6 +7,9 @@ -- :import cvterm from cv -- :import pub from pub -- :import organism from organism +-- :import expression from expression +-- :import interaction from interaction +-- :import strain from strain -- ================================================================= -- ================================================ @@ -178,6 +181,133 @@ create index library_dbxref_idx2 on library_dbxref (dbxref_id); +-- ================================================ +-- TABLE: library_expression +-- ================================================ +create table library_expression ( + library_expression_id serial not null, + primary key (library_expression_id), + library_id int not null, + foreign key (library_id) references library (library_id) on delete cascade INITIALLY DEFERRED, + expression_id int not null, + foreign key (expression_id) references expression (expression_id) on delete cascade INITIALLY DEFERRED, + pub_id int not null, + foreign key (pub_id) references pub (pub_id), + constraint library_expression_c1 unique (library_id,expression_id) +); +create index library_expression_idx1 on library_expression (library_id); +create index library_expression_idx2 on library_expression (expression_id); +create index library_expression_idx3 on library_expression (pub_id); +-- ================================================ +-- TABLE: library_expressionprop +-- ================================================ + +create table library_expressionprop ( + library_expressionprop_id serial not null, + primary key (library_expressionprop_id), + library_expression_id int not null, + foreign key (library_expression_id) references library_expression (library_expression_id) on delete cascade INITIALLY DEFERRED, + type_id int not null, + foreign key (type_id) references cvterm (cvterm_id), + value text null, + rank int not null default 0, + constraint library_expressionprop_c1 unique (library_expression_id,type_id,rank) +); +create index library_expressionprop_idx1 on library_expressionprop (library_expression_id); +create index library_expressionprop_idx2 on library_expressionprop (type_id); + + +-- ================================================ +-- TABLE: library_featureprop +-- ================================================ + +create table library_featureprop ( + library_featureprop_id serial not null, + primary key (library_featureprop_id), + library_feature_id int not null, + foreign key (library_feature_id) references library_feature (library_feature_id) on delete cascade INITIALLY DEFERRED, + type_id int not null, + foreign key (type_id) references cvterm (cvterm_id), + value text null, + rank int not null default 0, + constraint library_featureprop_c1 unique (library_feature_id,type_id,rank) +); +create index library_featureprop_idx1 on library_featureprop (library_feature_id); +create index library_featureprop_idx2 on library_featureprop (type_id); + + +-- ================================================ +-- TABLE: library_interaction +-- ================================================ + +create table library_interaction ( + library_interaction_id serial not null, + primary key (library_interaction_id), + library_id int not null, + foreign key (library_id) references library (library_id) on delete cascade INITIALLY DEFERRED, + interaction_id int not null, + foreign key (interaction_id) references interaction (interaction_id) on delete cascade INITIALLY DEFERRED, + pub_id int not null, + foreign key (pub_id) references pub (pub_id), + constraint library_interaction_c1 unique (interaction_id,library_id,pub_id) +); +create index library_interaction_idx1 on library_interaction (interaction_id); +create index library_interaction_idx2 on library_interaction (library_id); +create index library_interaction_idx3 on library_interaction (pub_id); + + +-- ================================================ +-- TABLE: library_relationship +-- ================================================ + +create table library_relationship ( + library_relationship_id serial not null, + primary key (library_relationship_id), + subject_id int not null, + foreign key (subject_id) references library (library_id) on delete cascade INITIALLY DEFERRED, + object_id int not null, + foreign key (object_id) references library (library_id) on delete cascade INITIALLY DEFERRED, + type_id int not null, + foreign key (type_id) references cvterm (cvterm_id), + constraint library_relationship_c1 unique (subject_id,object_id,type_id) +); +create index library_relationship_idx1 on library_relationship (subject_id); +create index library_relationship_idx2 on library_relationship (object_id); +create index library_relationship_idx3 on library_relationship (type_id); + + +-- ================================================ +-- TABLE: library_relationship_pub +-- ================================================ + +create table library_relationship_pub ( + library_relationship_pub_id serial not null, + primary key (library_relationship_pub_id), + library_relationship_id int not null, + foreign key (library_relationship_id) references library_relationship (library_relationship_id) on delete cascade INITIALLY DEFERRED, + pub_id int not null, + foreign key (pub_id) references pub (pub_id), + constraint library_relationship_pub_c1 unique (library_relationship_id,pub_id) +); +create index library_relationship_pub_idx1 on library_relationship_pub (library_relationship_id); +create index library_relationship_pub_idx2 on library_relationship_pub (pub_id); + + +-- ================================================ +-- TABLE: library_strain +-- ================================================ + +create table library_strain ( + library_strain_id serial not null, + primary key (library_strain_id), + library_id int not null, + foreign key (library_id) references library (library_id) on delete cascade INITIALLY DEFERRED, + strain_id int not null, + foreign key (strain_id) references strain (strain_id) on delete cascade INITIALLY DEFERRED, + constraint library_strain_c1 unique (library_id,strain_id) +); +create index library_strain_idx1 on library_strain (library_id); +create index library_strain_idx2 on library_strain (strain_id); Modified: schema/trunk/chado/modules/organism/organism.sql =================================================================== --- schema/trunk/chado/modules/organism/organism.sql 2012-12-13 19:59:18 UTC (rev 25278) +++ schema/trunk/chado/modules/organism/organism.sql 2013-01-15 15:10:50 UTC (rev 25279) @@ -1,4 +1,4 @@ --- $Id: organism.sql,v 1.19 2007-04-01 18:45:41 briano Exp $ +-- $Id: organism.sql,v 1.19 2007/04/01 18:45:41 briano Exp $ -- ========================================== -- Chado organism module -- @@ -13,6 +13,7 @@ -- TABLE: organism -- ================================================ +drop table organism cascade; create table organism ( organism_id serial not null, primary key (organism_id), @@ -37,10 +38,12 @@ this is appended onto the species name. Follows standard NCBI taxonomy pattern.'; + -- ================================================ -- TABLE: organism_dbxref -- ================================================ +drop table organism_dbxref cascade; create table organism_dbxref ( organism_dbxref_id serial not null, primary key (organism_dbxref_id), @@ -53,10 +56,12 @@ create index organism_dbxref_idx1 on organism_dbxref (organism_id); create index organism_dbxref_idx2 on organism_dbxref (dbxref_id); + -- ================================================ -- TABLE: organismprop -- ================================================ +drop table organismprop cascade; create table organismprop ( organismprop_id serial not null, primary key (organismprop_id), @@ -73,3 +78,370 @@ COMMENT ON TABLE organismprop IS 'Tag-value properties - follows standard chado model.'; + +-- ================================================ +-- TABLE: organismprop_pub +-- ================================================ + +drop table organismprop_pub cascade; +create table organismprop_pub ( + organismprop_pub_id serial not null, + primary key (organismprop_pub_id), + organismprop_id int not null, + foreign key (organismprop_id) references organismprop (organismprop_id) on delete cascade INITIALLY DEFERRED, + pub_id int not null, + foreign key (pub_id) references pub (pub_id) on delete cascade INITIALLY DEFERRED, + value text null, + rank int not null default 0, + constraint organismprop_pub_c1 unique (organismprop_id,pub_id) +); +create index organismprop_pub_idx1 on organismprop_pub (organismprop_id); +create index organismprop_pub_idx2 on organismprop_pub (pub_id); + +COMMENT ON TABLE organismprop_pub IS 'Attribution for organismprop.'; + + +-- ================================================ +-- TABLE: organism_pub +-- ================================================ + +drop table organism_pub cascade; +create table organism_pub ( + organism_pub_id serial not null, + primary key (organism_pub_id), + organism_id int not null, + foreign key (organism_id) references organism (organism_id) on delete cascade INITIALLY DEFERRED, + pub_id int not null, + foreign key (pub_id) references pub (pub_id) on delete cascade INITIALLY DEFERRED, + constraint organism_pub_c1 unique (organism_id,pub_id) +); +create index organism_pub_idx1 on organism_pub (organism_id); +create index organism_pub_idx2 on organism_pub (pub_id); + + +-- ================================================ +-- TABLE: organism_cvterm +-- ================================================ + +drop table organism_cvterm cascade; +create table organism_cvterm ( + organism_cvterm_id serial not null, + primary key (organism_cvterm_id), + organism_id int not null, + foreign key (organism_id) references organism (organism_id) on delete cascade INITIALLY +DEFERRED, + cvterm_id int not null, + foreign key (cvterm_id) references cvterm (cvterm_id) on delete cascade INITIALLY DEFERRED, + rank int not null default 0, + pub_id int not null, + foreign key (pub_id) references pub (pub_id) on delete cascade INITIALLY DEFERRED, + constraint organism_cvterm_c1 unique(organism_id,cvterm_id,pub_id) +); +create index organism_cvterm_idx1 on organism_cvterm (organism_id); +create index organism_cvterm_idx2 on organism_cvterm (cvterm_id); + +COMMENT ON TABLE organism_cvterm IS 'organism to cvterm associations. Examples: taxonomic name'; + +COMMENT ON COLUMN organism_cvterm.rank IS 'Property-Value +ordering. Any organism_cvterm can have multiple values for any particular +property type - these are ordered in a list using rank, counting from +zero. For properties that are single-valued rather than multi-valued, +the default 0 value should be used'; + + +--================================================ +-- TABLE: organism_cvtermprop +-- ================================================ + +drop table organism_cvtermprop cascade; +create table organism_cvtermprop ( + organism_cvtermprop_id serial not null, + primary key (organism_cvtermprop_id), + organism_cvterm_id int not null, + foreign key (organism_cvterm_id) references organism_cvterm (organism_cvterm_id) on delete cascade, + type_id int not null, + foreign key (type_id) references cvterm (cvterm_id) on delete cascade INITIALLY DEFERRED, + value text null, + rank int not null default 0, + constraint organism_cvtermprop_c1 unique (organism_cvterm_id,type_id,rank) +); +create index organism_cvtermprop_idx1 on organism_cvtermprop (organism_cvterm_id); +create index organism_cvtermprop_idx2 on organism_cvtermprop (type_id); + +COMMENT ON TABLE organism_cvtermprop IS 'Extensible properties for +organism to cvterm associations. Examples: qualifiers'; + +COMMENT ON COLUMN organism_cvtermprop.type_id IS 'The name of the +property/slot is a cvterm. The meaning of the property is defined in +that cvterm. '; + +COMMENT ON COLUMN organism_cvtermprop.value IS 'The value of the +property, represented as text. Numeric values are converted to their +text representation. This is less efficient than using native database +types, but is easier to query.'; + +COMMENT ON COLUMN organism_cvtermprop.rank IS 'Property-Value +ordering. Any organism_cvterm can have multiple values for any particular +property type - these are ordered in a list using rank, counting from +zero. For properties that are single-valued rather than multi-valued, +the default 0 value should be used'; + + +-- ================================================ +-- TABLE: strain +-- ================================================ + +drop table strain cascade; +create table strain ( + strain_id serial not null, + primary key (strain_id), + name varchar(255) null, + uniquename text not null, + organism_id int not null, + foreign key (organism_id) references organism (organism_id) on delete cascade INITIALLY DEFERRED, + dbxref_id int null, + foreign key (dbxref_id) references dbxref (dbxref_id) on delete cascade INITIALLY DEFERRED, + is_obsolete boolean not null default 'false', + constraint strain_c1 unique (organism_id, uniquename) +); + +create index strain_idx1 on strain (uniquename); +create index strain_idx2 on strain (name); + +COMMENT ON TABLE strain IS 'A characterized strain of a given organism.'; + + +-- ================================================ +-- TABLE: strain_cvterm +-- ================================================ + +drop table strain_cvterm cascade; +create table strain_cvterm ( + strain_cvterm_id serial not null, + primary key (strain_cvterm_id), + strain_id int not null, + foreign key (strain_id) references strain (strain_id) on delete cascade INITIALLY DEFERRED, + cvterm_id int not null, + foreign key (cvterm_id) references cvterm (cvterm_id) on delete cascade INITIALLY DEFERRED, + pub_id int not null, + foreign key (pub_id) references pub (pub_id) on delete cascade INITIALLY DEFERRED, + constraint strain_cvterm_c1 unique(strain_id,cvterm_id,pub_id) +); +create index strain_cvterm_idx1 on strain_cvterm (strain_id); +create index strain_cvterm_idx2 on strain_cvterm (cvterm_id); + +COMMENT ON TABLE strain_cvterm IS 'strain to cvterm associations. Examples: GOid'; + +--================================================ +-- TABLE: strain_cvtermprop +-- ================================================ + +drop table strain_cvtermprop cascade; +create table strain_cvtermprop ( + strain_cvtermprop_id serial not null, + primary key (strain_cvtermprop_id), + strain_cvterm_id int not null, + foreign key (strain_cvterm_id) references strain_cvterm (strain_cvterm_id) on delete cascade, + type_id int not null, + foreign key (type_id) references cvterm (cvterm_id) on delete cascade INITIALLY DEFERRED, + value text null, + rank int not null default 0, + constraint strain_cvtermprop_c1 unique (strain_cvterm_id,type_id,rank) +); +create index strain_cvtermprop_idx1 on strain_cvtermprop (strain_cvterm_id); +create index strain_cvtermprop_idx2 on strain_cvtermprop (type_id); + +COMMENT ON TABLE strain_cvtermprop IS 'Extensible properties for +strain to cvterm associations. Examples: qualifiers'; + +COMMENT ON COLUMN strain_cvtermprop.type_id IS 'The name of the +property/slot is a cvterm. The meaning of the property is defined in +that cvterm. '; + +COMMENT ON COLUMN strain_cvtermprop.value IS 'The value of the +property, represented as text. Numeric values are converted to their +text representation. This is less efficient than using native database +types, but is easier to query.'; + +COMMENT ON COLUMN strain_cvtermprop.rank IS 'Property-Value +ordering. Any strain_cvterm can have multiple values for any particular +property type - these are ordered in a list using rank, counting from +zero. For properties that are single-valued rather than multi-valued, +the default 0 value should be used'; + + +-- ================================================ +-- TABLE: strain_relationship +-- ================================================ + +drop table strain_relationship cascade; +create table strain_relationship ( + strain_relationship_id serial not null, + primary key (strain_relationship_id), + subject_id int not null, + foreign key (subject_id) references strain (strain_id) on delete cascade INITIALLY DEFERRED, + object_id int not null, + foreign key (object_id) references strain (strain_id) on delete cascade INITIALLY DEFERRED, + type_id int not null, + foreign key (type_id) references cvterm (cvterm_id) on delete cascade INITIALLY DEFERRED, + value text null, + rank int not null default 0, + constraint strain_relationship_c1 unique (subject_id, object_id, type_id, rank) +); +create index strain_relationship_idx1 on strain_relationship (subject_id); +create index strain_relationship_idx2 on strain_relationship (object_id); + +COMMENT ON TABLE strain_relationship IS 'Relationships between strains, eg, progenitor.'; + + +-- ================================================ +-- TABLE: strainprop +-- ================================================ + +drop table strainprop cascade; +create table strainprop ( + strainprop_id serial not null, + primary key (strainprop_id), + strain_id int not null, + foreign key (strain_id) references strain (strain_id) on delete cascade INITIALLY DEFERRED, + type_id int not null, + foreign key (type_id) references cvterm (cvterm_id) on delete cascade INITIALLY DEFERRED, + value text null, + rank int not null default 0, + constraint strainprop_c1 unique (strain_id, type_id, rank) +); +create index strainprop_idx1 on strainprop (strain_id); +create index strainprop_idx2 on strainprop (type_id); + +COMMENT ON TABLE strainprop IS 'Attributes of a given strain'; + + +-- ================================================ +-- TABLE: strainprop_pub +-- ================================================ + +drop table strainprop_pub cascade; +create table strainprop_pub ( + strainprop_pub_id serial not null, + primary key (strainprop_pub_id), + strainprop_id int not null, + foreign key (strainprop_id) references strainprop (strainprop_id) on delete cascade INITIALLY DEFERRED, + pub_id int not null, + foreign key (pub_id) references pub (pub_id) on delete cascade INITIALLY DEFERRED, + constraint strainprop_pub_c1 unique (strainprop_id,pub_id) +); +create index strainprop_pub_idx1 on strainprop_pub (strainprop_id); +create index strainprop_pub_idx2 on strainprop_pub (pub_id); + +COMMENT ON TABLE strainprop_pub IS 'Provenance. Any strainprop assignment can optionally be supported by a publication.'; + + +-- ================================================ +-- TABLE: strain_dbxref +-- ================================================ + +drop table strain_dbxref cascade; +create table strain_dbxref ( + strain_dbxref_id serial not null, + primary key (strain_dbxref_id), + strain_id int not null, + foreign key (strain_id) references strain (strain_id) on delete cascade INITIALLY DEFERRED, + dbxref_id int not null, + foreign key (dbxref_id) references dbxref (dbxref_id) on delete cascade INITIALLY DEFERRED, + is_current boolean not null default 'true', + constraint strain_dbxref_c1 unique (strain_id,dbxref_id) +); +create index strain_dbxref_idx1 on strain_dbxref (strain_id); +create index strain_dbxref_idx2 on strain_dbxref (dbxref_id); + + +-- ================================================ +-- TABLE: strain_synonym +-- ================================================ + +drop table strain_synonym cascade; +create table strain_synonym ( + strain_synonym_id serial not null, + primary key (strain_synonym_id), + strain_id int not null, + foreign key (strain_id) references strain (strain_id) on delete cascade INITIALLY DEFERRED, + synonym_id int not null, + foreign key (synonym_id) references synonym (synonym_id) on delete cascade INITIALLY DEFERRED, + pub_id int not null, + foreign key (pub_id) references pub (pub_id) on delete cascade INITIALLY DEFERRED, + is_current boolean not null default 'false', + is_internal boolean not null default 'false', + constraint strain_synonym_c1 unique (synonym_id,strain_id,pub_id) +); +create index strain_synonym_idx1 on strain_synonym (synonym_id); +create index strain_synonym_idx2 on strain_synonym (strain_id); +create index strain_synonym_idx3 on strain_synonym (pub_id); + +COMMENT ON TABLE strain_synonym IS 'Linking table between strain and synonym.'; + + +-- ================================================ +-- TABLE: strain_feature +-- ================================================ + +drop table strain_feature cascade; +create table strain_feature ( + strain_feature_id serial not null, + primary key (strain_feature_id), + strain_id int not null, + foreign key (strain_id) references strain (strain_id) on delete cascade INITIALLY DEFERRED, + feature_id int not null, + foreign key (feature_id) references feature (feature_id) on delete cascade INITIALLY DEFERRED, + pub_id int not null, + foreign key (pub_id) references pub (pub_id) on delete cascade INITIALLY DEFERRED, + constraint strain_feature_c1 unique (strain_id,feature_id,pub_id) +); +create index strain_feature_idx1 on strain_feature (strain_id); +create index strain_feature_idx2 on strain_feature (feature_id); + +COMMENT ON TABLE strain_feature IS 'strain_feature links a strain to features associated with the strain. Type may +be, eg, "homozygous" or "heterozygous".'; + + +-- ================================================ +-- TABLE: strain_featureprop +-- ================================================ + +drop table strain_featureprop cascade; +create table strain_featureprop ( + strain_featureprop_id serial not null, + primary key (strain_featureprop_id), + strain_feature_id int not null, + foreign key (strain_feature_id) references strain_feature (strain_feature_id) on delete cascade INITIALLY DEFERRED, + type_id int not null, + foreign key (type_id) references cvterm (cvterm_id) on delete cascade INITIALLY DEFERRED, + value text null, + rank int not null default 0, + constraint strain_featureprop_c1 unique (strain_feature_id,type_id,rank) +); +create index strain_featureprop_idx1 on strain_featureprop (strain_feature_id); +create index strain_featureprop_idx2 on strain_featureprop (type_id); + +COMMENT ON TABLE strain_featureprop IS 'Attributes of a strain_feature relationship. Eg, a comment'; + + +-- ================================================ +-- TABLE: strain_phenotype +-- ================================================ + +drop table strain_phenotype cascade; +create table strain_phenotype ( + strain_phenotype_id SERIAL NOT NULL, + primary key (strain_phenotype_id), + strain_id INT NOT NULL, + foreign key (strain_id) references strain (strain_id) on delete cascade, + phenotype_id INT NOT NULL, + foreign key (phenotype_id) references phenotype (phenotype_id) on delete cascade, + pub_id int not null, + foreign key (pub_id) references pub (pub_id) on delete cascade INITIALLY DEFERRED, + constraint strain_phenotype_c1 unique (strain_id,phenotype_id,pub_id) +); +create index strain_phenotype_idx1 ON strain_phenotype (strain_id); +create index strain_phenotype_idx2 ON strain_phenotype (phenotype_id); + +COMMENT on table strain_phenotype IS 'Links phenotype(s) associated with a given strain. Types may be, eg, "selected" or "unassigned".'; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <em...@us...> - 2013-09-09 13:18:13
|
Revision: 25291 http://sourceforge.net/p/gmod/svn/25291 Author: emmert Date: 2013-09-09 13:17:56 +0000 (Mon, 09 Sep 2013) Log Message: ----------- Added documentation to new tables and made some minor formatting changes where neccesary for consistency. Modified Paths: -------------- schema/trunk/chado/modules/library/library.sql schema/trunk/chado/modules/organism/organism.sql schema/trunk/chado/modules/phenotype/phenotype.sql Modified: schema/trunk/chado/modules/library/library.sql =================================================================== --- schema/trunk/chado/modules/library/library.sql 2013-07-26 17:23:56 UTC (rev 25290) +++ schema/trunk/chado/modules/library/library.sql 2013-09-09 13:17:56 UTC (rev 25291) @@ -35,8 +35,7 @@ create index library_idx2 on library (type_id); create index library_idx3 on library (uniquename); -COMMENT ON COLUMN library.type_id IS 'The type_id foreign key links -to a controlled vocabulary of library types. Examples of this would be: "cDNA_library" or "genomic_library"'; +COMMENT ON COLUMN library.type_id IS 'The type_id foreign key links to a controlled vocabulary of library types. Examples of this would be: "cDNA_library" or "genomic_library"'; -- ================================================ @@ -60,9 +59,13 @@ create index library_synonym_idx2 on library_synonym (library_id); create index library_synonym_idx3 on library_synonym (pub_id); +COMMENT ON TABLE library_synonym IS 'Linking table between library and synonym.'; + COMMENT ON COLUMN library_synonym.is_current IS 'The is_current bit indicates whether the linked synonym is the current -official- symbol for the linked library.'; + COMMENT ON COLUMN library_synonym.pub_id IS 'The pub_id link is for relating the usage of a given synonym to the publication in which it was used.'; + COMMENT ON COLUMN library_synonym.is_internal IS 'Typically a synonym exists so that somebody querying the database with an obsolete name can find the object they are looking for under its current name. If @@ -85,7 +88,9 @@ create index library_pub_idx1 on library_pub (library_id); create index library_pub_idx2 on library_pub (pub_id); +COMMENT ON TABLE library_pub IS 'Attribution for a library.'; + -- ================================================ -- TABLE: libraryprop -- ================================================ @@ -104,7 +109,9 @@ create index libraryprop_idx1 on libraryprop (library_id); create index libraryprop_idx2 on libraryprop (type_id); +COMMENT ON TABLE libraryprop IS 'Tag-value properties - follows standard chado model.'; + -- ================================================ -- TABLE: libraryprop_pub -- ================================================ @@ -121,7 +128,9 @@ create index libraryprop_pub_idx1 on libraryprop_pub (libraryprop_id); create index libraryprop_pub_idx2 on libraryprop_pub (pub_id); +COMMENT ON TABLE libraryprop_pub IS 'Attribution for libraryprop.'; + -- ================================================ -- TABLE: library_cvterm -- ================================================ @@ -180,7 +189,9 @@ create index library_dbxref_idx1 on library_dbxref (library_id); create index library_dbxref_idx2 on library_dbxref (dbxref_id); +COMMENT ON TABLE library_dbxref IS 'Links a library to dbxrefs.'; + -- ================================================ -- TABLE: library_expression -- ================================================ @@ -200,7 +211,9 @@ create index library_expression_idx2 on library_expression (expression_id); create index library_expression_idx3 on library_expression (pub_id); +COMMENT ON TABLE library_expression IS 'Links a library to expression statements.'; + -- ================================================ -- TABLE: library_expressionprop -- ================================================ @@ -219,7 +232,9 @@ create index library_expressionprop_idx1 on library_expressionprop (library_expression_id); create index library_expressionprop_idx2 on library_expressionprop (type_id); +COMMENT ON TABLE library_expressionprop IS 'Attributes of a library_expression relationship.'; + -- ================================================ -- TABLE: library_featureprop -- ================================================ @@ -238,7 +253,9 @@ create index library_featureprop_idx1 on library_featureprop (library_feature_id); create index library_featureprop_idx2 on library_featureprop (type_id); +COMMENT ON TABLE library_featureprop IS 'Attributes of a library_feature relationship.'; + -- ================================================ -- TABLE: library_interaction -- ================================================ @@ -258,7 +275,9 @@ create index library_interaction_idx2 on library_interaction (library_id); create index library_interaction_idx3 on library_interaction (pub_id); +COMMENT ON TABLE library_interaction IS 'Links a library to an interaction.'; + -- ================================================ -- TABLE: library_relationship -- ================================================ @@ -278,7 +297,9 @@ create index library_relationship_idx2 on library_relationship (object_id); create index library_relationship_idx3 on library_relationship (type_id); +COMMENT ON TABLE library_relationship IS 'Relationships between libraries.'; + -- ================================================ -- TABLE: library_relationship_pub -- ================================================ @@ -295,7 +316,9 @@ create index library_relationship_pub_idx1 on library_relationship_pub (library_relationship_id); create index library_relationship_pub_idx2 on library_relationship_pub (pub_id); +COMMENT ON TABLE library_relationship_pub IS 'Provenance of library_relationship.'; + -- ================================================ -- TABLE: library_strain -- ================================================ @@ -311,3 +334,5 @@ ); create index library_strain_idx1 on library_strain (library_id); create index library_strain_idx2 on library_strain (strain_id); + +COMMENT ON TABLE library_strain IS 'Links a library to a strain.'; Modified: schema/trunk/chado/modules/organism/organism.sql =================================================================== --- schema/trunk/chado/modules/organism/organism.sql 2013-07-26 17:23:56 UTC (rev 25290) +++ schema/trunk/chado/modules/organism/organism.sql 2013-09-09 13:17:56 UTC (rev 25291) @@ -56,7 +56,9 @@ create index organism_dbxref_idx1 on organism_dbxref (organism_id); create index organism_dbxref_idx2 on organism_dbxref (dbxref_id); +COMMENT ON TABLE library_dbxref IS 'Links a library to dbxrefs.'; + -- ================================================ -- TABLE: organismprop -- ================================================ @@ -118,7 +120,9 @@ create index organism_pub_idx1 on organism_pub (organism_id); create index organism_pub_idx2 on organism_pub (pub_id); +COMMENT ON TABLE organism_pub IS 'Attribution for organism.'; + -- ================================================ -- TABLE: organism_cvterm -- ================================================ @@ -374,11 +378,13 @@ create index strain_dbxref_idx1 on strain_dbxref (strain_id); create index strain_dbxref_idx2 on strain_dbxref (dbxref_id); +COMMENT ON TABLE strain_dbxref IS 'Links a strain to dbxrefs. This is for secondary identifiers; primary identifiers should use strain.dbxref_id.'; --- ================================================ --- TABLE: strain_pub --- ================================================ +-- ================================================ +-- TABLE: strain_pub +-- ================================================ + drop table strain_pub cascade; create table strain_pub ( strain_pub_id serial not null, @@ -392,7 +398,9 @@ create index strain_pub_idx1 on strain_pub (strain_id); create index strain_pub_idx2 on strain_pub (pub_id); +COMMENT ON TABLE strain_pub IS 'Provenance. Linking table between strains and publications that mention them.'; + -- ================================================ -- TABLE: strain_synonym -- ================================================ Modified: schema/trunk/chado/modules/phenotype/phenotype.sql =================================================================== --- schema/trunk/chado/modules/phenotype/phenotype.sql 2013-07-26 17:23:56 UTC (rev 25290) +++ schema/trunk/chado/modules/phenotype/phenotype.sql 2013-09-09 13:17:56 UTC (rev 25291) @@ -45,6 +45,7 @@ COMMENT ON COLUMN phenotype.cvalue_id IS 'Phenotype attribute value (state).'; COMMENT ON COLUMN phenotype.assay_id IS 'Evidence type.'; + -- ================================================ -- TABLE: phenotype_cvterm -- ================================================ @@ -62,8 +63,9 @@ CREATE INDEX phenotype_cvterm_idx1 ON phenotype_cvterm (phenotype_id); CREATE INDEX phenotype_cvterm_idx2 ON phenotype_cvterm (cvterm_id); -COMMENT ON TABLE phenotype_cvterm IS NULL; +COMMENT ON TABLE phenotype_cvterm IS 'phenotype to cvterm associations.'; + -- ================================================ -- TABLE: feature_phenotype -- ================================================ @@ -80,9 +82,12 @@ CREATE INDEX feature_phenotype_idx1 ON feature_phenotype (feature_id); CREATE INDEX feature_phenotype_idx2 ON feature_phenotype (phenotype_id); -COMMENT ON TABLE feature_phenotype IS NULL; +COMMENT ON TABLE feature_phenotype IS 'Linking table between features and phenotypes.'; +-- ================================================ +-- TABLE: phenotypeprop +-- ================================================ create table phenotypeprop ( phenotypeprop_id serial not null, @@ -98,8 +103,4 @@ create index phenotypeprop_idx1 on phenotypeprop (phenotype_id); create index phenotypeprop_idx2 on phenotypeprop (type_id); -COMMENT ON TABLE phenotypeprop IS 'A phenotype can have any number of -slot-value property tags attached to it. This is an alternative to -hardcoding a list of columns in the relational schema, and is -completely extensible. There is a unique constraint, phenotypeprop_c1, for -the combination of phenotype_id, rank, and type_id. Multivalued property-value pairs must be differentiated by rank.'; +COMMENT ON TABLE phenotypeprop IS 'A phenotype can have any number of slot-value property tags attached to it. This is an alternative to hardcoding a list of columns in the relational schema, and is completely extensible. There is a unique constraint, phenotypeprop_c1, for the combination of phenotype_id, rank, and type_id. Multivalued property-value pairs must be differentiated by rank.'; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |