1
|
CREATE TABLE location
|
2
|
(
|
3
|
location_id serial NOT NULL,
|
4
|
authorlocationcode character varying(30),
|
5
|
reference_id integer,
|
6
|
parent_id integer,
|
7
|
reallatitude double precision,
|
8
|
reallongitude double precision,
|
9
|
locationaccuracy double precision,
|
10
|
confidentialitystatus integer NOT NULL DEFAULT 0,
|
11
|
confidentialityreason character varying(200),
|
12
|
publiclatitude double precision,
|
13
|
publiclongitude double precision,
|
14
|
"... (truncated) ..." integer,
|
15
|
accessioncode character varying(255),
|
16
|
sublocationxposition double precision,
|
17
|
sublocationyposition double precision,
|
18
|
namedplace_id integer,
|
19
|
);
|
20
|
|
21
|
CREATE TABLE locationevent -- VegBank's observation table.
|
22
|
(
|
23
|
locationevent_id serial NOT NULL,
|
24
|
previous_id integer,
|
25
|
location_id integer,
|
26
|
project_id integer,
|
27
|
authoreventcode character varying(30),
|
28
|
"... (truncated) ..." integer,
|
29
|
accessioncode character varying(255),
|
30
|
sourceaccessioncode character varying(100),
|
31
|
);
|
32
|
|
33
|
CREATE TABLE taxonoccurrence -- VegBank's taxonobservation table.
|
34
|
(
|
35
|
taxonoccurrence_id serial NOT NULL,
|
36
|
locationevent_id integer,
|
37
|
authorplantname character varying(255),
|
38
|
reference_id integer,
|
39
|
taxoninferencearea double precision,
|
40
|
emb_taxonoccurrence integer,
|
41
|
"... (truncated) ..." integer,
|
42
|
accessioncode character varying(255),
|
43
|
);
|
44
|
|
45
|
CREATE TABLE aggregateoccurrence -- VegBank's taxonimportance table.
|
46
|
(
|
47
|
aggregateoccurrence_id serial NOT NULL,
|
48
|
taxonoccurrence_id integer NOT NULL,
|
49
|
cover double precision,
|
50
|
basalarea double precision,
|
51
|
biomass double precision,
|
52
|
inferencearea double precision,
|
53
|
stratumbase double precision,
|
54
|
stratumheight double precision,
|
55
|
emb_aggregateoccurrence integer,
|
56
|
covercode character varying(10),
|
57
|
count integer,
|
58
|
accessioncode character varying(255),
|
59
|
sourceaccessioncode character varying(100),
|
60
|
plantobservation_id integer,
|
61
|
stratum_id integer,
|
62
|
sizeclass_id integer,
|
63
|
coverindex_id integer,
|
64
|
);
|
65
|
|
66
|
CREATE TABLE plant -- A physical, tagged plant.
|
67
|
(
|
68
|
plant_id serial NOT NULL,
|
69
|
);
|
70
|
|
71
|
CREATE TABLE planttag
|
72
|
(
|
73
|
planttag_id serial NOT NULL,
|
74
|
plant_id integer NOT NULL,
|
75
|
tag character varying(255) NOT NULL,
|
76
|
);
|
77
|
|
78
|
CREATE TABLE plantobservation -- VegBank's stemcount table.
|
79
|
(
|
80
|
plantobservation_id serial NOT NULL,
|
81
|
overallheight double precision,
|
82
|
overallheightaccuracy double precision,
|
83
|
emb_plantobservation integer,
|
84
|
authorplantcode character varying(20),
|
85
|
accessioncode character varying(255),
|
86
|
stemcount integer,
|
87
|
sourceaccessioncode character varying(100),
|
88
|
plant_id integer,
|
89
|
);
|
90
|
|
91
|
CREATE TABLE stemobservation -- VegBank's stemlocation table.
|
92
|
(
|
93
|
stemobservation_id serial NOT NULL,
|
94
|
plantobservation_id integer NOT NULL,
|
95
|
authorstemcode character varying(20),
|
96
|
xposition double precision,
|
97
|
yposition double precision,
|
98
|
health character varying(50),
|
99
|
emb_stemobservation integer,
|
100
|
diameter double precision,
|
101
|
height double precision,
|
102
|
heightaccuracy double precision,
|
103
|
age double precision,
|
104
|
accessioncode character varying(255),
|
105
|
diameteraccuracy double precision,
|
106
|
sourceaccessioncode character varying(100),
|
107
|
);
|
108
|
|
109
|
CREATE TABLE specimen -- A physical specimen collected from a plant. Used to link replicates of the same specimen together.
|
110
|
(
|
111
|
specimen_id serial NOT NULL,
|
112
|
);
|
113
|
|
114
|
CREATE TABLE specimenreplicate -- A herbarium's replicate of a specimen. Contains Darwin Core specimen data.
|
115
|
(
|
116
|
specimenreplicate_id serial NOT NULL,
|
117
|
reference_id integer NOT NULL,
|
118
|
collectioncode_dwc character varying(255), -- The code for the collection that the specimenreplicate is from.
|
119
|
catalognumber_dwc character varying(255),
|
120
|
collectiondate timestamp with time zone,
|
121
|
museum_id integer,
|
122
|
sourceaccessioncode character varying(100),
|
123
|
accessioncode character varying(255),
|
124
|
taxonoccurrence_id integer NOT NULL,
|
125
|
verbatimcollectorname character varying(255),
|
126
|
collectionnumber character varying(255), -- The number of the specimenreplicate within the collection.
|
127
|
specimen_id integer,
|
128
|
);
|
129
|
|
130
|
CREATE TABLE voucher
|
131
|
(
|
132
|
voucher_id serial NOT NULL,
|
133
|
taxonoccurrence_id integer NOT NULL,
|
134
|
specimenreplicate_id integer NOT NULL,
|
135
|
accessioncode character varying(255),
|
136
|
);
|
137
|
|
138
|
CREATE TABLE taxondetermination -- VegBank's taxoninterpretation table.
|
139
|
(
|
140
|
taxondetermination_id serial NOT NULL,
|
141
|
taxonoccurrence_id integer NOT NULL,
|
142
|
plantconcept_id integer NOT NULL,
|
143
|
party_id integer,
|
144
|
role_id integer NOT NULL,
|
145
|
determinationtype character varying(30),
|
146
|
reference_id integer,
|
147
|
isoriginal boolean NOT NULL DEFAULT false,
|
148
|
iscurrent boolean NOT NULL DEFAULT false,
|
149
|
taxonfit character varying(50),
|
150
|
taxonconfidence character varying(50),
|
151
|
grouptype character varying(20),
|
152
|
notes text,
|
153
|
notespublic boolean,
|
154
|
notesmgt boolean,
|
155
|
revisions boolean,
|
156
|
determinationdate timestamp with time zone,
|
157
|
emb_taxondetermination integer,
|
158
|
accessioncode character varying(255),
|
159
|
);
|
160
|
|
161
|
CREATE TABLE stratum
|
162
|
(
|
163
|
stratum_id serial NOT NULL,
|
164
|
locationevent_id integer NOT NULL,
|
165
|
stratumtype_id integer NOT NULL,
|
166
|
stratumheight double precision,
|
167
|
stratumbase double precision,
|
168
|
stratumcover double precision,
|
169
|
area double precision,
|
170
|
);
|
171
|
|
172
|
CREATE TABLE sizeclass -- A range of size measurements used to aggregate organisms.
|
173
|
(
|
174
|
sizeclass_id serial NOT NULL,
|
175
|
mindiameter double precision,
|
176
|
minheight double precision,
|
177
|
maxdiameter double precision,
|
178
|
maxheight double precision,
|
179
|
accessioncode character varying(255),
|
180
|
);
|