|
1 |
CREATE TABLE location
|
|
2 |
(
|
|
3 |
location_id serial NOT NULL,
|
|
4 |
sourceid 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,
|
|
11 |
confidentialityreason character varying(200),
|
|
12 |
latitude double precision,
|
|
13 |
longitude double precision,
|
|
14 |
-- ...
|
|
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 NOT NULL,
|
|
26 |
project_id integer,
|
|
27 |
sourceid character varying(30),
|
|
28 |
-- ...
|
|
29 |
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 |
-- ...
|
|
41 |
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 |
height double precision,
|
|
66 |
heightaccuracy double precision,
|
|
67 |
emb_individualplant integer,
|
|
68 |
sourceid character varying(20),
|
|
69 |
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 |
sourceid character varying(20),
|
|
78 |
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 |
);
|
|
88 |
|
|
89 |
CREATE TABLE specimen -- A herbarium specimen. Contains Darwin Core specimen data.
|
|
90 |
(
|
|
91 |
specimen_id serial NOT NULL,
|
|
92 |
individualplant_id integer,
|
|
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 |
taxonoccurrence_id integer,
|
|
102 |
);
|
|
103 |
|
|
104 |
CREATE TABLE taxondetermination -- VegBank's taxoninterpretation table.
|
|
105 |
(
|
|
106 |
taxondetermination_id serial NOT NULL,
|
|
107 |
taxonoccurrence_id integer NOT NULL,
|
|
108 |
plantconcept_id integer NOT NULL,
|
|
109 |
party_id integer NOT NULL,
|
|
110 |
role_id integer NOT NULL,
|
|
111 |
determinationtype character varying(30),
|
|
112 |
reference_id integer,
|
|
113 |
originaldetermination boolean NOT NULL,
|
|
114 |
currentdetermination boolean NOT NULL,
|
|
115 |
taxonfit character varying(50),
|
|
116 |
taxonconfidence character varying(50),
|
|
117 |
grouptype character varying(20),
|
|
118 |
notes text,
|
|
119 |
notespublic boolean,
|
|
120 |
notesmgt boolean,
|
|
121 |
revisions boolean,
|
|
122 |
determinationdate timestamp with time zone NOT NULL,
|
|
123 |
emb_taxondetermination integer,
|
|
124 |
accessioncode character varying(255),
|
|
125 |
);
|
|
126 |
|
|
127 |
CREATE TABLE sizeclass -- A range of size measurements used to aggregate organisms.
|
|
128 |
(
|
|
129 |
sizeclass_id serial NOT NULL,
|
|
130 |
mindiameter double precision,
|
|
131 |
diameteraccuracy double precision,
|
|
132 |
minheight double precision,
|
|
133 |
heightaccuracy double precision,
|
|
134 |
maxdiameter double precision,
|
|
135 |
maxheight double precision,
|
|
136 |
accessioncode character varying(255),
|
|
137 |
);
|
|
138 |
|
|
139 |
CREATE TABLE taxonbin -- Defines a set of aggregate measurements. Used by aggregateoccurrence to define how measurements were aggregated.
|
|
140 |
(
|
|
141 |
taxonbin_id integer NOT NULL,
|
|
142 |
label character varying(255) NOT NULL,
|
|
143 |
stratum_id integer,
|
|
144 |
sizeclass_id integer,
|
|
145 |
coverindex_id integer,
|
|
146 |
accessioncode character varying(255),
|
|
147 |
);
|
Create schemas/vegbien.for_wiki.sql from schemas/vegbien.for_ERD.sql