1 |
541
|
aaronmk
|
CREATE TABLE location
|
2 |
|
|
(
|
3 |
|
|
location_id serial NOT NULL,
|
4 |
575
|
aaronmk
|
authorlocationcode character varying(30) NOT NULL DEFAULT ''::character varying,
|
5 |
541
|
aaronmk
|
reference_id integer,
|
6 |
|
|
parent_id integer,
|
7 |
580
|
aaronmk
|
reallatitude double precision NOT NULL DEFAULT 'NaN'::double precision,
|
8 |
|
|
reallongitude double precision NOT NULL DEFAULT 'NaN'::double precision,
|
9 |
541
|
aaronmk
|
locationaccuracy double precision,
|
10 |
575
|
aaronmk
|
confidentialitystatus integer NOT NULL DEFAULT 0,
|
11 |
541
|
aaronmk
|
confidentialityreason character varying(200),
|
12 |
580
|
aaronmk
|
publiclatitude double precision,
|
13 |
|
|
publiclongitude double precision,
|
14 |
561
|
aaronmk
|
"... (truncated) ..." integer,
|
15 |
541
|
aaronmk
|
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 NOT NULL,
|
26 |
|
|
project_id integer,
|
27 |
570
|
aaronmk
|
authoreventcode character varying(30),
|
28 |
561
|
aaronmk
|
"... (truncated) ..." integer,
|
29 |
541
|
aaronmk
|
accessioncode character varying(255),
|
30 |
|
|
);
|
31 |
|
|
|
32 |
|
|
CREATE TABLE taxonoccurrence -- VegBank's taxonobservation table.
|
33 |
|
|
(
|
34 |
|
|
taxonoccurrence_id serial NOT NULL,
|
35 |
|
|
locationevent_id integer NOT NULL,
|
36 |
|
|
authorplantname character varying(255),
|
37 |
|
|
reference_id integer,
|
38 |
|
|
taxoninferencearea double precision,
|
39 |
|
|
emb_taxonoccurrence integer,
|
40 |
561
|
aaronmk
|
"... (truncated) ..." integer,
|
41 |
541
|
aaronmk
|
accessioncode character varying(255),
|
42 |
|
|
);
|
43 |
|
|
|
44 |
|
|
CREATE TABLE aggregateoccurrence -- VegBank's taxonimportance table.
|
45 |
|
|
(
|
46 |
|
|
aggregateoccurrence_id serial NOT NULL,
|
47 |
|
|
taxonoccurrence_id integer NOT NULL,
|
48 |
|
|
taxonbin_id integer,
|
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 NOT NULL,
|
58 |
|
|
accessioncode character varying(255),
|
59 |
|
|
);
|
60 |
|
|
|
61 |
|
|
CREATE TABLE individualplant -- VegBank's stemcount table.
|
62 |
|
|
(
|
63 |
|
|
individualplant_id serial NOT NULL,
|
64 |
|
|
aggregateoccurrence_id integer NOT NULL,
|
65 |
563
|
aaronmk
|
overallheight double precision,
|
66 |
|
|
overallheightaccuracy double precision,
|
67 |
541
|
aaronmk
|
emb_individualplant integer,
|
68 |
570
|
aaronmk
|
authorplantcode character varying(20),
|
69 |
541
|
aaronmk
|
accessioncode character varying(255),
|
70 |
|
|
stemcount integer,
|
71 |
|
|
);
|
72 |
|
|
|
73 |
|
|
CREATE TABLE stem -- VegBank's stemlocation table.
|
74 |
|
|
(
|
75 |
|
|
stem_id serial NOT NULL,
|
76 |
|
|
individualplant_id integer NOT NULL,
|
77 |
570
|
aaronmk
|
authorstemcode character varying(20),
|
78 |
541
|
aaronmk
|
xposition double precision,
|
79 |
|
|
yposition double precision,
|
80 |
|
|
health character varying(50),
|
81 |
|
|
emb_stem integer,
|
82 |
|
|
diameter double precision,
|
83 |
|
|
height double precision,
|
84 |
|
|
heightaccuracy double precision,
|
85 |
|
|
age double precision,
|
86 |
|
|
accessioncode character varying(255),
|
87 |
556
|
aaronmk
|
diameteraccuracy double precision,
|
88 |
541
|
aaronmk
|
);
|
89 |
|
|
|
90 |
|
|
CREATE TABLE specimen -- A herbarium specimen. Contains Darwin Core specimen data.
|
91 |
|
|
(
|
92 |
|
|
specimen_id serial NOT NULL,
|
93 |
|
|
reference_id integer NOT NULL,
|
94 |
|
|
collectioncode_dwc character varying(255),
|
95 |
|
|
catalognumber_dwc character varying(255),
|
96 |
|
|
collectiondate timestamp with time zone,
|
97 |
|
|
collector_id integer,
|
98 |
|
|
museum_id integer,
|
99 |
|
|
sourceaccessionnumber character varying(100),
|
100 |
|
|
accessioncode character varying(255),
|
101 |
576
|
aaronmk
|
taxonoccurrence_id integer NOT NULL,
|
102 |
572
|
aaronmk
|
collectornumber_dwc character varying(255),
|
103 |
541
|
aaronmk
|
);
|
104 |
|
|
|
105 |
544
|
aaronmk
|
CREATE TABLE voucher
|
106 |
|
|
(
|
107 |
|
|
voucher_id serial NOT NULL,
|
108 |
545
|
aaronmk
|
taxonoccurrence_id integer NOT NULL,
|
109 |
|
|
specimen_id integer NOT NULL,
|
110 |
544
|
aaronmk
|
accessioncode character varying(255),
|
111 |
|
|
);
|
112 |
|
|
|
113 |
541
|
aaronmk
|
CREATE TABLE taxondetermination -- VegBank's taxoninterpretation table.
|
114 |
|
|
(
|
115 |
|
|
taxondetermination_id serial NOT NULL,
|
116 |
|
|
taxonoccurrence_id integer NOT NULL,
|
117 |
|
|
plantconcept_id integer NOT NULL,
|
118 |
575
|
aaronmk
|
party_id integer,
|
119 |
541
|
aaronmk
|
role_id integer NOT NULL,
|
120 |
|
|
determinationtype character varying(30),
|
121 |
|
|
reference_id integer,
|
122 |
575
|
aaronmk
|
originaldetermination boolean NOT NULL DEFAULT false,
|
123 |
|
|
currentdetermination boolean NOT NULL DEFAULT false,
|
124 |
541
|
aaronmk
|
taxonfit character varying(50),
|
125 |
|
|
taxonconfidence character varying(50),
|
126 |
|
|
grouptype character varying(20),
|
127 |
|
|
notes text,
|
128 |
|
|
notespublic boolean,
|
129 |
|
|
notesmgt boolean,
|
130 |
|
|
revisions boolean,
|
131 |
|
|
determinationdate timestamp with time zone NOT NULL,
|
132 |
|
|
emb_taxondetermination integer,
|
133 |
|
|
accessioncode character varying(255),
|
134 |
|
|
);
|
135 |
|
|
|
136 |
552
|
aaronmk
|
CREATE TABLE stratum
|
137 |
|
|
(
|
138 |
|
|
stratum_id serial NOT NULL,
|
139 |
|
|
locationevent_id integer NOT NULL,
|
140 |
|
|
stratumtype_id integer NOT NULL,
|
141 |
|
|
stratummethod_id integer,
|
142 |
|
|
stratumname character varying(30),
|
143 |
|
|
stratumheight double precision,
|
144 |
|
|
stratumbase double precision,
|
145 |
|
|
stratumcover double precision,
|
146 |
|
|
stratumdescription character varying(200),
|
147 |
|
|
);
|
148 |
|
|
|
149 |
541
|
aaronmk
|
CREATE TABLE sizeclass -- A range of size measurements used to aggregate organisms.
|
150 |
|
|
(
|
151 |
|
|
sizeclass_id serial NOT NULL,
|
152 |
|
|
mindiameter double precision,
|
153 |
|
|
minheight double precision,
|
154 |
|
|
maxdiameter double precision,
|
155 |
|
|
maxheight double precision,
|
156 |
|
|
accessioncode character varying(255),
|
157 |
|
|
);
|
158 |
|
|
|
159 |
|
|
CREATE TABLE taxonbin -- Defines a set of aggregate measurements. Used by aggregateoccurrence to define how measurements were aggregated.
|
160 |
|
|
(
|
161 |
|
|
taxonbin_id integer NOT NULL,
|
162 |
|
|
label character varying(255) NOT NULL,
|
163 |
|
|
stratum_id integer,
|
164 |
|
|
sizeclass_id integer,
|
165 |
|
|
coverindex_id integer,
|
166 |
|
|
accessioncode character varying(255),
|
167 |
567
|
aaronmk
|
count integer NOT NULL,
|
168 |
541
|
aaronmk
|
);
|