phenotypes


Description

Defines phenoytpes which are held in Germinate.

Columns

Column Type Size Nulls Auto Default Children Parents Comments
id INT 10 null
phenotypedata.phenotype_id phenotypedata_ibfk_2 C

Primary id for this table. This uniquely identifies the row.

name VARCHAR 255

Phenotype full name.

short_name CHAR 10 null

Shortened name for the phenotype. This is used in table columns where space is an issue.

description MEDIUMTEXT 16777215 null

Full description of the phenotype. This should contain enough infomation to accurately identify the phenoytpe and how it was recorded.

datatype enum('categorical', 'numeric', 'text', 'date') 11 text

Defines the data type of the phenotype. This can be of numeric, text, date or categorical types.

restrictions JSON 1073741824 null

A json object describing the restrictions placed on this trait. It is an object containing a field called “categories” which is an array of arrays, each describing a categorical scale. Each scale must have the same length as they describe the same categories just using different terms or numbers. The other fields are “min” and “max” to specify upper and lower limits for numeric traits.

unit_id INT 10 null
units.id phenotypes_ibfk_1 N

Foreign Key to units (units.id).

category_id INT 10 null
phenotypecategories.id phenotypes_ibfk_2 N

Foreign key to phenotypecategories (phenotypecategories.id)

setsize INT 10 null

The number of individual measurements that should be taken for this trait.

is_timeseries BIT 1 1

Determines whether this trait is a time-series trait or not.

created_on DATETIME 19 CURRENT_TIMESTAMP

When the record was created.

updated_on TIMESTAMP 19 CURRENT_TIMESTAMP

When the record was updated. This may be different from the created on date if changes have been made subsequently to the underlying record.

Indexes

Constraint Name Type Sort Column(s)
PRIMARY Primary key Asc id
category_id Performance Asc category_id
unit_id Performance Asc unit_id

Relationships