1
|
-- MySQL dump 10.13 Distrib 5.5.32, for debian-linux-gnu (x86_64)
|
2
|
--
|
3
|
-- Host: localhost Database: VegCore
|
4
|
-- ------------------------------------------------------
|
5
|
-- Server version 5.5.32-0ubuntu0.12.04.1
|
6
|
|
7
|
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
|
8
|
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
|
9
|
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
|
10
|
/*!40101 SET NAMES utf8 */;
|
11
|
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
|
12
|
/*!40103 SET TIME_ZONE='+00:00' */;
|
13
|
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
|
14
|
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
|
15
|
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
|
16
|
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
|
17
|
|
18
|
--
|
19
|
-- Table structure for table `aggregate_observation`
|
20
|
--
|
21
|
|
22
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
23
|
/*!40101 SET character_set_client = utf8 */;
|
24
|
CREATE TABLE `aggregate_observation` (
|
25
|
`id` varbinary(767) NOT NULL,
|
26
|
`traits` set('hstore') COLLATE utf8_bin DEFAULT NULL,
|
27
|
PRIMARY KEY (`id`),
|
28
|
CONSTRAINT `fk_aggregate_observation_taxon_presence1` FOREIGN KEY (`id`) REFERENCES `taxon_presence` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
|
29
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='"An observation applying to all occurrences of an organism based on an aggregation factor" ("VegX":http://wiki.tdwg.org/twiki/pub/Vegetation/WebHome/VegX_Schema_1.5.3_proposed.zip#/veg.xsd#/aggregateOrganismObservations/aggregateOrganismObservation)';
|
30
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
31
|
|
32
|
--
|
33
|
-- Dumping data for table `aggregate_observation`
|
34
|
--
|
35
|
|
36
|
/*!40000 ALTER TABLE `aggregate_observation` DISABLE KEYS */;
|
37
|
/*!40000 ALTER TABLE `aggregate_observation` ENABLE KEYS */;
|
38
|
|
39
|
--
|
40
|
-- Table structure for table `base_class`
|
41
|
--
|
42
|
|
43
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
44
|
/*!40101 SET character_set_client = utf8 */;
|
45
|
CREATE TABLE `base_class` (
|
46
|
`id` varbinary(767) NOT NULL,
|
47
|
`referenced_class` varbinary(767) NOT NULL,
|
48
|
PRIMARY KEY (`id`),
|
49
|
KEY `fk_base_class_referenced_class1_idx` (`referenced_class`),
|
50
|
CONSTRAINT `fk_base_class_referenced_class1` FOREIGN KEY (`referenced_class`) REFERENCES `referenced_class` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
|
51
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
|
52
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
53
|
|
54
|
--
|
55
|
-- Dumping data for table `base_class`
|
56
|
--
|
57
|
|
58
|
/*!40000 ALTER TABLE `base_class` DISABLE KEYS */;
|
59
|
/*!40000 ALTER TABLE `base_class` ENABLE KEYS */;
|
60
|
|
61
|
--
|
62
|
-- Table structure for table `collection`
|
63
|
--
|
64
|
|
65
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
66
|
/*!40101 SET character_set_client = utf8 */;
|
67
|
CREATE TABLE `collection` (
|
68
|
`id` varbinary(767) NOT NULL,
|
69
|
`institution` varbinary(767) NOT NULL,
|
70
|
`name` varbinary(767) NOT NULL,
|
71
|
PRIMARY KEY (`id`),
|
72
|
UNIQUE KEY `collection_unique` (`institution`,`name`),
|
73
|
KEY `fk_collection_organization1_idx` (`institution`),
|
74
|
KEY `fk_collection_source1_idx` (`id`),
|
75
|
CONSTRAINT `fk_collection_source1` FOREIGN KEY (`id`) REFERENCES `record` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
|
76
|
CONSTRAINT `fk_collection_organization1` FOREIGN KEY (`institution`) REFERENCES `organization` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
|
77
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='"the collection within the institution where a specimen is held" ("Brad Boyle":https://projects.nceas.ucsb.edu/nceas/attachments/download/621/vegbien_identifier_examples.xlsx#terms/collectionCode)';
|
78
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
79
|
|
80
|
--
|
81
|
-- Dumping data for table `collection`
|
82
|
--
|
83
|
|
84
|
/*!40000 ALTER TABLE `collection` DISABLE KEYS */;
|
85
|
/*!40000 ALTER TABLE `collection` ENABLE KEYS */;
|
86
|
|
87
|
--
|
88
|
-- Table structure for table `community`
|
89
|
--
|
90
|
|
91
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
92
|
/*!40101 SET character_set_client = utf8 */;
|
93
|
CREATE TABLE `community` (
|
94
|
`id` varbinary(767) NOT NULL,
|
95
|
`name` varbinary(767) NOT NULL,
|
96
|
`info` set('hstore') COLLATE utf8_bin DEFAULT NULL,
|
97
|
PRIMARY KEY (`id`),
|
98
|
CONSTRAINT `fk_community_record1` FOREIGN KEY (`id`) REFERENCES `record` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
|
99
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='"A community type is an abstract grouping of organisms that tend to co-occur on the landscape due to shared ecological requirements or preferences. May be designated by syntaxon or physiognomic types." ([[VegCore#VegX|VegX]])';
|
100
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
101
|
|
102
|
--
|
103
|
-- Dumping data for table `community`
|
104
|
--
|
105
|
|
106
|
/*!40000 ALTER TABLE `community` DISABLE KEYS */;
|
107
|
/*!40000 ALTER TABLE `community` ENABLE KEYS */;
|
108
|
|
109
|
--
|
110
|
-- Table structure for table `derived_class`
|
111
|
--
|
112
|
|
113
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
114
|
/*!40101 SET character_set_client = utf8 */;
|
115
|
CREATE TABLE `derived_class` (
|
116
|
`id` varbinary(767) NOT NULL,
|
117
|
PRIMARY KEY (`id`),
|
118
|
CONSTRAINT `fk_derived_class_base_class1` FOREIGN KEY (`id`) REFERENCES `base_class` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
|
119
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
|
120
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
121
|
|
122
|
--
|
123
|
-- Dumping data for table `derived_class`
|
124
|
--
|
125
|
|
126
|
/*!40000 ALTER TABLE `derived_class` DISABLE KEYS */;
|
127
|
/*!40000 ALTER TABLE `derived_class` ENABLE KEYS */;
|
128
|
|
129
|
--
|
130
|
-- Table structure for table `event`
|
131
|
--
|
132
|
|
133
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
134
|
/*!40101 SET character_set_client = utf8 */;
|
135
|
CREATE TABLE `event` (
|
136
|
`id` varbinary(767) NOT NULL,
|
137
|
`parent` varbinary(767) NOT NULL,
|
138
|
`name` varbinary(767) DEFAULT NULL,
|
139
|
`date_range` varbinary(767) DEFAULT NULL,
|
140
|
`place` varbinary(767) DEFAULT NULL,
|
141
|
`participants` varbinary(767) DEFAULT NULL,
|
142
|
PRIMARY KEY (`id`),
|
143
|
KEY `fk_event_place1_idx` (`place`),
|
144
|
KEY `fk_event1_idx` (`parent`),
|
145
|
KEY `fk_event_party_list1_idx` (`participants`),
|
146
|
CONSTRAINT `fk_event_party_list1` FOREIGN KEY (`participants`) REFERENCES `party_list` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
|
147
|
CONSTRAINT `fk_event1` FOREIGN KEY (`parent`) REFERENCES `event` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
|
148
|
CONSTRAINT `fk_event_place1` FOREIGN KEY (`place`) REFERENCES `local_place` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
|
149
|
CONSTRAINT `fk_event_record1` FOREIGN KEY (`id`) REFERENCES `record` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
|
150
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='"an action that occurs at a place and during a period of time" ("DwC":http://rs.tdwg.org/dwc/terms/#Event)';
|
151
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
152
|
|
153
|
--
|
154
|
-- Dumping data for table `event`
|
155
|
--
|
156
|
|
157
|
/*!40000 ALTER TABLE `event` DISABLE KEYS */;
|
158
|
/*!40000 ALTER TABLE `event` ENABLE KEYS */;
|
159
|
|
160
|
--
|
161
|
-- Table structure for table `geocoords`
|
162
|
--
|
163
|
|
164
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
165
|
/*!40101 SET character_set_client = utf8 */;
|
166
|
CREATE TABLE `geocoords` (
|
167
|
`id` varbinary(767) NOT NULL,
|
168
|
`latitude_deg` varbinary(767) NOT NULL,
|
169
|
`longitude_deg` varbinary(767) NOT NULL,
|
170
|
PRIMARY KEY (`id`),
|
171
|
KEY `geocoords_unique` (`latitude_deg`,`longitude_deg`)
|
172
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='A numerically-defined point';
|
173
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
174
|
|
175
|
--
|
176
|
-- Dumping data for table `geocoords`
|
177
|
--
|
178
|
|
179
|
/*!40000 ALTER TABLE `geocoords` DISABLE KEYS */;
|
180
|
/*!40000 ALTER TABLE `geocoords` ENABLE KEYS */;
|
181
|
|
182
|
--
|
183
|
-- Table structure for table `geological_context`
|
184
|
--
|
185
|
|
186
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
187
|
/*!40101 SET character_set_client = utf8 */;
|
188
|
CREATE TABLE `geological_context` (
|
189
|
`id` varbinary(767) NOT NULL,
|
190
|
`name` varbinary(767) NOT NULL,
|
191
|
`info` set('hstore') COLLATE utf8_bin DEFAULT NULL,
|
192
|
PRIMARY KEY (`id`),
|
193
|
CONSTRAINT `fk_geological_context_record1` FOREIGN KEY (`id`) REFERENCES `record` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
|
194
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='"information pertaining to a location within a geological context, such as stratigraphy" ("DwC":http://rs.tdwg.org/dwc/terms/#GeologicalContext)';
|
195
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
196
|
|
197
|
--
|
198
|
-- Dumping data for table `geological_context`
|
199
|
--
|
200
|
|
201
|
/*!40000 ALTER TABLE `geological_context` DISABLE KEYS */;
|
202
|
/*!40000 ALTER TABLE `geological_context` ENABLE KEYS */;
|
203
|
|
204
|
--
|
205
|
-- Table structure for table `geopath`
|
206
|
--
|
207
|
|
208
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
209
|
/*!40101 SET character_set_client = utf8 */;
|
210
|
CREATE TABLE `geopath` (
|
211
|
`id` varbinary(767) NOT NULL,
|
212
|
`continent` varbinary(767) DEFAULT NULL,
|
213
|
`country` varbinary(767) NOT NULL,
|
214
|
`state_province` varbinary(767) DEFAULT NULL,
|
215
|
`county` varbinary(767) DEFAULT NULL,
|
216
|
`municipality` varbinary(767) DEFAULT NULL,
|
217
|
`ranks` set('hstore') COLLATE utf8_bin DEFAULT NULL,
|
218
|
PRIMARY KEY (`id`)
|
219
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='A named region';
|
220
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
221
|
|
222
|
--
|
223
|
-- Dumping data for table `geopath`
|
224
|
--
|
225
|
|
226
|
/*!40000 ALTER TABLE `geopath` DISABLE KEYS */;
|
227
|
/*!40000 ALTER TABLE `geopath` ENABLE KEYS */;
|
228
|
|
229
|
--
|
230
|
-- Table structure for table `geopath_scrub`
|
231
|
--
|
232
|
|
233
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
234
|
/*!40101 SET character_set_client = utf8 */;
|
235
|
CREATE TABLE `geopath_scrub` (
|
236
|
`id` varbinary(767) NOT NULL,
|
237
|
`input_geopath` varbinary(767) NOT NULL,
|
238
|
`scrubbed_geopath` varbinary(767) DEFAULT NULL,
|
239
|
PRIMARY KEY (`id`),
|
240
|
KEY `fk_geopath_scrub_geopath1_idx` (`input_geopath`),
|
241
|
KEY `fk_geopath_scrub_geopath2_idx` (`scrubbed_geopath`),
|
242
|
CONSTRAINT `fk_geovalidation_record10` FOREIGN KEY (`id`) REFERENCES `record` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
|
243
|
CONSTRAINT `fk_geopath_scrub_geopath1` FOREIGN KEY (`input_geopath`) REFERENCES `geopath` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
|
244
|
CONSTRAINT `fk_geopath_scrub_geopath2` FOREIGN KEY (`scrubbed_geopath`) REFERENCES `geopath` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
|
245
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
|
246
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
247
|
|
248
|
--
|
249
|
-- Dumping data for table `geopath_scrub`
|
250
|
--
|
251
|
|
252
|
/*!40000 ALTER TABLE `geopath_scrub` DISABLE KEYS */;
|
253
|
/*!40000 ALTER TABLE `geopath_scrub` ENABLE KEYS */;
|
254
|
|
255
|
--
|
256
|
-- Table structure for table `geoplace`
|
257
|
--
|
258
|
|
259
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
260
|
/*!40101 SET character_set_client = utf8 */;
|
261
|
CREATE TABLE `geoplace` (
|
262
|
`id` varbinary(767) NOT NULL,
|
263
|
`geocoords` varbinary(767) DEFAULT NULL,
|
264
|
`geopath` varbinary(767) DEFAULT NULL,
|
265
|
PRIMARY KEY (`id`),
|
266
|
UNIQUE KEY `validatable_place_unique` (`geopath`,`geocoords`),
|
267
|
KEY `fk_geovalidation_place_path1_idx` (`geopath`),
|
268
|
KEY `fk_geovalidation_coordinates1_idx` (`geocoords`),
|
269
|
CONSTRAINT `fk_geovalidation_place_path10` FOREIGN KEY (`geopath`) REFERENCES `geopath` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
|
270
|
CONSTRAINT `fk_geovalidation_coordinates10` FOREIGN KEY (`geocoords`) REFERENCES `geocoords` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
|
271
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
|
272
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
273
|
|
274
|
--
|
275
|
-- Dumping data for table `geoplace`
|
276
|
--
|
277
|
|
278
|
/*!40000 ALTER TABLE `geoplace` DISABLE KEYS */;
|
279
|
/*!40000 ALTER TABLE `geoplace` ENABLE KEYS */;
|
280
|
|
281
|
--
|
282
|
-- Table structure for table `georeferencing`
|
283
|
--
|
284
|
|
285
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
286
|
/*!40101 SET character_set_client = utf8 */;
|
287
|
CREATE TABLE `georeferencing` (
|
288
|
`id` varbinary(767) NOT NULL,
|
289
|
`input_place` varbinary(767) NOT NULL,
|
290
|
`georeferenced_by` varbinary(767) DEFAULT NULL,
|
291
|
`georeferenced_place` varbinary(767) DEFAULT NULL,
|
292
|
PRIMARY KEY (`id`),
|
293
|
KEY `fk_georef_place1_idx` (`input_place`),
|
294
|
KEY `fk_georeferencing_geoplace1_idx` (`georeferenced_place`),
|
295
|
KEY `fk_georeferencing_party_list1_idx` (`georeferenced_by`),
|
296
|
CONSTRAINT `fk_georeferencing_geoplace1` FOREIGN KEY (`georeferenced_place`) REFERENCES `geoplace` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
|
297
|
CONSTRAINT `fk_georeferencing_party_list1` FOREIGN KEY (`georeferenced_by`) REFERENCES `party_list` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
|
298
|
CONSTRAINT `fk_georef_place1` FOREIGN KEY (`input_place`) REFERENCES `local_place` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
|
299
|
CONSTRAINT `fk_geovalidation_record100` FOREIGN KEY (`id`) REFERENCES `record` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
|
300
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
|
301
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
302
|
|
303
|
--
|
304
|
-- Dumping data for table `georeferencing`
|
305
|
--
|
306
|
|
307
|
/*!40000 ALTER TABLE `georeferencing` DISABLE KEYS */;
|
308
|
/*!40000 ALTER TABLE `georeferencing` ENABLE KEYS */;
|
309
|
|
310
|
--
|
311
|
-- Table structure for table `geovalidation`
|
312
|
--
|
313
|
|
314
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
315
|
/*!40101 SET character_set_client = utf8 */;
|
316
|
CREATE TABLE `geovalidation` (
|
317
|
`id` varbinary(767) NOT NULL,
|
318
|
`input_geoplace` varbinary(767) NOT NULL,
|
319
|
`scrubbed_geoplace` varbinary(767) DEFAULT NULL,
|
320
|
`geovalid` tinyint(1) NOT NULL,
|
321
|
`lat_long_domain_valid` tinyint(1) NOT NULL,
|
322
|
`lat_long_in_place_ranks` set('hstore') COLLATE utf8_bin DEFAULT NULL,
|
323
|
PRIMARY KEY (`id`),
|
324
|
KEY `fk_geovalidation_geoplace1_idx` (`input_geoplace`),
|
325
|
KEY `fk_geovalidation_geoplace2_idx` (`scrubbed_geoplace`),
|
326
|
CONSTRAINT `fk_geovalidation_geoplace1` FOREIGN KEY (`input_geoplace`) REFERENCES `validatable_geoplace` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
|
327
|
CONSTRAINT `fk_geovalidation_geoplace2` FOREIGN KEY (`scrubbed_geoplace`) REFERENCES `validatable_geoplace` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
|
328
|
CONSTRAINT `fk_geovalidation_record1` FOREIGN KEY (`id`) REFERENCES `record` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
|
329
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='The accuracy of the [[VegCore#Coordinates|Coordinates]], taking into account the [[VegCore#Placename|Placename]]';
|
330
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
331
|
|
332
|
--
|
333
|
-- Dumping data for table `geovalidation`
|
334
|
--
|
335
|
|
336
|
/*!40000 ALTER TABLE `geovalidation` DISABLE KEYS */;
|
337
|
/*!40000 ALTER TABLE `geovalidation` ENABLE KEYS */;
|
338
|
|
339
|
--
|
340
|
-- Table structure for table `individual`
|
341
|
--
|
342
|
|
343
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
344
|
/*!40101 SET character_set_client = utf8 */;
|
345
|
CREATE TABLE `individual` (
|
346
|
`id` varbinary(767) NOT NULL,
|
347
|
`tag` varbinary(767) DEFAULT NULL,
|
348
|
`tag_history` set('hstore') COLLATE utf8_bin DEFAULT NULL,
|
349
|
PRIMARY KEY (`id`),
|
350
|
CONSTRAINT `fk_individual_record1` FOREIGN KEY (`id`) REFERENCES `reobservable` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
|
351
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='A distinct biological organism';
|
352
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
353
|
|
354
|
--
|
355
|
-- Dumping data for table `individual`
|
356
|
--
|
357
|
|
358
|
/*!40000 ALTER TABLE `individual` DISABLE KEYS */;
|
359
|
/*!40000 ALTER TABLE `individual` ENABLE KEYS */;
|
360
|
|
361
|
--
|
362
|
-- Table structure for table `individual_observation`
|
363
|
--
|
364
|
|
365
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
366
|
/*!40101 SET character_set_client = utf8 */;
|
367
|
CREATE TABLE `individual_observation` (
|
368
|
`id` varbinary(767) NOT NULL,
|
369
|
`individual` varbinary(767) DEFAULT NULL,
|
370
|
`code` varbinary(767) DEFAULT NULL,
|
371
|
`traits` set('hstore') COLLATE utf8_bin DEFAULT NULL,
|
372
|
PRIMARY KEY (`id`),
|
373
|
KEY `fk_individual_observation_individual1_idx` (`individual`),
|
374
|
CONSTRAINT `fk_individual_observation_individual1` FOREIGN KEY (`individual`) REFERENCES `individual` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
|
375
|
CONSTRAINT `fk_individual_observation_taxon_occurrence1` FOREIGN KEY (`id`) REFERENCES `taxon_observation` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
|
376
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='An observation of an [[VegCore#Individual|Individual]]';
|
377
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
378
|
|
379
|
--
|
380
|
-- Dumping data for table `individual_observation`
|
381
|
--
|
382
|
|
383
|
/*!40000 ALTER TABLE `individual_observation` DISABLE KEYS */;
|
384
|
/*!40000 ALTER TABLE `individual_observation` ENABLE KEYS */;
|
385
|
|
386
|
--
|
387
|
-- Table structure for table `local_place`
|
388
|
--
|
389
|
|
390
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
391
|
/*!40101 SET character_set_client = utf8 */;
|
392
|
CREATE TABLE `local_place` (
|
393
|
`id` varbinary(767) NOT NULL,
|
394
|
`parent` varbinary(767) NOT NULL,
|
395
|
`geoplace` varbinary(767) DEFAULT NULL,
|
396
|
`locality` varbinary(767) DEFAULT NULL,
|
397
|
`coords` set('hstore') COLLATE utf8_bin DEFAULT NULL COMMENT 'for verbatim coordinates, etc.',
|
398
|
PRIMARY KEY (`id`),
|
399
|
KEY `fk_place1_idx` (`parent`),
|
400
|
KEY `fk_place_geoplace1_idx` (`geoplace`),
|
401
|
CONSTRAINT `fk_place_geoplace1` FOREIGN KEY (`geoplace`) REFERENCES `geoplace` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
|
402
|
CONSTRAINT `fk_place1` FOREIGN KEY (`parent`) REFERENCES `local_place` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
|
403
|
CONSTRAINT `fk_place_record1` FOREIGN KEY (`id`) REFERENCES `record` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
|
404
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='"A spatial region" ("DwC":http://rs.tdwg.org/dwc/terms/#dcterms:Location) or point';
|
405
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
406
|
|
407
|
--
|
408
|
-- Dumping data for table `local_place`
|
409
|
--
|
410
|
|
411
|
/*!40000 ALTER TABLE `local_place` DISABLE KEYS */;
|
412
|
/*!40000 ALTER TABLE `local_place` ENABLE KEYS */;
|
413
|
|
414
|
--
|
415
|
-- Table structure for table `method`
|
416
|
--
|
417
|
|
418
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
419
|
/*!40101 SET character_set_client = utf8 */;
|
420
|
CREATE TABLE `method` (
|
421
|
`id` varbinary(767) NOT NULL,
|
422
|
`parent` varbinary(767) NOT NULL,
|
423
|
`info` set('hstore') COLLATE utf8_bin DEFAULT NULL,
|
424
|
PRIMARY KEY (`id`),
|
425
|
KEY `fk_method_method1_idx` (`parent`),
|
426
|
CONSTRAINT `fk_method_record1` FOREIGN KEY (`id`) REFERENCES `record` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
|
427
|
CONSTRAINT `fk_method_method1` FOREIGN KEY (`parent`) REFERENCES `method` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
|
428
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='"A specific method definition followed in the creation of the dataset. Each method links to a protocol and literature citation reference. A protocol may have many method or steps." ("VegX":http://wiki.tdwg.org/twiki/pub/Vegetation/WebHome/VegX_Schema_1.5.3_proposed.zip#/veg.xsd#/methods/method)';
|
429
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
430
|
|
431
|
--
|
432
|
-- Dumping data for table `method`
|
433
|
--
|
434
|
|
435
|
/*!40000 ALTER TABLE `method` DISABLE KEYS */;
|
436
|
/*!40000 ALTER TABLE `method` ENABLE KEYS */;
|
437
|
|
438
|
--
|
439
|
-- Table structure for table `organization`
|
440
|
--
|
441
|
|
442
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
443
|
/*!40101 SET character_set_client = utf8 */;
|
444
|
CREATE TABLE `organization` (
|
445
|
`id` varbinary(767) NOT NULL,
|
446
|
`info` set('hstore') COLLATE utf8_bin DEFAULT NULL,
|
447
|
PRIMARY KEY (`id`),
|
448
|
CONSTRAINT `fk_organization_party1` FOREIGN KEY (`id`) REFERENCES `party` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
|
449
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
|
450
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
451
|
|
452
|
--
|
453
|
-- Dumping data for table `organization`
|
454
|
--
|
455
|
|
456
|
/*!40000 ALTER TABLE `organization` DISABLE KEYS */;
|
457
|
/*!40000 ALTER TABLE `organization` ENABLE KEYS */;
|
458
|
|
459
|
--
|
460
|
-- Table structure for table `party`
|
461
|
--
|
462
|
|
463
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
464
|
/*!40101 SET character_set_client = utf8 */;
|
465
|
CREATE TABLE `party` (
|
466
|
`id` varbinary(767) NOT NULL,
|
467
|
`organization` varbinary(767) DEFAULT NULL,
|
468
|
`info` set('hstore') COLLATE utf8_bin DEFAULT NULL,
|
469
|
PRIMARY KEY (`id`),
|
470
|
KEY `fk_party_organization1_idx` (`organization`),
|
471
|
CONSTRAINT `fk_party_organization1` FOREIGN KEY (`organization`) REFERENCES `organization` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
|
472
|
CONSTRAINT `fk_collection_source10` FOREIGN KEY (`id`) REFERENCES `record` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
|
473
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
|
474
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
475
|
|
476
|
--
|
477
|
-- Dumping data for table `party`
|
478
|
--
|
479
|
|
480
|
/*!40000 ALTER TABLE `party` DISABLE KEYS */;
|
481
|
/*!40000 ALTER TABLE `party` ENABLE KEYS */;
|
482
|
|
483
|
--
|
484
|
-- Table structure for table `party_list`
|
485
|
--
|
486
|
|
487
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
488
|
/*!40101 SET character_set_client = utf8 */;
|
489
|
CREATE TABLE `party_list` (
|
490
|
`id` varbinary(767) NOT NULL,
|
491
|
`count` int(11) NOT NULL,
|
492
|
PRIMARY KEY (`id`),
|
493
|
CONSTRAINT `fk_collection_source100` FOREIGN KEY (`id`) REFERENCES `record` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
|
494
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
|
495
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
496
|
|
497
|
--
|
498
|
-- Dumping data for table `party_list`
|
499
|
--
|
500
|
|
501
|
/*!40000 ALTER TABLE `party_list` DISABLE KEYS */;
|
502
|
/*!40000 ALTER TABLE `party_list` ENABLE KEYS */;
|
503
|
|
504
|
--
|
505
|
-- Table structure for table `party_list_entry`
|
506
|
--
|
507
|
|
508
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
509
|
/*!40101 SET character_set_client = utf8 */;
|
510
|
CREATE TABLE `party_list_entry` (
|
511
|
`id` varbinary(767) NOT NULL,
|
512
|
`entry` varbinary(767) NOT NULL,
|
513
|
`sort_order` int(11) DEFAULT NULL,
|
514
|
PRIMARY KEY (`id`,`entry`),
|
515
|
KEY `fk_party_list_has_party_party1_idx` (`entry`),
|
516
|
KEY `fk_party_list_has_party_party_list1_idx` (`id`),
|
517
|
CONSTRAINT `fk_party_list_has_party_party_list1` FOREIGN KEY (`id`) REFERENCES `party_list` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
|
518
|
CONSTRAINT `fk_party_list_has_party_party1` FOREIGN KEY (`entry`) REFERENCES `party` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
|
519
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
|
520
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
521
|
|
522
|
--
|
523
|
-- Dumping data for table `party_list_entry`
|
524
|
--
|
525
|
|
526
|
/*!40000 ALTER TABLE `party_list_entry` DISABLE KEYS */;
|
527
|
/*!40000 ALTER TABLE `party_list_entry` ENABLE KEYS */;
|
528
|
|
529
|
--
|
530
|
-- Table structure for table `place_observation`
|
531
|
--
|
532
|
|
533
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
534
|
/*!40101 SET character_set_client = utf8 */;
|
535
|
CREATE TABLE `place_observation` (
|
536
|
`id` varbinary(767) NOT NULL,
|
537
|
`place` varbinary(767) NOT NULL,
|
538
|
`elevation_m` double DEFAULT NULL,
|
539
|
`slope_incline_deg` double DEFAULT NULL,
|
540
|
`slope_direction_deg_N` double DEFAULT NULL,
|
541
|
`geological_context` varbinary(767) DEFAULT NULL,
|
542
|
`community` varbinary(767) DEFAULT NULL,
|
543
|
`observations` set('hstore') COLLATE utf8_bin DEFAULT NULL,
|
544
|
PRIMARY KEY (`id`),
|
545
|
KEY `fk_place_observation_place1_idx` (`place`),
|
546
|
KEY `fk_place_observation_geological_context1_idx` (`geological_context`),
|
547
|
KEY `fk_place_observation_community1_idx` (`community`),
|
548
|
CONSTRAINT `fk_place_observation_place1` FOREIGN KEY (`place`) REFERENCES `local_place` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
|
549
|
CONSTRAINT `fk_place_observation_geological_context1` FOREIGN KEY (`geological_context`) REFERENCES `geological_context` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
|
550
|
CONSTRAINT `fk_place_observation_community1` FOREIGN KEY (`community`) REFERENCES `community` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
|
551
|
CONSTRAINT `fk_place_observation_sampling_event1` FOREIGN KEY (`id`) REFERENCES `sampling_event` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
|
552
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='A sampling of a [[VegCore#Location|Location]]';
|
553
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
554
|
|
555
|
--
|
556
|
-- Dumping data for table `place_observation`
|
557
|
--
|
558
|
|
559
|
/*!40000 ALTER TABLE `place_observation` DISABLE KEYS */;
|
560
|
/*!40000 ALTER TABLE `place_observation` ENABLE KEYS */;
|
561
|
|
562
|
--
|
563
|
-- Table structure for table `plot`
|
564
|
--
|
565
|
|
566
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
567
|
/*!40101 SET character_set_client = utf8 */;
|
568
|
CREATE TABLE `plot` (
|
569
|
`id` varbinary(767) NOT NULL,
|
570
|
`name` varbinary(767) DEFAULT NULL,
|
571
|
`area_m2` double DEFAULT NULL,
|
572
|
`shape` varbinary(767) DEFAULT NULL,
|
573
|
`bounding_box_rect` varbinary(767) DEFAULT NULL,
|
574
|
`footprint_geom_WKT` varbinary(767) DEFAULT NULL,
|
575
|
`dimensions` set('hstore') COLLATE utf8_bin DEFAULT NULL,
|
576
|
PRIMARY KEY (`id`),
|
577
|
CONSTRAINT `fk_subplot_place1` FOREIGN KEY (`id`) REFERENCES `local_place` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
|
578
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
|
579
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
580
|
|
581
|
--
|
582
|
-- Dumping data for table `plot`
|
583
|
--
|
584
|
|
585
|
/*!40000 ALTER TABLE `plot` DISABLE KEYS */;
|
586
|
/*!40000 ALTER TABLE `plot` ENABLE KEYS */;
|
587
|
|
588
|
--
|
589
|
-- Table structure for table `project`
|
590
|
--
|
591
|
|
592
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
593
|
/*!40101 SET character_set_client = utf8 */;
|
594
|
CREATE TABLE `project` (
|
595
|
`id` varbinary(767) NOT NULL,
|
596
|
`name` varbinary(767) NOT NULL,
|
597
|
`info` set('hstore') COLLATE utf8_bin DEFAULT NULL,
|
598
|
PRIMARY KEY (`id`),
|
599
|
CONSTRAINT `fk_project_event1` FOREIGN KEY (`id`) REFERENCES `event` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
|
600
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='A "project established to collect vegetation plot data. Each plot originates as part of a project." ("VegBank":http://vegbank.org/vegbank/views/dba_tabledescription_detail.jsp?view=detail&wparam=project&entity=dba_tabledescription&where=where_tablename)';
|
601
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
602
|
|
603
|
--
|
604
|
-- Dumping data for table `project`
|
605
|
--
|
606
|
|
607
|
/*!40000 ALTER TABLE `project` DISABLE KEYS */;
|
608
|
/*!40000 ALTER TABLE `project` ENABLE KEYS */;
|
609
|
|
610
|
--
|
611
|
-- Table structure for table `record`
|
612
|
--
|
613
|
|
614
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
615
|
/*!40101 SET character_set_client = utf8 */;
|
616
|
CREATE TABLE `record` (
|
617
|
`id` varbinary(767) NOT NULL,
|
618
|
`source` varbinary(767) NOT NULL,
|
619
|
`source_id_scope` varbinary(767) DEFAULT NULL,
|
620
|
`source_record_id` varbinary(767) DEFAULT NULL,
|
621
|
`info` set('hstore') COLLATE utf8_bin DEFAULT NULL,
|
622
|
PRIMARY KEY (`id`),
|
623
|
UNIQUE KEY `record_unique` (`source`,`source_id_scope`,`source_record_id`),
|
624
|
KEY `fk_record_source1_idx` (`source`),
|
625
|
CONSTRAINT `fk_record_source1` FOREIGN KEY (`source`) REFERENCES `source` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
|
626
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
|
627
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
628
|
|
629
|
--
|
630
|
-- Dumping data for table `record`
|
631
|
--
|
632
|
|
633
|
/*!40000 ALTER TABLE `record` DISABLE KEYS */;
|
634
|
/*!40000 ALTER TABLE `record` ENABLE KEYS */;
|
635
|
|
636
|
--
|
637
|
-- Table structure for table `referenced_class`
|
638
|
--
|
639
|
|
640
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
641
|
/*!40101 SET character_set_client = utf8 */;
|
642
|
CREATE TABLE `referenced_class` (
|
643
|
`id` varbinary(767) NOT NULL,
|
644
|
PRIMARY KEY (`id`),
|
645
|
CONSTRAINT `fk_example_record10` FOREIGN KEY (`id`) REFERENCES `record` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
|
646
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
|
647
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
648
|
|
649
|
--
|
650
|
-- Dumping data for table `referenced_class`
|
651
|
--
|
652
|
|
653
|
/*!40000 ALTER TABLE `referenced_class` DISABLE KEYS */;
|
654
|
/*!40000 ALTER TABLE `referenced_class` ENABLE KEYS */;
|
655
|
|
656
|
--
|
657
|
-- Table structure for table `relationship`
|
658
|
--
|
659
|
|
660
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
661
|
/*!40101 SET character_set_client = utf8 */;
|
662
|
CREATE TABLE `relationship` (
|
663
|
`id` varbinary(767) NOT NULL,
|
664
|
`record` varbinary(767) NOT NULL,
|
665
|
`related_record` varbinary(767) NOT NULL,
|
666
|
`info` set('hstore') COLLATE utf8_bin DEFAULT NULL,
|
667
|
PRIMARY KEY (`id`),
|
668
|
KEY `fk_relationship_record1_idx` (`record`),
|
669
|
KEY `fk_relationship_related_record_idx` (`related_record`),
|
670
|
CONSTRAINT `fk_relationship_record1` FOREIGN KEY (`id`) REFERENCES `record` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
|
671
|
CONSTRAINT `fk_relationship_record2` FOREIGN KEY (`record`) REFERENCES `record` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
|
672
|
CONSTRAINT `fk_relationship_related_record` FOREIGN KEY (`related_record`) REFERENCES `record` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
|
673
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='"information pertaining to relationships between resources (instances of data records, such as Occurrences, Taxa, Locations, Events)" ("DwC":http://rs.tdwg.org/dwc/terms/#ResourceRelationship)';
|
674
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
675
|
|
676
|
--
|
677
|
-- Dumping data for table `relationship`
|
678
|
--
|
679
|
|
680
|
/*!40000 ALTER TABLE `relationship` DISABLE KEYS */;
|
681
|
/*!40000 ALTER TABLE `relationship` ENABLE KEYS */;
|
682
|
|
683
|
--
|
684
|
-- Table structure for table `reobservable`
|
685
|
--
|
686
|
|
687
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
688
|
/*!40101 SET character_set_client = utf8 */;
|
689
|
CREATE TABLE `reobservable` (
|
690
|
`id` varbinary(767) NOT NULL,
|
691
|
`current_determination` varbinary(767) DEFAULT NULL,
|
692
|
`original_determination` varbinary(767) DEFAULT NULL,
|
693
|
PRIMARY KEY (`id`),
|
694
|
KEY `fk_taxon_occurrence_taxon_determination1_idx` (`original_determination`),
|
695
|
KEY `fk_taxon_occurrence_taxon_determination2_idx` (`current_determination`),
|
696
|
CONSTRAINT `fk_taxon_occurrence_taxon_determination1` FOREIGN KEY (`original_determination`) REFERENCES `taxon_determination` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
|
697
|
CONSTRAINT `fk_taxon_occurrence_taxon_determination2` FOREIGN KEY (`current_determination`) REFERENCES `taxon_determination` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
|
698
|
CONSTRAINT `fk_taxon_occurrence_event1` FOREIGN KEY (`id`) REFERENCES `record` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
|
699
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Any entity on which [[VegCore#TaxonDetermination|TaxonDetermination]]s can be made';
|
700
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
701
|
|
702
|
--
|
703
|
-- Dumping data for table `reobservable`
|
704
|
--
|
705
|
|
706
|
/*!40000 ALTER TABLE `reobservable` DISABLE KEYS */;
|
707
|
/*!40000 ALTER TABLE `reobservable` ENABLE KEYS */;
|
708
|
|
709
|
--
|
710
|
-- Table structure for table `sampling_event`
|
711
|
--
|
712
|
|
713
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
714
|
/*!40101 SET character_set_client = utf8 */;
|
715
|
CREATE TABLE `sampling_event` (
|
716
|
`id` varbinary(767) NOT NULL,
|
717
|
`method` varbinary(767) DEFAULT NULL,
|
718
|
PRIMARY KEY (`id`),
|
719
|
KEY `fk_sampling_event_method1_idx` (`method`),
|
720
|
CONSTRAINT `fk_sampling_event_method1` FOREIGN KEY (`method`) REFERENCES `method` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
|
721
|
CONSTRAINT `fk_project_event10` FOREIGN KEY (`id`) REFERENCES `event` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
|
722
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
|
723
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
724
|
|
725
|
--
|
726
|
-- Dumping data for table `sampling_event`
|
727
|
--
|
728
|
|
729
|
/*!40000 ALTER TABLE `sampling_event` DISABLE KEYS */;
|
730
|
/*!40000 ALTER TABLE `sampling_event` ENABLE KEYS */;
|
731
|
|
732
|
--
|
733
|
-- Table structure for table `soil_observation`
|
734
|
--
|
735
|
|
736
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
737
|
/*!40101 SET character_set_client = utf8 */;
|
738
|
CREATE TABLE `soil_observation` (
|
739
|
`id` varbinary(767) NOT NULL,
|
740
|
`observations` set('hstore') COLLATE utf8_bin DEFAULT NULL,
|
741
|
PRIMARY KEY (`id`),
|
742
|
CONSTRAINT `fk_soil_observation_place_observation1` FOREIGN KEY (`id`) REFERENCES `place_observation` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
|
743
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='A sampling of a [[VegCore#Location|Location]]''s soil';
|
744
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
745
|
|
746
|
--
|
747
|
-- Dumping data for table `soil_observation`
|
748
|
--
|
749
|
|
750
|
/*!40000 ALTER TABLE `soil_observation` DISABLE KEYS */;
|
751
|
/*!40000 ALTER TABLE `soil_observation` ENABLE KEYS */;
|
752
|
|
753
|
--
|
754
|
-- Table structure for table `source`
|
755
|
--
|
756
|
|
757
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
758
|
/*!40101 SET character_set_client = utf8 */;
|
759
|
CREATE TABLE `source` (
|
760
|
`id` varbinary(767) NOT NULL,
|
761
|
`parent` varbinary(767) NOT NULL,
|
762
|
`name` varbinary(767) NOT NULL,
|
763
|
`first_publisher` varbinary(767) DEFAULT NULL,
|
764
|
`owner` varbinary(767) DEFAULT NULL,
|
765
|
`info` set('hstore') COLLATE utf8_bin DEFAULT NULL,
|
766
|
PRIMARY KEY (`id`),
|
767
|
UNIQUE KEY `source_unique` (`parent`,`name`),
|
768
|
KEY `fk_source1_idx` (`parent`),
|
769
|
KEY `fk_source_party1_idx` (`owner`),
|
770
|
KEY `fk_source_party2_idx` (`first_publisher`),
|
771
|
CONSTRAINT `fk_source1` FOREIGN KEY (`parent`) REFERENCES `source` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
|
772
|
CONSTRAINT `fk_source_party1` FOREIGN KEY (`owner`) REFERENCES `party` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
|
773
|
CONSTRAINT `fk_source_party2` FOREIGN KEY (`first_publisher`) REFERENCES `party` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
|
774
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='a "reference [...] cited within the database" ("VegBank":http://vegbank.org/vegbank/views/dba_tabledescription_detail.jsp?view=detail&wparam=reference&entity=dba_tabledescription&where=where_tablename)';
|
775
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
776
|
|
777
|
--
|
778
|
-- Dumping data for table `source`
|
779
|
--
|
780
|
|
781
|
/*!40000 ALTER TABLE `source` DISABLE KEYS */;
|
782
|
/*!40000 ALTER TABLE `source` ENABLE KEYS */;
|
783
|
|
784
|
--
|
785
|
-- Table structure for table `specimen`
|
786
|
--
|
787
|
|
788
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
789
|
/*!40101 SET character_set_client = utf8 */;
|
790
|
CREATE TABLE `specimen` (
|
791
|
`id` varbinary(767) NOT NULL,
|
792
|
`individual` varbinary(767) DEFAULT NULL,
|
793
|
`code_in_individual` varbinary(767) DEFAULT NULL,
|
794
|
`collection_event` varbinary(767) DEFAULT NULL,
|
795
|
`orig_collection` varbinary(767) DEFAULT NULL,
|
796
|
`barcode` varbinary(767) DEFAULT NULL,
|
797
|
`accession_number` varbinary(767) DEFAULT NULL,
|
798
|
`specimenholder_institutions` varbinary(767) DEFAULT NULL,
|
799
|
`current_collection` varbinary(767) DEFAULT NULL,
|
800
|
`owner_collection` varbinary(767) DEFAULT NULL,
|
801
|
PRIMARY KEY (`id`),
|
802
|
UNIQUE KEY `specimen_unique_in_individual` (`individual`,`code_in_individual`),
|
803
|
UNIQUE KEY `specimen_unique_by_collection_event` (`collection_event`),
|
804
|
UNIQUE KEY `specimen_unique_in_collection_by_barcode` (`orig_collection`,`barcode`),
|
805
|
UNIQUE KEY `specimen_unique_in_collection_by_accession_number` (`orig_collection`,`accession_number`),
|
806
|
KEY `fk_specimen_collection1_idx` (`orig_collection`),
|
807
|
KEY `fk_specimen_taxon_observation1_idx` (`collection_event`),
|
808
|
KEY `fk_specimen_individual1_idx` (`individual`),
|
809
|
KEY `fk_specimen_collection2_idx` (`current_collection`),
|
810
|
KEY `fk_specimen_organization3_idx` (`owner_collection`),
|
811
|
KEY `fk_specimen_party_list1_idx` (`specimenholder_institutions`),
|
812
|
CONSTRAINT `fk_specimen_organization3` FOREIGN KEY (`owner_collection`) REFERENCES `collection` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
|
813
|
CONSTRAINT `fk_specimen_taxon_observation1` FOREIGN KEY (`collection_event`) REFERENCES `taxon_observation` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
|
814
|
CONSTRAINT `fk_specimen_individual1` FOREIGN KEY (`individual`) REFERENCES `individual` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
|
815
|
CONSTRAINT `fk_specimen_collection2` FOREIGN KEY (`current_collection`) REFERENCES `collection` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
|
816
|
CONSTRAINT `fk_specimen_party_list1` FOREIGN KEY (`specimenholder_institutions`) REFERENCES `party_list` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
|
817
|
CONSTRAINT `fk_specimen_collection1` FOREIGN KEY (`orig_collection`) REFERENCES `collection` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
|
818
|
CONSTRAINT `fk_specimen_taxon_occurrence1` FOREIGN KEY (`id`) REFERENCES `reobservable` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
|
819
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='A "part of a plant" ("Wikipedia":http://en.wikipedia.org/wiki/Specimen) which was collected from it';
|
820
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
821
|
|
822
|
--
|
823
|
-- Dumping data for table `specimen`
|
824
|
--
|
825
|
|
826
|
/*!40000 ALTER TABLE `specimen` DISABLE KEYS */;
|
827
|
/*!40000 ALTER TABLE `specimen` ENABLE KEYS */;
|
828
|
|
829
|
--
|
830
|
-- Table structure for table `specimen_observation`
|
831
|
--
|
832
|
|
833
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
834
|
/*!40101 SET character_set_client = utf8 */;
|
835
|
CREATE TABLE `specimen_observation` (
|
836
|
`id` varbinary(767) NOT NULL,
|
837
|
`specimen` varbinary(767) NOT NULL,
|
838
|
`description` varbinary(767) DEFAULT NULL,
|
839
|
`traits` set('hstore') COLLATE utf8_bin DEFAULT NULL,
|
840
|
PRIMARY KEY (`id`),
|
841
|
KEY `fk_specimen_observation_specimen1_idx` (`specimen`),
|
842
|
CONSTRAINT `fk_specimen_taxon_occurrence10` FOREIGN KEY (`id`) REFERENCES `taxon_observation` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
|
843
|
CONSTRAINT `fk_specimen_observation_specimen1` FOREIGN KEY (`specimen`) REFERENCES `specimen` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
|
844
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
|
845
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
846
|
|
847
|
--
|
848
|
-- Dumping data for table `specimen_observation`
|
849
|
--
|
850
|
|
851
|
/*!40000 ALTER TABLE `specimen_observation` DISABLE KEYS */;
|
852
|
/*!40000 ALTER TABLE `specimen_observation` ENABLE KEYS */;
|
853
|
|
854
|
--
|
855
|
-- Table structure for table `stem`
|
856
|
--
|
857
|
|
858
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
859
|
/*!40101 SET character_set_client = utf8 */;
|
860
|
CREATE TABLE `stem` (
|
861
|
`id` varbinary(767) NOT NULL,
|
862
|
`individual` varbinary(767) DEFAULT NULL,
|
863
|
PRIMARY KEY (`id`),
|
864
|
KEY `fk_stem_individual1_idx` (`individual`),
|
865
|
CONSTRAINT `fk_stem_individual1` FOREIGN KEY (`individual`) REFERENCES `individual` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
|
866
|
CONSTRAINT `fk_stem_individual2` FOREIGN KEY (`id`) REFERENCES `individual` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
|
867
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='An "individual tree stem" ("VegBank":http://vegbank.org/vegbank/views/dba_tabledescription_detail.jsp?view=detail&wparam=stemlocation&entity=dba_tabledescription&where=where_tablename)';
|
868
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
869
|
|
870
|
--
|
871
|
-- Dumping data for table `stem`
|
872
|
--
|
873
|
|
874
|
/*!40000 ALTER TABLE `stem` DISABLE KEYS */;
|
875
|
/*!40000 ALTER TABLE `stem` ENABLE KEYS */;
|
876
|
|
877
|
--
|
878
|
-- Table structure for table `stem_observation`
|
879
|
--
|
880
|
|
881
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
882
|
/*!40101 SET character_set_client = utf8 */;
|
883
|
CREATE TABLE `stem_observation` (
|
884
|
`id` varbinary(767) NOT NULL,
|
885
|
`individual_observation` varbinary(767) DEFAULT NULL,
|
886
|
`stem` varbinary(767) DEFAULT NULL,
|
887
|
`traits` set('hstore') COLLATE utf8_bin DEFAULT NULL,
|
888
|
PRIMARY KEY (`id`),
|
889
|
UNIQUE KEY `stem_observation_unique` (`individual_observation`,`stem`),
|
890
|
KEY `fk_stem_observation_individual_observation1_idx` (`individual_observation`),
|
891
|
KEY `fk_stem_observation_stem1_idx` (`stem`),
|
892
|
CONSTRAINT `fk_stem_observation_stem1` FOREIGN KEY (`stem`) REFERENCES `stem` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
|
893
|
CONSTRAINT `fk_stem_observation_individual_observation1` FOREIGN KEY (`individual_observation`) REFERENCES `individual_observation` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
|
894
|
CONSTRAINT `fk_stem_observation_individual_observation2` FOREIGN KEY (`id`) REFERENCES `individual_observation` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
|
895
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='An observation of a [[VegCore#Stem|Stem]]';
|
896
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
897
|
|
898
|
--
|
899
|
-- Dumping data for table `stem_observation`
|
900
|
--
|
901
|
|
902
|
/*!40000 ALTER TABLE `stem_observation` DISABLE KEYS */;
|
903
|
/*!40000 ALTER TABLE `stem_observation` ENABLE KEYS */;
|
904
|
|
905
|
--
|
906
|
-- Table structure for table `stratum`
|
907
|
--
|
908
|
|
909
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
910
|
/*!40101 SET character_set_client = utf8 */;
|
911
|
CREATE TABLE `stratum` (
|
912
|
`id` varbinary(767) NOT NULL,
|
913
|
`name` varbinary(767) NOT NULL,
|
914
|
`info` set('hstore') COLLATE utf8_bin DEFAULT NULL,
|
915
|
PRIMARY KEY (`id`),
|
916
|
CONSTRAINT `fk_place_path_record10` FOREIGN KEY (`id`) REFERENCES `method` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
|
917
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
|
918
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
919
|
|
920
|
--
|
921
|
-- Dumping data for table `stratum`
|
922
|
--
|
923
|
|
924
|
/*!40000 ALTER TABLE `stratum` DISABLE KEYS */;
|
925
|
/*!40000 ALTER TABLE `stratum` ENABLE KEYS */;
|
926
|
|
927
|
--
|
928
|
-- Table structure for table `subplot`
|
929
|
--
|
930
|
|
931
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
932
|
/*!40101 SET character_set_client = utf8 */;
|
933
|
CREATE TABLE `subplot` (
|
934
|
`id` varbinary(767) NOT NULL,
|
935
|
`x_m` double DEFAULT NULL,
|
936
|
`y_m` double DEFAULT NULL,
|
937
|
`coords` set('hstore') COLLATE utf8_bin DEFAULT NULL,
|
938
|
PRIMARY KEY (`id`),
|
939
|
CONSTRAINT `fk_subplot_plot1` FOREIGN KEY (`id`) REFERENCES `plot` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
|
940
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='"subplot, line, or any other subsample or subdivision of plot" ("SALVIAS":http://salvias.net/Documents/salvias_data_dictionary.html#Plot_data/subplot)';
|
941
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
942
|
|
943
|
--
|
944
|
-- Dumping data for table `subplot`
|
945
|
--
|
946
|
|
947
|
/*!40000 ALTER TABLE `subplot` DISABLE KEYS */;
|
948
|
/*!40000 ALTER TABLE `subplot` ENABLE KEYS */;
|
949
|
|
950
|
--
|
951
|
-- Table structure for table `taxon_absence`
|
952
|
--
|
953
|
|
954
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
955
|
/*!40101 SET character_set_client = utf8 */;
|
956
|
CREATE TABLE `taxon_absence` (
|
957
|
`id` varbinary(767) NOT NULL,
|
958
|
PRIMARY KEY (`id`),
|
959
|
CONSTRAINT `fk_taxon_absence_taxon_determination1` FOREIGN KEY (`id`) REFERENCES `taxon_determination` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
|
960
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='An observation that a [[VegCore#Taxon|Taxon]]''s does _not_ exist in a place';
|
961
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
962
|
|
963
|
--
|
964
|
-- Dumping data for table `taxon_absence`
|
965
|
--
|
966
|
|
967
|
/*!40000 ALTER TABLE `taxon_absence` DISABLE KEYS */;
|
968
|
/*!40000 ALTER TABLE `taxon_absence` ENABLE KEYS */;
|
969
|
|
970
|
--
|
971
|
-- Table structure for table `taxon_assertion`
|
972
|
--
|
973
|
|
974
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
975
|
/*!40101 SET character_set_client = utf8 */;
|
976
|
CREATE TABLE `taxon_assertion` (
|
977
|
`id` varbinary(767) NOT NULL,
|
978
|
`string` varbinary(767) NOT NULL COMMENT 'for parsed_taxon_assertion, this is the TNRS input name, not the concatenated matched name',
|
979
|
`taxon` varbinary(767) DEFAULT NULL,
|
980
|
`cf_aff` varbinary(767) DEFAULT NULL,
|
981
|
`annotations` set('hstore') COLLATE utf8_bin DEFAULT NULL,
|
982
|
PRIMARY KEY (`id`),
|
983
|
KEY `fk_taxon_assertion_taxon_string1_idx` (`string`),
|
984
|
KEY `fk_taxon_assertion_taxon_name1_idx` (`taxon`),
|
985
|
CONSTRAINT `fk_qualified_taxon_record1` FOREIGN KEY (`id`) REFERENCES `record` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
|
986
|
CONSTRAINT `fk_taxon_assertion_taxon_string1` FOREIGN KEY (`string`) REFERENCES `taxon_string` (`string`) ON DELETE CASCADE ON UPDATE CASCADE,
|
987
|
CONSTRAINT `fk_taxon_assertion_taxon_name1` FOREIGN KEY (`taxon`) REFERENCES `taxon_name` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
|
988
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
|
989
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
990
|
|
991
|
--
|
992
|
-- Dumping data for table `taxon_assertion`
|
993
|
--
|
994
|
|
995
|
/*!40000 ALTER TABLE `taxon_assertion` DISABLE KEYS */;
|
996
|
/*!40000 ALTER TABLE `taxon_assertion` ENABLE KEYS */;
|
997
|
|
998
|
--
|
999
|
-- Table structure for table `taxon_concept`
|
1000
|
--
|
1001
|
|
1002
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
1003
|
/*!40101 SET character_set_client = utf8 */;
|
1004
|
CREATE TABLE `taxon_concept` (
|
1005
|
`id` varbinary(767) NOT NULL,
|
1006
|
`according_to` varbinary(767) NOT NULL,
|
1007
|
`parent` varbinary(767) NOT NULL,
|
1008
|
`accepted_taxon_concept` varbinary(767) DEFAULT NULL,
|
1009
|
PRIMARY KEY (`id`),
|
1010
|
UNIQUE KEY `taxon_concept_unique_name` (`according_to`),
|
1011
|
KEY `fk_taxon_taxon1_idx` (`parent`),
|
1012
|
KEY `fk_taxon_concept_source1_idx` (`according_to`),
|
1013
|
KEY `fk_taxon_concept_taxon_concept1_idx` (`accepted_taxon_concept`),
|
1014
|
CONSTRAINT `fk_taxon_taxon1` FOREIGN KEY (`parent`) REFERENCES `taxon_concept` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
|
1015
|
CONSTRAINT `fk_taxon_concept_source1` FOREIGN KEY (`according_to`) REFERENCES `source` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
|
1016
|
CONSTRAINT `fk_taxon_concept_taxon_concept1` FOREIGN KEY (`accepted_taxon_concept`) REFERENCES `taxon_concept` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
|
1017
|
CONSTRAINT `fk_taxon_concept_taxon_name1` FOREIGN KEY (`id`) REFERENCES `taxon_name` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
|
1018
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='A [[VegCore#Taxon|Taxon]] described by a specific [[VegCore#Reference|Reference]]';
|
1019
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
1020
|
|
1021
|
--
|
1022
|
-- Dumping data for table `taxon_concept`
|
1023
|
--
|
1024
|
|
1025
|
/*!40000 ALTER TABLE `taxon_concept` DISABLE KEYS */;
|
1026
|
/*!40000 ALTER TABLE `taxon_concept` ENABLE KEYS */;
|
1027
|
|
1028
|
--
|
1029
|
-- Table structure for table `taxon_determination`
|
1030
|
--
|
1031
|
|
1032
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
1033
|
/*!40101 SET character_set_client = utf8 */;
|
1034
|
CREATE TABLE `taxon_determination` (
|
1035
|
`id` varbinary(767) NOT NULL,
|
1036
|
`identified_by` varbinary(767) DEFAULT NULL,
|
1037
|
`taxon_assertion` varbinary(767) NOT NULL,
|
1038
|
`fit_info` set('hstore') COLLATE utf8_bin DEFAULT NULL,
|
1039
|
PRIMARY KEY (`id`),
|
1040
|
UNIQUE KEY `taxon_determination_unique` (`taxon_assertion`,`identified_by`),
|
1041
|
KEY `fk_taxon_occurrence_has_qualified_taxon1_idx` (`taxon_assertion`),
|
1042
|
KEY `fk_taxon_determination_party_list1_idx` (`identified_by`),
|
1043
|
CONSTRAINT `fk_taxon_occurrence_has_qualified_taxon1` FOREIGN KEY (`taxon_assertion`) REFERENCES `taxon_assertion` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
|
1044
|
CONSTRAINT `fk_taxon_determination_party_list1` FOREIGN KEY (`identified_by`) REFERENCES `party_list` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
|
1045
|
CONSTRAINT `fk_taxon_determination_taxon_observation1` FOREIGN KEY (`id`) REFERENCES `taxon_observation` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
|
1046
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='An assertion that a [[VegCore#TaxonOccurrence|TaxonOccurrence]] is a particular [[VegCore#Taxon|Taxon]]';
|
1047
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
1048
|
|
1049
|
--
|
1050
|
-- Dumping data for table `taxon_determination`
|
1051
|
--
|
1052
|
|
1053
|
/*!40000 ALTER TABLE `taxon_determination` DISABLE KEYS */;
|
1054
|
/*!40000 ALTER TABLE `taxon_determination` ENABLE KEYS */;
|
1055
|
|
1056
|
--
|
1057
|
-- Table structure for table `taxon_name`
|
1058
|
--
|
1059
|
|
1060
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
1061
|
/*!40101 SET character_set_client = utf8 */;
|
1062
|
CREATE TABLE `taxon_name` (
|
1063
|
`id` varbinary(767) NOT NULL,
|
1064
|
`unique_name` varbinary(767) NOT NULL,
|
1065
|
`formal_name` varbinary(767) DEFAULT NULL,
|
1066
|
`taxon_name` varbinary(767) DEFAULT NULL,
|
1067
|
`author` varbinary(767) DEFAULT NULL,
|
1068
|
`common_name` varbinary(767) DEFAULT NULL,
|
1069
|
`rank` varbinary(767) DEFAULT NULL,
|
1070
|
PRIMARY KEY (`id`),
|
1071
|
KEY `fk_taxon_concept_taxon_string10_idx` (`unique_name`),
|
1072
|
CONSTRAINT `fk_taxon_record10` FOREIGN KEY (`id`) REFERENCES `record` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
|
1073
|
CONSTRAINT `fk_taxon_concept_taxon_string10` FOREIGN KEY (`unique_name`) REFERENCES `taxon_string` (`string`) ON DELETE CASCADE ON UPDATE CASCADE
|
1074
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
|
1075
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
1076
|
|
1077
|
--
|
1078
|
-- Dumping data for table `taxon_name`
|
1079
|
--
|
1080
|
|
1081
|
/*!40000 ALTER TABLE `taxon_name` DISABLE KEYS */;
|
1082
|
/*!40000 ALTER TABLE `taxon_name` ENABLE KEYS */;
|
1083
|
|
1084
|
--
|
1085
|
-- Table structure for table `taxon_observation`
|
1086
|
--
|
1087
|
|
1088
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
1089
|
/*!40101 SET character_set_client = utf8 */;
|
1090
|
CREATE TABLE `taxon_observation` (
|
1091
|
`id` varbinary(767) NOT NULL,
|
1092
|
`collectors` varbinary(767) DEFAULT NULL,
|
1093
|
`collector_number` varbinary(767) DEFAULT NULL,
|
1094
|
`voucher` varbinary(767) DEFAULT NULL,
|
1095
|
`growth_form` varbinary(767) DEFAULT NULL,
|
1096
|
`cultivated` tinyint(1) DEFAULT NULL,
|
1097
|
`traits` set('hstore') COLLATE utf8_bin DEFAULT NULL,
|
1098
|
PRIMARY KEY (`id`),
|
1099
|
KEY `fk_taxon_observation_specimen1_idx` (`voucher`),
|
1100
|
KEY `fk_taxon_observation_party_list1_idx` (`collectors`),
|
1101
|
CONSTRAINT `fk_taxon_observation_party_list1` FOREIGN KEY (`collectors`) REFERENCES `party_list` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
|
1102
|
CONSTRAINT `fk_taxon_observation_sampling_event1` FOREIGN KEY (`id`) REFERENCES `sampling_event` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
|
1103
|
CONSTRAINT `fk_taxon_observation_specimen1` FOREIGN KEY (`voucher`) REFERENCES `specimen` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
|
1104
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
|
1105
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
1106
|
|
1107
|
--
|
1108
|
-- Dumping data for table `taxon_observation`
|
1109
|
--
|
1110
|
|
1111
|
/*!40000 ALTER TABLE `taxon_observation` DISABLE KEYS */;
|
1112
|
/*!40000 ALTER TABLE `taxon_observation` ENABLE KEYS */;
|
1113
|
|
1114
|
--
|
1115
|
-- Table structure for table `taxon_path`
|
1116
|
--
|
1117
|
|
1118
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
1119
|
/*!40101 SET character_set_client = utf8 */;
|
1120
|
CREATE TABLE `taxon_path` (
|
1121
|
`id` varbinary(767) NOT NULL,
|
1122
|
`family` varbinary(767) DEFAULT NULL,
|
1123
|
`genus` varbinary(767) DEFAULT NULL,
|
1124
|
`specific_epithet` varbinary(767) DEFAULT NULL,
|
1125
|
`ranks` set('hstore') COLLATE utf8_bin DEFAULT NULL,
|
1126
|
PRIMARY KEY (`id`),
|
1127
|
CONSTRAINT `fk_taxon_path_taxon_name1` FOREIGN KEY (`id`) REFERENCES `taxon_name` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
|
1128
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='"a group of one (or more) populations of organism(s), which a taxonomist adjudges to be a unit" ("Wikipedia":http://en.wikipedia.org/wiki/Taxon)';
|
1129
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
1130
|
|
1131
|
--
|
1132
|
-- Dumping data for table `taxon_path`
|
1133
|
--
|
1134
|
|
1135
|
/*!40000 ALTER TABLE `taxon_path` DISABLE KEYS */;
|
1136
|
/*!40000 ALTER TABLE `taxon_path` ENABLE KEYS */;
|
1137
|
|
1138
|
--
|
1139
|
-- Table structure for table `taxon_presence`
|
1140
|
--
|
1141
|
|
1142
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
1143
|
/*!40101 SET character_set_client = utf8 */;
|
1144
|
CREATE TABLE `taxon_presence` (
|
1145
|
`id` varbinary(767) NOT NULL,
|
1146
|
`occurrence_status` varbinary(767) DEFAULT NULL,
|
1147
|
`traits` set('hstore') COLLATE utf8_bin DEFAULT NULL,
|
1148
|
PRIMARY KEY (`id`),
|
1149
|
CONSTRAINT `fk_taxon_presence_taxon_determination1` FOREIGN KEY (`id`) REFERENCES `taxon_determination` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
|
1150
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='An observation of just a [[VegCore#Taxon|Taxon]]''s _presence_';
|
1151
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
1152
|
|
1153
|
--
|
1154
|
-- Dumping data for table `taxon_presence`
|
1155
|
--
|
1156
|
|
1157
|
/*!40000 ALTER TABLE `taxon_presence` DISABLE KEYS */;
|
1158
|
/*!40000 ALTER TABLE `taxon_presence` ENABLE KEYS */;
|
1159
|
|
1160
|
--
|
1161
|
-- Table structure for table `taxon_scrub`
|
1162
|
--
|
1163
|
|
1164
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
1165
|
/*!40101 SET character_set_client = utf8 */;
|
1166
|
CREATE TABLE `taxon_scrub` (
|
1167
|
`id` varbinary(767) NOT NULL,
|
1168
|
`input_string` varbinary(767) NOT NULL,
|
1169
|
`parsed_taxon_assertion` varbinary(767) NOT NULL,
|
1170
|
`matched_taxon_concept` varbinary(767) DEFAULT NULL,
|
1171
|
`match_score` float DEFAULT NULL,
|
1172
|
`match_info` set('hstore') COLLATE utf8_bin DEFAULT NULL,
|
1173
|
PRIMARY KEY (`id`),
|
1174
|
KEY `fk_parsed_taxon_assertion_taxon_name1_idx` (`matched_taxon_concept`),
|
1175
|
KEY `fk_taxon_scrub_taxon_assertion1_idx` (`parsed_taxon_assertion`),
|
1176
|
KEY `fk_taxon_scrub_taxon_string1_idx` (`input_string`),
|
1177
|
CONSTRAINT `fk_parsed_taxon_assertion_taxon_name1` FOREIGN KEY (`matched_taxon_concept`) REFERENCES `taxon_concept` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
|
1178
|
CONSTRAINT `fk_taxon_scrub_taxon_assertion1` FOREIGN KEY (`parsed_taxon_assertion`) REFERENCES `taxon_assertion` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
|
1179
|
CONSTRAINT `fk_taxon_scrub_taxon_string1` FOREIGN KEY (`input_string`) REFERENCES `taxon_string` (`string`) ON DELETE CASCADE ON UPDATE CASCADE,
|
1180
|
CONSTRAINT `fk_taxon_scrub_record1` FOREIGN KEY (`id`) REFERENCES `record` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
|
1181
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
|
1182
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
1183
|
|
1184
|
--
|
1185
|
-- Dumping data for table `taxon_scrub`
|
1186
|
--
|
1187
|
|
1188
|
/*!40000 ALTER TABLE `taxon_scrub` DISABLE KEYS */;
|
1189
|
/*!40000 ALTER TABLE `taxon_scrub` ENABLE KEYS */;
|
1190
|
|
1191
|
--
|
1192
|
-- Table structure for table `taxon_string`
|
1193
|
--
|
1194
|
|
1195
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
1196
|
/*!40101 SET character_set_client = utf8 */;
|
1197
|
CREATE TABLE `taxon_string` (
|
1198
|
`string` varbinary(767) NOT NULL,
|
1199
|
PRIMARY KEY (`string`)
|
1200
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='to get the parsed_taxon_assertion (TNRS result) for a taxon_string, join using taxon_string.string<-taxon_assertion(string)::parsed_taxon_assertion[source=''TNRS.version''] (see wiki.vegpath.org/SQL_dotpaths)';
|
1201
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
1202
|
|
1203
|
--
|
1204
|
-- Dumping data for table `taxon_string`
|
1205
|
--
|
1206
|
|
1207
|
/*!40000 ALTER TABLE `taxon_string` DISABLE KEYS */;
|
1208
|
/*!40000 ALTER TABLE `taxon_string` ENABLE KEYS */;
|
1209
|
|
1210
|
--
|
1211
|
-- Table structure for table `validatable_geoplace`
|
1212
|
--
|
1213
|
|
1214
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
1215
|
/*!40101 SET character_set_client = utf8 */;
|
1216
|
CREATE TABLE `validatable_geoplace` (
|
1217
|
`id` varbinary(767) NOT NULL,
|
1218
|
`geocoords` varbinary(767) NOT NULL,
|
1219
|
`geopath` varbinary(767) NOT NULL,
|
1220
|
PRIMARY KEY (`id`),
|
1221
|
UNIQUE KEY `validatable_place_unique` (`geopath`,`geocoords`),
|
1222
|
KEY `fk_geovalidation_place_path1_idx` (`geopath`),
|
1223
|
KEY `fk_geovalidation_coordinates1_idx` (`geocoords`),
|
1224
|
CONSTRAINT `fk_geovalidation_place_path1` FOREIGN KEY (`geopath`) REFERENCES `geopath` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
|
1225
|
CONSTRAINT `fk_geovalidation_coordinates1` FOREIGN KEY (`geocoords`) REFERENCES `geocoords` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
|
1226
|
CONSTRAINT `fk_validatable_geoplace_geoplace1` FOREIGN KEY (`id`) REFERENCES `geoplace` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
|
1227
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
|
1228
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
1229
|
|
1230
|
--
|
1231
|
-- Dumping data for table `validatable_geoplace`
|
1232
|
--
|
1233
|
|
1234
|
/*!40000 ALTER TABLE `validatable_geoplace` DISABLE KEYS */;
|
1235
|
/*!40000 ALTER TABLE `validatable_geoplace` ENABLE KEYS */;
|
1236
|
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
|
1237
|
|
1238
|
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
|
1239
|
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
|
1240
|
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
|
1241
|
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
|
1242
|
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
|
1243
|
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
|
1244
|
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
|
1245
|
|
1246
|
-- Dump completed
|