Plots
The plots table defines the spatial layout of an experiment, breaking it down into individual plots.
Table Schema
| Column Name | Data Type | Description |
|---|---|---|
id |
UUID |
Primary Key. A unique identifier for the plot. |
experiment_id |
UUID |
Foreign Key. References the id of the experiment to which the plot belongs. |
season_id |
UUID |
Foreign Key. References the id of the season during which the plot was used. |
site_id |
UUID |
Foreign Key. References the id of the site where the plot is located. |
plot_number |
Integer |
The number of the plot. |
plot_row_number |
Integer |
The row number of the plot in a grid layout. |
plot_column_number |
Integer |
The column number of the plot in a grid layout. |
plot_geometry_info |
JSONB |
A JSONB column for storing additional, unstructured information about the plot's geometry. |
plot_info |
JSONB |
A JSONB column for storing additional, unstructured information about the plot. |
accession_id |
UUID |
Foreign Key. References the id of the accession planted in this plot. |
population_id |
UUID |
Foreign Key. References the id of the population planted in this plot. |
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
UniqueConstraintonexperiment_id,season_id,site_id,plot_number,plot_row_number, andplot_column_numberensures that each plot is uniquely defined within an experiment for a given season and site. - GIN Index: A GIN index named
idx_plots_infois applied to theplot_infocolumn to optimize queries on the JSONB data.
Relationships
experiment: A many-to-one relationship with theexperimentstable.season: A many-to-one relationship with theseasonstable.site: A many-to-one relationship with thesitestable.accession: A many-to-one relationship with theaccessionstable viaaccession_id.population: A many-to-one relationship with thepopulationstable viapopulation_id.