Traits
The traits table stores information about the various traits being measured or observed.
Table Schema
| Column Name | Data Type | Description |
|---|---|---|
id |
UUID |
Primary Key. A unique identifier for the trait. |
trait_name |
String(255) |
The name of the trait. This column has a unique constraint. |
trait_units |
String(255) |
The units in which the trait is measured. |
trait_level_id |
Integer |
Foreign Key. References the id of the trait level in the trait_levels table. |
trait_metrics |
JSONB |
A JSONB column for storing additional, unstructured information about the trait metrics. |
trait_info |
JSONB |
A JSONB column for storing additional, unstructured information about the trait. |
created_at |
TIMESTAMP |
The timestamp when the record was created. Defaults to the current time. |
updated_at |
TIMESTAMP |
The timestamp when the record was last updated. Automatically updates on any modification. |
Constraints and Indexes
- Unique Constraint: A
UniqueConstraintontrait_nameensures that each trait has a unique name. - GIN Index: A GIN index named
idx_traits_infois applied to thetrait_infocolumn to optimize queries on the JSONB data.
Relationships
trait_level: A many-to-one relationship with thetrait_levelstable.- Association Tables: The
traitstable is linked toexperimentsanddatasetsthrough association tables.