Project

General

Profile

1 541 aaronmk
CREATE TABLE location
2
(
3
  location_id serial NOT NULL,
4 582 aaronmk
  authorlocationcode character varying(30),
5 541 aaronmk
  reference_id integer,
6
  parent_id integer,
7 582 aaronmk
  reallatitude double precision,
8
  reallongitude 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 605 aaronmk
  location_id integer,
26 541 aaronmk
  project_id integer,
27 570 aaronmk
  authoreventcode character varying(30),
28 561 aaronmk
  "... (truncated) ..." integer,
29 541 aaronmk
  accessioncode character varying(255),
30 586 aaronmk
  sourceaccessioncode character varying(100),
31 541 aaronmk
);
32
33
CREATE TABLE taxonoccurrence -- VegBank's taxonobservation table.
34
(
35
  taxonoccurrence_id serial NOT NULL,
36 605 aaronmk
  locationevent_id integer,
37 541 aaronmk
  authorplantname character varying(255),
38
  reference_id integer,
39
  taxoninferencearea double precision,
40
  emb_taxonoccurrence integer,
41 561 aaronmk
  "... (truncated) ..." integer,
42 541 aaronmk
  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 607 aaronmk
  count integer,
58 541 aaronmk
  accessioncode character varying(255),
59 586 aaronmk
  sourceaccessioncode character varying(100),
60 671 aaronmk
  plantobservation_id integer,
61 677 aaronmk
  stratum_id integer,
62 678 aaronmk
  sizeclass_id integer,
63
  coverindex_id integer,
64 541 aaronmk
);
65
66 674 aaronmk
CREATE TABLE planttag
67
(
68
  planttag_id serial NOT NULL,
69 684 aaronmk
  plantobservation_id integer NOT NULL,
70 674 aaronmk
  tag character varying(255) NOT NULL,
71 684 aaronmk
  iscurrent boolean NOT NULL DEFAULT true,
72 674 aaronmk
);
73
74 684 aaronmk
CREATE TABLE plant -- A physical, tagged plant.
75
(
76
  plant_id serial NOT NULL,
77
);
78
79 671 aaronmk
CREATE TABLE plantobservation -- VegBank's stemcount table.
80 541 aaronmk
(
81 671 aaronmk
  plantobservation_id serial NOT NULL,
82 563 aaronmk
  overallheight double precision,
83
  overallheightaccuracy double precision,
84 671 aaronmk
  emb_plantobservation integer,
85 570 aaronmk
  authorplantcode character varying(20),
86 541 aaronmk
  accessioncode character varying(255),
87
  stemcount integer,
88 586 aaronmk
  sourceaccessioncode character varying(100),
89 674 aaronmk
  plant_id integer,
90 541 aaronmk
);
91
92 673 aaronmk
CREATE TABLE stemobservation -- VegBank's stemlocation table.
93 541 aaronmk
(
94 673 aaronmk
  stemobservation_id serial NOT NULL,
95 671 aaronmk
  plantobservation_id integer NOT NULL,
96 570 aaronmk
  authorstemcode character varying(20),
97 541 aaronmk
  xposition double precision,
98
  yposition double precision,
99
  health character varying(50),
100 673 aaronmk
  emb_stemobservation integer,
101 541 aaronmk
  diameter double precision,
102
  height double precision,
103
  heightaccuracy double precision,
104
  age double precision,
105
  accessioncode character varying(255),
106 556 aaronmk
  diameteraccuracy double precision,
107 586 aaronmk
  sourceaccessioncode character varying(100),
108 541 aaronmk
);
109
110 670 aaronmk
CREATE TABLE specimen -- A physical specimen collected from a plant. Used to link replicates of the same specimen together.
111 669 aaronmk
(
112
  specimen_id serial NOT NULL,
113
);
114
115 670 aaronmk
CREATE TABLE specimenreplicate -- A herbarium's replicate of a specimen. Contains Darwin Core specimen data.
116 541 aaronmk
(
117 668 aaronmk
  specimenreplicate_id serial NOT NULL,
118 541 aaronmk
  reference_id integer NOT NULL,
119 668 aaronmk
  collectioncode_dwc character varying(255), -- The code for the collection that the specimenreplicate is from.
120 541 aaronmk
  catalognumber_dwc character varying(255),
121
  collectiondate timestamp with time zone,
122
  museum_id integer,
123 586 aaronmk
  sourceaccessioncode character varying(100),
124 541 aaronmk
  accessioncode character varying(255),
125 576 aaronmk
  taxonoccurrence_id integer NOT NULL,
126 613 aaronmk
  verbatimcollectorname character varying(255),
127 668 aaronmk
  collectionnumber character varying(255), -- The number of the specimenreplicate within the collection.
128 669 aaronmk
  specimen_id integer,
129 541 aaronmk
);
130
131 544 aaronmk
CREATE TABLE voucher
132
(
133
  voucher_id serial NOT NULL,
134 545 aaronmk
  taxonoccurrence_id integer NOT NULL,
135 668 aaronmk
  specimenreplicate_id integer NOT NULL,
136 544 aaronmk
  accessioncode character varying(255),
137
);
138
139 541 aaronmk
CREATE TABLE taxondetermination -- VegBank's taxoninterpretation table.
140
(
141
  taxondetermination_id serial NOT NULL,
142
  taxonoccurrence_id integer NOT NULL,
143
  plantconcept_id integer NOT NULL,
144 575 aaronmk
  party_id integer,
145 541 aaronmk
  role_id integer NOT NULL,
146
  determinationtype character varying(30),
147
  reference_id integer,
148 632 aaronmk
  isoriginal boolean NOT NULL DEFAULT false,
149
  iscurrent boolean NOT NULL DEFAULT false,
150 541 aaronmk
  taxonfit character varying(50),
151
  taxonconfidence character varying(50),
152
  grouptype character varying(20),
153
  notes text,
154
  notespublic boolean,
155
  notesmgt boolean,
156
  revisions boolean,
157 591 aaronmk
  determinationdate timestamp with time zone,
158 541 aaronmk
  emb_taxondetermination integer,
159
  accessioncode character varying(255),
160
);
161
162 552 aaronmk
CREATE TABLE stratum
163
(
164
  stratum_id serial NOT NULL,
165
  locationevent_id integer NOT NULL,
166
  stratumtype_id integer NOT NULL,
167
  stratumheight double precision,
168
  stratumbase double precision,
169
  stratumcover double precision,
170 676 aaronmk
  area double precision,
171 552 aaronmk
);
172
173 541 aaronmk
CREATE TABLE sizeclass -- A range of size measurements used to aggregate organisms.
174
(
175
  sizeclass_id serial NOT NULL,
176
  mindiameter double precision,
177
  minheight double precision,
178
  maxdiameter double precision,
179
  maxheight double precision,
180
  accessioncode character varying(255),
181
);