Description of Schema


Tables

phenotype
phenotype_cvterm
feature_phenotype
phenotypeprop

phenotype

Top
Comments:

$Id: phenotype.sql,v 1.6 2007-04-27 16:09:46 emmert Exp $
==========================================
Chado phenotype module
05-31-2011
added 'name' column to phenotype. non-unique human readable field.
=================================================================
Dependencies:
:import cvterm from cv
:import feature from sequence
=================================================================
================================================
TABLE: phenotype
================================================
A phenotypic statement, or a single atomic phenotypic observation, is a controlled sentence describing observable effects of non-wild type function. E.g. Obs=eye, attribute=color, cvalue=red.
Field Name Data Type Size Default Value Other Foreign Key
phenotype_id integer 20 PRIMARY KEY, NOT NULL
uniquename text 64000 UNIQUE, NOT NULL
name text 64000 null
observable_id integer 20 The entity: e.g. anatomy_part, biological_process. cvterm.cvterm_id
attr_id integer 20 Phenotypic attribute (quality, property, attribute, character) - drawn from PATO. cvterm.cvterm_id
value text 64000 Value of attribute - unconstrained free text. Used only if cvalue_id is not appropriate.
cvalue_id integer 20 Phenotype attribute value (state). cvterm.cvterm_id
assay_id integer 20 Evidence type. cvterm.cvterm_id

Indices

Name Fields
phenotype_idx1cvalue_id
phenotype_idx2observable_id
phenotype_idx3attr_id

Constraints

Type Fields
NOT NULLphenotype_id
NOT NULLuniquename
FOREIGN KEYobservable_id
FOREIGN KEYattr_id
FOREIGN KEYcvalue_id
FOREIGN KEYassay_id
UNIQUEuniquename

phenotype_cvterm

Top
Comments:

================================================
TABLE: phenotype_cvterm
================================================
phenotype to cvterm associations.
Field Name Data Type Size Default Value Other Foreign Key
phenotype_cvterm_id integer 20 PRIMARY KEY, NOT NULL
phenotype_id integer 20 UNIQUE, NOT NULL phenotype.phenotype_id
cvterm_id integer 20 UNIQUE, NOT NULL cvterm.cvterm_id
rank integer 10 0 UNIQUE, NOT NULL

Indices

Name Fields
phenotype_cvterm_idx1phenotype_id
phenotype_cvterm_idx2cvterm_id

Constraints

Type Fields
NOT NULLphenotype_cvterm_id
NOT NULLphenotype_id
FOREIGN KEYphenotype_id
NOT NULLcvterm_id
FOREIGN KEYcvterm_id
NOT NULLrank
UNIQUEphenotype_id, cvterm_id, rank

feature_phenotype

Top
Comments:

================================================
TABLE: feature_phenotype
================================================
Linking table between features and phenotypes.
Field Name Data Type Size Default Value Other Foreign Key
feature_phenotype_id integer 20 PRIMARY KEY, NOT NULL
feature_id integer 20 UNIQUE, NOT NULL feature.feature_id
phenotype_id integer 20 UNIQUE, NOT NULL phenotype.phenotype_id

Indices

Name Fields
feature_phenotype_idx1feature_id
feature_phenotype_idx2phenotype_id

Constraints

Type Fields
NOT NULLfeature_phenotype_id
NOT NULLfeature_id
FOREIGN KEYfeature_id
NOT NULLphenotype_id
FOREIGN KEYphenotype_id
UNIQUEfeature_id, phenotype_id

phenotypeprop

Top
Comments:

================================================
TABLE: phenotypeprop
================================================
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.
Field Name Data Type Size Default Value Other Foreign Key
phenotypeprop_id integer 20 PRIMARY KEY, NOT NULL
phenotype_id integer 20 UNIQUE, NOT NULL phenotype.phenotype_id
type_id integer 20 UNIQUE, NOT NULL cvterm.cvterm_id
value text 64000 NULL
rank integer 10 0 UNIQUE, NOT NULL

Indices

Name Fields
phenotypeprop_idx1phenotype_id
phenotypeprop_idx2type_id

Constraints

Type Fields
NOT NULLphenotypeprop_id
NOT NULLphenotype_id
FOREIGN KEYphenotype_id
NOT NULLtype_id
FOREIGN KEYtype_id
NOT NULLrank
UNIQUEphenotype_id, type_id, rank

Created by
SQL::Translator 0.11020