-
Notifications
You must be signed in to change notification settings - Fork 9
/
05_bioexplorer_connectome_schema.sql
84 lines (74 loc) · 3.32 KB
/
05_bioexplorer_connectome_schema.sql
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
-- The Blue Brain BioExplorer is a tool for scientists to extract and analyse
-- scientific data from visualization
--
-- Copyright 2020-2023 Blue BrainProject / EPFL
--
-- This program is free software: you can redistribute it and/or modify it under
-- the terms of the GNU General Public License as published by the Free Software
-- Foundation, either version 3 of the License, or (at your option) any later
-- version.
--
-- This program is distributed in the hope that it will be useful, but WITHOUT
-- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
-- FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
-- details.
--
-- You should have received a copy of the GNU General Public License along with
-- this program. If not, see <https://www.gnu.org/licenses/>.
create table if not exists connectome.glio_vascular
(
guid integer not null,
astrocyte_population_guid integer not null,
vasculature_population_guid integer not null,
astrocyte_guid integer not null,
astrocyte_section_guid integer not null,
vasculature_node_guid integer not null,
vasculature_section_guid integer not null,
vasculature_segment_guid integer not null,
endfoot_compartment_length double precision not null,
endfoot_compartment_diameter double precision not null,
constraint glio_vascular_pk
primary key (guid, astrocyte_population_guid, vasculature_population_guid)
);
create index if not exists glio_vascular_astrocyte_guid_index
on connectome.glio_vascular (astrocyte_guid);
create unique index if not exists glio_vascular_astrocyte_section_guid_vasculature_section_guid_v
on connectome.glio_vascular (astrocyte_section_guid, vasculature_section_guid, vasculature_segment_guid);
create index if not exists glio_vascular_vasculature_node_guid_astrocyte_guid_index
on connectome.glio_vascular (vasculature_node_guid, astrocyte_guid);
create index if not exists glio_vascular_vasculature_node_guid_index
on connectome.glio_vascular (vasculature_node_guid);
create table if not exists connectome.population
(
guid integer not null
constraint population_pk
primary key,
schema varchar,
description varchar
);
create table if not exists connectome.structure
(
guid integer not null
constraint structure_pk
primary key,
code varchar not null,
description varchar
);
create table if not exists connectome.streamline
(
guid integer not null,
hemisphere_guid integer not null,
origin_region_guid integer not null
constraint streamline_structure_guid_fk
references connectome.structure
on update cascade on delete cascade,
target_region_guid integer not null
constraint streamline_structure_guid_fk_2
references connectome.structure
on update cascade on delete cascade,
points bytea not null
);
create unique index if not exists streamline_guid_origin_region_guid_target_region_guid_uindex
on connectome.streamline (guid, origin_region_guid, target_region_guid);
create unique index if not exists structure_guid_uindex
on connectome.structure (guid);