Skip to content
Snippets Groups Projects
Commit fe855af0 authored by Rune Åvar Ødegård's avatar Rune Åvar Ødegård
Browse files

Add Mermaid schema

parent 9ee9c6cc
No related branches found
No related tags found
No related merge requests found
```mermaid
erDiagram
converted_series {
BIGINT id PK "PRIMARY KEY"
VARCHAR sampling_point_id FK "FOREIGN KEY"
VARCHAR source FK "FOREIGN KEY"
VARCHAR target FK "FOREIGN KEY"
NUMERIC factor
VARCHAR createdby
}
sampling_points {
VARCHAR id PK "PRIMARY KEY"
VARCHAR media_monitored FK "FOREIGN KEY"
VARCHAR station_id FK "FOREIGN KEY"
VARCHAR measurement_regime FK "FOREIGN KEY"
BOOLEAN mobile
VARCHAR assessment_type FK "FOREIGN KEY"
VARCHAR station_classification FK "FOREIGN KEY"
}
stations {
VARCHAR id PK "PRIMARY KEY"
VARCHAR name
VARCHAR begin_position
VARCHAR end_position
VARCHAR network_id FK "FOREIGN KEY"
}
networks {
VARCHAR id PK "PRIMARY KEY"
VARCHAR name
VARCHAR media_monitored FK "FOREIGN KEY"
VARCHAR responsible_authority_id FK "FOREIGN KEY"
}
responsible_authorities {
VARCHAR id PK "PRIMARY KEY"
VARCHAR name
VARCHAR organisation
}
observations {
BIGSERIAL id PK "PRIMARY KEY"
VARCHAR sampling_point_id FK "FOREIGN KEY"
VARCHAR begin_position
VARCHAR end_position
NUMERIC value
TIMESTAMP from_time
TIMESTAMP to_time
}
USERGROUP {
INTEGER userid PK
INTEGER groupid PK
}
USER {
INTEGER id PK
}
GROUP {
INTEGER id PK
}
USER ||--o{ USERGROUP : "has"
GROUP ||--o{ USERGROUP : "includes"
eea_adjustmenttypes {
VARCHAR id PK "PRIMARY KEY"
VARCHAR label
VARCHAR uri
}
eea_areaclassifications {
VARCHAR id PK "PRIMARY KEY"
VARCHAR label
VARCHAR notation
}
eea_assessmentthresholdexceedances {
VARCHAR id PK "PRIMARY KEY"
VARCHAR label
VARCHAR uri
}
eea_assessmenttypes {
VARCHAR id PK "PRIMARY KEY"
VARCHAR label
VARCHAR notation
}
eea_concentrations {
VARCHAR id PK "PRIMARY KEY"
VARCHAR label
VARCHAR notation
}
eea_exceedancedescription {
INTEGER id PK "PRIMARY KEY"
VARCHAR name
}
eea_exceedancereason {
VARCHAR id PK "PRIMARY KEY"
VARCHAR label
VARCHAR uri
}
eea_exceedancetype {
NUMERIC id PK "PRIMARY KEY"
VARCHAR name
}
exceedancedescriptions {
VARCHAR id PK "PRIMARY KEY"
VARCHAR attainment_id FK "FOREIGN KEY"
BOOLEAN exceedances
INTEGER exceedance_type FK "FOREIGN KEY"
NUMERIC max_value
VARCHAR adjustment_type FK "FOREIGN KEY"
NUMERIC surface_area
INTEGER exposed_population
INTEGER population_reference_year
VARCHAR area_classification FK "FOREIGN KEY"
VARCHAR exceedance_reason FK "FOREIGN KEY"
INTEGER exceedancedescription_element FK "FOREIGN KEY"
}
converted_series ||--|{ sampling_points : "sampling_point_id"
sampling_points ||--|{ stations : "station_id"
stations ||--|{ networks : "network_id"
networks ||--|{ responsible_authorities : "responsible_authority_id"
observations ||--|{ sampling_points : "sampling_point_id"
users ||--|{ usergroup : "id"
group_table ||--|{ usergroup : "id"
exceedancedescriptions ||--|{ eea_exceedancetype : "exceedance_type"
exceedancedescriptions ||--|{ eea_adjustmenttypes : "adjustment_type"
exceedancedescriptions ||--|{ eea_areaclassifications : "area_classification"
exceedancedescriptions ||--|{ eea_exceedancereason : "exceedance_reason"
exceedancedescriptions ||--|{ eea_exceedancedescription : "exceedancedescription_element"
```
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment