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
|
-- Current Database: `VegCore`
|
20
|
--
|
21
|
|
22
|
CREATE DATABASE /*!32312 IF NOT EXISTS*/ `VegCore` /*!40100 DEFAULT CHARACTER SET utf8 COLLATE utf8_bin */;
|
23
|
|
24
|
USE `VegCore`;
|
25
|
|
26
|
--
|
27
|
-- Table structure for table `aggregate_observation`
|
28
|
--
|
29
|
|
30
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
31
|
/*!40101 SET character_set_client = utf8 */;
|
32
|
CREATE TABLE `aggregate_observation` (
|
33
|
`id` varbinary(767) NOT NULL,
|
34
|
`sampling_event` varbinary(767) NOT NULL,
|
35
|
`occurrence_status` varbinary(767) DEFAULT NULL,
|
36
|
`traits` set('hstore') COLLATE utf8_bin DEFAULT NULL,
|
37
|
PRIMARY KEY (`id`),
|
38
|
KEY `fk_aggregate_observation_taxa_sampling_event1_idx` (`sampling_event`),
|
39
|
CONSTRAINT `fk_taxon_presence_taxon_determination10` FOREIGN KEY (`id`) REFERENCES `taxon_determination` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
|
40
|
CONSTRAINT `fk_aggregate_observation_taxa_sampling_event1` FOREIGN KEY (`sampling_event`) REFERENCES `taxa_sampling_event` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
|
41
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
|
42
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
43
|
|
44
|
--
|
45
|
-- Dumping data for table `aggregate_observation`
|
46
|
--
|
47
|
|
48
|
/*!40000 ALTER TABLE `aggregate_observation` DISABLE KEYS */;
|
49
|
/*!40000 ALTER TABLE `aggregate_observation` ENABLE KEYS */;
|
50
|
|
51
|
--
|
52
|
-- Table structure for table `base_class`
|
53
|
--
|
54
|
|
55
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
56
|
/*!40101 SET character_set_client = utf8 */;
|
57
|
CREATE TABLE `base_class` (
|
58
|
`id` varbinary(767) NOT NULL,
|
59
|
`referenced_class` varbinary(767) NOT NULL,
|
60
|
PRIMARY KEY (`id`),
|
61
|
KEY `fk_base_class_referenced_class1_idx` (`referenced_class`),
|
62
|
CONSTRAINT `fk_base_class_referenced_class1` FOREIGN KEY (`referenced_class`) REFERENCES `referenced_class` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
|
63
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
|
64
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
65
|
|
66
|
--
|
67
|
-- Dumping data for table `base_class`
|
68
|
--
|
69
|
|
70
|
/*!40000 ALTER TABLE `base_class` DISABLE KEYS */;
|
71
|
/*!40000 ALTER TABLE `base_class` ENABLE KEYS */;
|
72
|
|
73
|
--
|
74
|
-- Table structure for table `collection`
|
75
|
--
|
76
|
|
77
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
78
|
/*!40101 SET character_set_client = utf8 */;
|
79
|
CREATE TABLE `collection` (
|
80
|
`id` varbinary(767) NOT NULL,
|
81
|
`institution` varbinary(767) NOT NULL,
|
82
|
`name` varbinary(767) NOT NULL,
|
83
|
PRIMARY KEY (`id`),
|
84
|
UNIQUE KEY `collection_unique` (`institution`,`name`),
|
85
|
KEY `fk_collection_organization1_idx` (`institution`),
|
86
|
KEY `fk_collection_source1_idx` (`id`),
|
87
|
CONSTRAINT `fk_collection_source1` FOREIGN KEY (`id`) REFERENCES `traceable` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
|
88
|
CONSTRAINT `fk_collection_organization1` FOREIGN KEY (`institution`) REFERENCES `organization` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
|
89
|
) 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)';
|
90
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
91
|
|
92
|
--
|
93
|
-- Dumping data for table `collection`
|
94
|
--
|
95
|
|
96
|
/*!40000 ALTER TABLE `collection` DISABLE KEYS */;
|
97
|
/*!40000 ALTER TABLE `collection` ENABLE KEYS */;
|
98
|
|
99
|
--
|
100
|
-- Table structure for table `community`
|
101
|
--
|
102
|
|
103
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
104
|
/*!40101 SET character_set_client = utf8 */;
|
105
|
CREATE TABLE `community` (
|
106
|
`id` varbinary(767) NOT NULL,
|
107
|
`name` varbinary(767) NOT NULL,
|
108
|
`info` set('hstore') COLLATE utf8_bin DEFAULT NULL,
|
109
|
PRIMARY KEY (`id`),
|
110
|
CONSTRAINT `fk_community_record1` FOREIGN KEY (`id`) REFERENCES `traceable` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
|
111
|
) 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]])';
|
112
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
113
|
|
114
|
--
|
115
|
-- Dumping data for table `community`
|
116
|
--
|
117
|
|
118
|
/*!40000 ALTER TABLE `community` DISABLE KEYS */;
|
119
|
/*!40000 ALTER TABLE `community` ENABLE KEYS */;
|
120
|
|
121
|
--
|
122
|
-- Table structure for table `dataset`
|
123
|
--
|
124
|
|
125
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
126
|
/*!40101 SET character_set_client = utf8 */;
|
127
|
CREATE TABLE `dataset` (
|
128
|
`id` varbinary(767) NOT NULL,
|
129
|
`first_publisher` varbinary(767) DEFAULT NULL,
|
130
|
`data_owners` varbinary(767) DEFAULT NULL COMMENT 'parties who must be given attribution, such as copyrightholders',
|
131
|
`contacts` varbinary(767) DEFAULT NULL,
|
132
|
`info` set('hstore') COLLATE utf8_bin DEFAULT NULL,
|
133
|
PRIMARY KEY (`id`),
|
134
|
KEY `fk_source_party2_idx` (`first_publisher`),
|
135
|
KEY `fk_source_party_list1_idx` (`data_owners`),
|
136
|
KEY `fk_source_party1_idx` (`contacts`),
|
137
|
CONSTRAINT `fk_dataset_traceable1` FOREIGN KEY (`id`) REFERENCES `traceable` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
|
138
|
CONSTRAINT `fk_dataset_source1` FOREIGN KEY (`id`) REFERENCES `source` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
|
139
|
CONSTRAINT `fk_source_party1` FOREIGN KEY (`contacts`) REFERENCES `party_list` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
|
140
|
CONSTRAINT `fk_source_party2` FOREIGN KEY (`first_publisher`) REFERENCES `party` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
|
141
|
CONSTRAINT `fk_source_party_list1` FOREIGN KEY (`data_owners`) REFERENCES `party_list` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
|
142
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='something requiring attribution';
|
143
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
144
|
|
145
|
--
|
146
|
-- Dumping data for table `dataset`
|
147
|
--
|
148
|
|
149
|
/*!40000 ALTER TABLE `dataset` DISABLE KEYS */;
|
150
|
/*!40000 ALTER TABLE `dataset` ENABLE KEYS */;
|
151
|
|
152
|
--
|
153
|
-- Table structure for table `derived_class`
|
154
|
--
|
155
|
|
156
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
157
|
/*!40101 SET character_set_client = utf8 */;
|
158
|
CREATE TABLE `derived_class` (
|
159
|
`id` varbinary(767) NOT NULL,
|
160
|
PRIMARY KEY (`id`),
|
161
|
CONSTRAINT `fk_derived_class_base_class1` FOREIGN KEY (`id`) REFERENCES `base_class` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
|
162
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
|
163
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
164
|
|
165
|
--
|
166
|
-- Dumping data for table `derived_class`
|
167
|
--
|
168
|
|
169
|
/*!40000 ALTER TABLE `derived_class` DISABLE KEYS */;
|
170
|
/*!40000 ALTER TABLE `derived_class` ENABLE KEYS */;
|
171
|
|
172
|
--
|
173
|
-- Table structure for table `event`
|
174
|
--
|
175
|
|
176
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
177
|
/*!40101 SET character_set_client = utf8 */;
|
178
|
CREATE TABLE `event` (
|
179
|
`id` varbinary(767) NOT NULL,
|
180
|
`parent` varbinary(767) DEFAULT NULL,
|
181
|
`name` varbinary(767) DEFAULT NULL,
|
182
|
`date_range` varbinary(767) DEFAULT NULL,
|
183
|
`place` varbinary(767) DEFAULT NULL,
|
184
|
`participants` varbinary(767) DEFAULT NULL,
|
185
|
PRIMARY KEY (`id`),
|
186
|
UNIQUE KEY `event_unique_within_parent` (`parent`,`name`),
|
187
|
UNIQUE KEY `event_unique_within_place` (`place`,`date_range`,`participants`),
|
188
|
KEY `fk_event_place1_idx` (`place`),
|
189
|
KEY `fk_event1_idx` (`parent`),
|
190
|
KEY `fk_event_party_list1_idx` (`participants`),
|
191
|
CONSTRAINT `fk_event_party_list1` FOREIGN KEY (`participants`) REFERENCES `party_list` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
|
192
|
CONSTRAINT `fk_event1` FOREIGN KEY (`parent`) REFERENCES `event` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
|
193
|
CONSTRAINT `fk_event_place1` FOREIGN KEY (`place`) REFERENCES `place` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
|
194
|
CONSTRAINT `fk_event_record1` FOREIGN KEY (`id`) REFERENCES `traceable` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
|
195
|
) 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)';
|
196
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
197
|
|
198
|
--
|
199
|
-- Dumping data for table `event`
|
200
|
--
|
201
|
|
202
|
/*!40000 ALTER TABLE `event` DISABLE KEYS */;
|
203
|
/*!40000 ALTER TABLE `event` ENABLE KEYS */;
|
204
|
|
205
|
--
|
206
|
-- Table structure for table `geological_context`
|
207
|
--
|
208
|
|
209
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
210
|
/*!40101 SET character_set_client = utf8 */;
|
211
|
CREATE TABLE `geological_context` (
|
212
|
`id` varbinary(767) NOT NULL,
|
213
|
`name` varbinary(767) NOT NULL,
|
214
|
`info` set('hstore') COLLATE utf8_bin DEFAULT NULL,
|
215
|
PRIMARY KEY (`id`),
|
216
|
CONSTRAINT `fk_geological_context_record1` FOREIGN KEY (`id`) REFERENCES `traceable` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
|
217
|
) 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)';
|
218
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
219
|
|
220
|
--
|
221
|
-- Dumping data for table `geological_context`
|
222
|
--
|
223
|
|
224
|
/*!40000 ALTER TABLE `geological_context` DISABLE KEYS */;
|
225
|
/*!40000 ALTER TABLE `geological_context` ENABLE KEYS */;
|
226
|
|
227
|
--
|
228
|
-- Table structure for table `geopath`
|
229
|
--
|
230
|
|
231
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
232
|
/*!40101 SET character_set_client = utf8 */;
|
233
|
CREATE TABLE `geopath` (
|
234
|
`id` varbinary(767) NOT NULL,
|
235
|
`continent` varbinary(767) DEFAULT NULL,
|
236
|
`country` varbinary(767) DEFAULT NULL,
|
237
|
`state_province` varbinary(767) DEFAULT NULL,
|
238
|
`county` varbinary(767) DEFAULT NULL,
|
239
|
`municipality` varbinary(767) DEFAULT NULL,
|
240
|
`ranks` set('hstore') COLLATE utf8_bin DEFAULT NULL,
|
241
|
PRIMARY KEY (`id`)
|
242
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='A named region';
|
243
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
244
|
|
245
|
--
|
246
|
-- Dumping data for table `geopath`
|
247
|
--
|
248
|
|
249
|
/*!40000 ALTER TABLE `geopath` DISABLE KEYS */;
|
250
|
/*!40000 ALTER TABLE `geopath` ENABLE KEYS */;
|
251
|
|
252
|
--
|
253
|
-- Table structure for table `geoplace`
|
254
|
--
|
255
|
|
256
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
257
|
/*!40101 SET character_set_client = utf8 */;
|
258
|
CREATE TABLE `geoplace` (
|
259
|
`id` varbinary(767) NOT NULL,
|
260
|
`latitude_deg` varbinary(767) NOT NULL,
|
261
|
`longitude_deg` varbinary(767) NOT NULL,
|
262
|
`boundary_WKT` varbinary(767) NOT NULL DEFAULT 'point',
|
263
|
`official_name` varbinary(767) DEFAULT NULL,
|
264
|
PRIMARY KEY (`id`),
|
265
|
CONSTRAINT `fk_geoplace_place1` FOREIGN KEY (`id`) REFERENCES `place` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
|
266
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='A numerically-defined point';
|
267
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
268
|
|
269
|
--
|
270
|
-- Dumping data for table `geoplace`
|
271
|
--
|
272
|
|
273
|
/*!40000 ALTER TABLE `geoplace` DISABLE KEYS */;
|
274
|
/*!40000 ALTER TABLE `geoplace` ENABLE KEYS */;
|
275
|
|
276
|
--
|
277
|
-- Table structure for table `georeferencing`
|
278
|
--
|
279
|
|
280
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
281
|
/*!40101 SET character_set_client = utf8 */;
|
282
|
CREATE TABLE `georeferencing` (
|
283
|
`id` varbinary(767) NOT NULL,
|
284
|
`input_place` varbinary(767) NOT NULL,
|
285
|
`geoplace` varbinary(767) DEFAULT NULL,
|
286
|
`georeferenced_by` varbinary(767) DEFAULT NULL,
|
287
|
`info` set('hstore') COLLATE utf8_bin DEFAULT NULL,
|
288
|
PRIMARY KEY (`id`),
|
289
|
KEY `fk_georef_place1_idx` (`input_place`),
|
290
|
KEY `fk_georeferencing_party_list1_idx` (`georeferenced_by`),
|
291
|
KEY `fk_georeferencing_geoplace1_idx` (`geoplace`),
|
292
|
CONSTRAINT `fk_georeferencing_geoplace1` FOREIGN KEY (`geoplace`) REFERENCES `geoplace` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
|
293
|
CONSTRAINT `fk_georeferencing_party_list1` FOREIGN KEY (`georeferenced_by`) REFERENCES `party_list` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
|
294
|
CONSTRAINT `fk_georef_place1` FOREIGN KEY (`input_place`) REFERENCES `place` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
|
295
|
CONSTRAINT `fk_geovalidation_record100` FOREIGN KEY (`id`) REFERENCES `traceable` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
|
296
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='also stored GNRS results';
|
297
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
298
|
|
299
|
--
|
300
|
-- Dumping data for table `georeferencing`
|
301
|
--
|
302
|
|
303
|
/*!40000 ALTER TABLE `georeferencing` DISABLE KEYS */;
|
304
|
/*!40000 ALTER TABLE `georeferencing` ENABLE KEYS */;
|
305
|
|
306
|
--
|
307
|
-- Table structure for table `geovalidatable_place`
|
308
|
--
|
309
|
|
310
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
311
|
/*!40101 SET character_set_client = utf8 */;
|
312
|
CREATE TABLE `geovalidatable_place` (
|
313
|
`id` varbinary(767) NOT NULL,
|
314
|
`parent_geoplace` varbinary(767) NOT NULL,
|
315
|
PRIMARY KEY (`id`),
|
316
|
KEY `fk_geovalidatable_place_geoplace1_idx` (`parent_geoplace`),
|
317
|
CONSTRAINT `fk_nested_geoplace_geoplace1` FOREIGN KEY (`id`) REFERENCES `geoplace` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
|
318
|
CONSTRAINT `fk_geovalidatable_place_geoplace1` FOREIGN KEY (`parent_geoplace`) REFERENCES `geoplace` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
|
319
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='stores only scrubbed geoplaces (GADM places, and distinct point coordinates that GNRS says should be located within them)';
|
320
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
321
|
|
322
|
--
|
323
|
-- Dumping data for table `geovalidatable_place`
|
324
|
--
|
325
|
|
326
|
/*!40000 ALTER TABLE `geovalidatable_place` DISABLE KEYS */;
|
327
|
/*!40000 ALTER TABLE `geovalidatable_place` ENABLE KEYS */;
|
328
|
|
329
|
--
|
330
|
-- Table structure for table `geovalidation`
|
331
|
--
|
332
|
|
333
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
334
|
/*!40101 SET character_set_client = utf8 */;
|
335
|
CREATE TABLE `geovalidation` (
|
336
|
`id` varbinary(767) NOT NULL,
|
337
|
`input_geoplace` varbinary(767) NOT NULL,
|
338
|
`geovalid` tinyint(1) NOT NULL,
|
339
|
`lat_long_domain_valid` tinyint(1) NOT NULL,
|
340
|
`lat_long_in_place_ranks` set('hstore') COLLATE utf8_bin DEFAULT NULL,
|
341
|
`corrected_geoplace` varbinary(767) DEFAULT NULL,
|
342
|
PRIMARY KEY (`id`),
|
343
|
KEY `fk_geovalidation_geoplace1_idx` (`input_geoplace`),
|
344
|
KEY `fk_geovalidation_geoplace2_idx` (`corrected_geoplace`),
|
345
|
CONSTRAINT `fk_geovalidation_geoplace1` FOREIGN KEY (`input_geoplace`) REFERENCES `geovalidatable_place` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
|
346
|
CONSTRAINT `fk_geovalidation_geoplace2` FOREIGN KEY (`corrected_geoplace`) REFERENCES `geovalidatable_place` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
|
347
|
CONSTRAINT `fk_geovalidation_georeferencing1` FOREIGN KEY (`id`) REFERENCES `georeferencing` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
|
348
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='The accuracy of the [[VegCore#Coordinates|Coordinates]], taking into account the [[VegCore#Placename|Placename]]';
|
349
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
350
|
|
351
|
--
|
352
|
-- Dumping data for table `geovalidation`
|
353
|
--
|
354
|
|
355
|
/*!40000 ALTER TABLE `geovalidation` DISABLE KEYS */;
|
356
|
/*!40000 ALTER TABLE `geovalidation` ENABLE KEYS */;
|
357
|
|
358
|
--
|
359
|
-- Table structure for table `individual`
|
360
|
--
|
361
|
|
362
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
363
|
/*!40101 SET character_set_client = utf8 */;
|
364
|
CREATE TABLE `individual` (
|
365
|
`id` varbinary(767) NOT NULL,
|
366
|
`identifying_place` varbinary(767) DEFAULT NULL COMMENT 'subplace within plot. not specified for specimens since their coordinates are usually not precise enough to identify an individual.',
|
367
|
`tag` varbinary(767) DEFAULT NULL,
|
368
|
`tag_history` set('hstore') COLLATE utf8_bin DEFAULT NULL,
|
369
|
PRIMARY KEY (`id`),
|
370
|
KEY `fk_individual_subplace1_idx` (`identifying_place`),
|
371
|
CONSTRAINT `fk_individual_record1` FOREIGN KEY (`id`) REFERENCES `reobservable` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
|
372
|
CONSTRAINT `fk_individual_subplace1` FOREIGN KEY (`identifying_place`) REFERENCES `subplace` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
|
373
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='A distinct biological organism';
|
374
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
375
|
|
376
|
--
|
377
|
-- Dumping data for table `individual`
|
378
|
--
|
379
|
|
380
|
/*!40000 ALTER TABLE `individual` DISABLE KEYS */;
|
381
|
/*!40000 ALTER TABLE `individual` ENABLE KEYS */;
|
382
|
|
383
|
--
|
384
|
-- Table structure for table `individual_count`
|
385
|
--
|
386
|
|
387
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
388
|
/*!40101 SET character_set_client = utf8 */;
|
389
|
CREATE TABLE `individual_count` (
|
390
|
`id` varbinary(767) NOT NULL,
|
391
|
`taxon` varbinary(767) NOT NULL,
|
392
|
`size_class` varbinary(767) DEFAULT NULL,
|
393
|
`aggregating_traits` set('hstore') COLLATE utf8_bin DEFAULT NULL,
|
394
|
`count` int(11) DEFAULT NULL,
|
395
|
PRIMARY KEY (`id`),
|
396
|
KEY `fk_aggregate_observation_taxon_presence1_idx` (`taxon`),
|
397
|
KEY `fk_aggregate_observation_size_class1_idx` (`size_class`),
|
398
|
CONSTRAINT `fk_aggregate_observation_size_class1` FOREIGN KEY (`size_class`) REFERENCES `size_class` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
|
399
|
CONSTRAINT `fk_aggregate_observation_taxon_presence1` FOREIGN KEY (`taxon`) REFERENCES `taxon_presence` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
|
400
|
CONSTRAINT `fk_individual_count_taxon_presence1` FOREIGN KEY (`id`) REFERENCES `taxon_presence` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
|
401
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='= stemCount.VegBank.vegpath.org';
|
402
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
403
|
|
404
|
--
|
405
|
-- Dumping data for table `individual_count`
|
406
|
--
|
407
|
|
408
|
/*!40000 ALTER TABLE `individual_count` DISABLE KEYS */;
|
409
|
/*!40000 ALTER TABLE `individual_count` ENABLE KEYS */;
|
410
|
|
411
|
--
|
412
|
-- Table structure for table `individual_observation`
|
413
|
--
|
414
|
|
415
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
416
|
/*!40101 SET character_set_client = utf8 */;
|
417
|
CREATE TABLE `individual_observation` (
|
418
|
`id` varbinary(767) NOT NULL,
|
419
|
`place_observed_at` varbinary(767) DEFAULT NULL,
|
420
|
`individual` varbinary(767) DEFAULT NULL COMMENT 'optional because an individual_observation cannot have an associated individual unless the individual is traceable to a specific plant',
|
421
|
`code` varbinary(767) DEFAULT NULL,
|
422
|
`traits` set('hstore') COLLATE utf8_bin DEFAULT NULL,
|
423
|
PRIMARY KEY (`id`),
|
424
|
KEY `fk_individual_observation_individual1_idx` (`individual`),
|
425
|
KEY `fk_individual_observation_place1_idx` (`place_observed_at`),
|
426
|
CONSTRAINT `fk_individual_observation_individual1` FOREIGN KEY (`individual`) REFERENCES `individual` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
|
427
|
CONSTRAINT `fk_individual_observation_place1` FOREIGN KEY (`place_observed_at`) REFERENCES `place` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
|
428
|
CONSTRAINT `fk_individual_observation_taxon_occurrence1` FOREIGN KEY (`id`) REFERENCES `taxon_observation` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
|
429
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='An observation of an [[VegCore#Individual|Individual]]';
|
430
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
431
|
|
432
|
--
|
433
|
-- Dumping data for table `individual_observation`
|
434
|
--
|
435
|
|
436
|
/*!40000 ALTER TABLE `individual_observation` DISABLE KEYS */;
|
437
|
/*!40000 ALTER TABLE `individual_observation` ENABLE KEYS */;
|
438
|
|
439
|
--
|
440
|
-- Table structure for table `layer`
|
441
|
--
|
442
|
|
443
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
444
|
/*!40101 SET character_set_client = utf8 */;
|
445
|
CREATE TABLE `layer` (
|
446
|
`id` varbinary(767) NOT NULL,
|
447
|
`name` varbinary(767) NOT NULL,
|
448
|
`height_min_m` varbinary(767) DEFAULT NULL,
|
449
|
`height_max_m` varbinary(767) DEFAULT NULL,
|
450
|
`info` set('hstore') COLLATE utf8_bin DEFAULT NULL,
|
451
|
PRIMARY KEY (`id`),
|
452
|
CONSTRAINT `fk_layer_stratum1` FOREIGN KEY (`id`) REFERENCES `stratum` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
|
453
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='= stratumType.VegBank.vegpath.org';
|
454
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
455
|
|
456
|
--
|
457
|
-- Dumping data for table `layer`
|
458
|
--
|
459
|
|
460
|
/*!40000 ALTER TABLE `layer` DISABLE KEYS */;
|
461
|
/*!40000 ALTER TABLE `layer` ENABLE KEYS */;
|
462
|
|
463
|
--
|
464
|
-- Table structure for table `method`
|
465
|
--
|
466
|
|
467
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
468
|
/*!40101 SET character_set_client = utf8 */;
|
469
|
CREATE TABLE `method` (
|
470
|
`id` varbinary(767) NOT NULL,
|
471
|
`parent` varbinary(767) DEFAULT NULL,
|
472
|
`info` set('hstore') COLLATE utf8_bin DEFAULT NULL,
|
473
|
PRIMARY KEY (`id`),
|
474
|
KEY `fk_method_method1_idx` (`parent`),
|
475
|
CONSTRAINT `fk_method_method1` FOREIGN KEY (`parent`) REFERENCES `method` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
|
476
|
CONSTRAINT `fk_method_record1` FOREIGN KEY (`id`) REFERENCES `traceable` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
|
477
|
) 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)';
|
478
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
479
|
|
480
|
--
|
481
|
-- Dumping data for table `method`
|
482
|
--
|
483
|
|
484
|
/*!40000 ALTER TABLE `method` DISABLE KEYS */;
|
485
|
/*!40000 ALTER TABLE `method` ENABLE KEYS */;
|
486
|
|
487
|
--
|
488
|
-- Table structure for table `organization`
|
489
|
--
|
490
|
|
491
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
492
|
/*!40101 SET character_set_client = utf8 */;
|
493
|
CREATE TABLE `organization` (
|
494
|
`id` varbinary(767) NOT NULL,
|
495
|
`info` set('hstore') COLLATE utf8_bin DEFAULT NULL,
|
496
|
PRIMARY KEY (`id`),
|
497
|
CONSTRAINT `fk_organization_party1` FOREIGN KEY (`id`) REFERENCES `party` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
|
498
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
|
499
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
500
|
|
501
|
--
|
502
|
-- Dumping data for table `organization`
|
503
|
--
|
504
|
|
505
|
/*!40000 ALTER TABLE `organization` DISABLE KEYS */;
|
506
|
/*!40000 ALTER TABLE `organization` ENABLE KEYS */;
|
507
|
|
508
|
--
|
509
|
-- Table structure for table `party`
|
510
|
--
|
511
|
|
512
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
513
|
/*!40101 SET character_set_client = utf8 */;
|
514
|
CREATE TABLE `party` (
|
515
|
`id` varbinary(767) NOT NULL,
|
516
|
`name` varbinary(767) NOT NULL,
|
517
|
`organization` varbinary(767) DEFAULT NULL,
|
518
|
`info` set('hstore') COLLATE utf8_bin DEFAULT NULL,
|
519
|
PRIMARY KEY (`id`),
|
520
|
KEY `fk_party_organization1_idx` (`organization`),
|
521
|
KEY `party_unique` (`organization`,`name`),
|
522
|
CONSTRAINT `fk_collection_source10` FOREIGN KEY (`id`) REFERENCES `traceable` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
|
523
|
CONSTRAINT `fk_party_organization1` FOREIGN KEY (`organization`) REFERENCES `organization` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
|
524
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
|
525
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
526
|
|
527
|
--
|
528
|
-- Dumping data for table `party`
|
529
|
--
|
530
|
|
531
|
/*!40000 ALTER TABLE `party` DISABLE KEYS */;
|
532
|
/*!40000 ALTER TABLE `party` ENABLE KEYS */;
|
533
|
|
534
|
--
|
535
|
-- Table structure for table `party_list`
|
536
|
--
|
537
|
|
538
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
539
|
/*!40101 SET character_set_client = utf8 */;
|
540
|
CREATE TABLE `party_list` (
|
541
|
`id` varbinary(767) NOT NULL,
|
542
|
`count` int(11) NOT NULL,
|
543
|
PRIMARY KEY (`id`),
|
544
|
CONSTRAINT `fk_collection_source100` FOREIGN KEY (`id`) REFERENCES `traceable` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
|
545
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
|
546
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
547
|
|
548
|
--
|
549
|
-- Dumping data for table `party_list`
|
550
|
--
|
551
|
|
552
|
/*!40000 ALTER TABLE `party_list` DISABLE KEYS */;
|
553
|
/*!40000 ALTER TABLE `party_list` ENABLE KEYS */;
|
554
|
|
555
|
--
|
556
|
-- Table structure for table `party_list_entry`
|
557
|
--
|
558
|
|
559
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
560
|
/*!40101 SET character_set_client = utf8 */;
|
561
|
CREATE TABLE `party_list_entry` (
|
562
|
`id` varbinary(767) NOT NULL,
|
563
|
`list` varbinary(767) NOT NULL,
|
564
|
`party` varbinary(767) NOT NULL,
|
565
|
`role` varbinary(767) DEFAULT NULL,
|
566
|
`sort_order` int(11) DEFAULT NULL,
|
567
|
PRIMARY KEY (`id`),
|
568
|
KEY `fk_party_list_has_party_party1_idx` (`party`),
|
569
|
KEY `fk_party_list_entry_party_list1_idx` (`list`),
|
570
|
CONSTRAINT `fk_party_list_has_party_party1` FOREIGN KEY (`party`) REFERENCES `party` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
|
571
|
CONSTRAINT `fk_party_list_entry_party_list1` FOREIGN KEY (`list`) REFERENCES `party_list` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
|
572
|
CONSTRAINT `fk_party_list_entry_record1` FOREIGN KEY (`id`) REFERENCES `traceable` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
|
573
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
|
574
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
575
|
|
576
|
--
|
577
|
-- Dumping data for table `party_list_entry`
|
578
|
--
|
579
|
|
580
|
/*!40000 ALTER TABLE `party_list_entry` DISABLE KEYS */;
|
581
|
/*!40000 ALTER TABLE `party_list_entry` ENABLE KEYS */;
|
582
|
|
583
|
--
|
584
|
-- Table structure for table `place`
|
585
|
--
|
586
|
|
587
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
588
|
/*!40101 SET character_set_client = utf8 */;
|
589
|
CREATE TABLE `place` (
|
590
|
`id` varbinary(767) NOT NULL,
|
591
|
`parent` varbinary(767) DEFAULT NULL,
|
592
|
`rank` varbinary(767) DEFAULT NULL,
|
593
|
`name` varbinary(767) DEFAULT NULL,
|
594
|
`geopath` varbinary(767) DEFAULT NULL,
|
595
|
`locality` varbinary(767) DEFAULT NULL,
|
596
|
`verbatim` set('hstore') COLLATE utf8_bin DEFAULT NULL COMMENT 'for verbatim coordinates, etc.',
|
597
|
PRIMARY KEY (`id`),
|
598
|
KEY `fk_place1_idx` (`parent`),
|
599
|
KEY `fk_place_geopath1_idx` (`geopath`),
|
600
|
CONSTRAINT `fk_place1` FOREIGN KEY (`parent`) REFERENCES `place` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
|
601
|
CONSTRAINT `fk_place_geopath1` FOREIGN KEY (`geopath`) REFERENCES `geopath` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
|
602
|
CONSTRAINT `fk_place_record1` FOREIGN KEY (`id`) REFERENCES `traceable` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
|
603
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='"A spatial region" ("DwC":http://rs.tdwg.org/dwc/terms/#dcterms:Location) or point';
|
604
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
605
|
|
606
|
--
|
607
|
-- Dumping data for table `place`
|
608
|
--
|
609
|
|
610
|
/*!40000 ALTER TABLE `place` DISABLE KEYS */;
|
611
|
/*!40000 ALTER TABLE `place` ENABLE KEYS */;
|
612
|
|
613
|
--
|
614
|
-- Table structure for table `place_observation`
|
615
|
--
|
616
|
|
617
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
618
|
/*!40101 SET character_set_client = utf8 */;
|
619
|
CREATE TABLE `place_observation` (
|
620
|
`id` varbinary(767) NOT NULL,
|
621
|
`place` varbinary(767) NOT NULL,
|
622
|
`elevation_m` double DEFAULT NULL,
|
623
|
`slope_incline_deg` double DEFAULT NULL,
|
624
|
`slope_direction_deg_N` double DEFAULT NULL,
|
625
|
`geological_context` varbinary(767) DEFAULT NULL,
|
626
|
`community` varbinary(767) DEFAULT NULL,
|
627
|
`observations` set('hstore') COLLATE utf8_bin DEFAULT NULL,
|
628
|
PRIMARY KEY (`id`),
|
629
|
KEY `fk_place_observation_place1_idx` (`place`),
|
630
|
KEY `fk_place_observation_geological_context1_idx` (`geological_context`),
|
631
|
KEY `fk_place_observation_community1_idx` (`community`),
|
632
|
CONSTRAINT `fk_place_observation_place1` FOREIGN KEY (`place`) REFERENCES `place` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
|
633
|
CONSTRAINT `fk_place_observation_geological_context1` FOREIGN KEY (`geological_context`) REFERENCES `geological_context` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
|
634
|
CONSTRAINT `fk_place_observation_community1` FOREIGN KEY (`community`) REFERENCES `community` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
|
635
|
CONSTRAINT `fk_place_observation_event1` FOREIGN KEY (`id`) REFERENCES `event` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
|
636
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='A sampling of a [[VegCore#Location|Location]]';
|
637
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
638
|
|
639
|
--
|
640
|
-- Dumping data for table `place_observation`
|
641
|
--
|
642
|
|
643
|
/*!40000 ALTER TABLE `place_observation` DISABLE KEYS */;
|
644
|
/*!40000 ALTER TABLE `place_observation` ENABLE KEYS */;
|
645
|
|
646
|
--
|
647
|
-- Table structure for table `plot`
|
648
|
--
|
649
|
|
650
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
651
|
/*!40101 SET character_set_client = utf8 */;
|
652
|
CREATE TABLE `plot` (
|
653
|
`id` varbinary(767) NOT NULL,
|
654
|
`name` varbinary(767) DEFAULT NULL,
|
655
|
`area_m2` double DEFAULT NULL,
|
656
|
`shape` varbinary(767) DEFAULT NULL,
|
657
|
`length_m` varbinary(767) DEFAULT NULL,
|
658
|
`width_m` varbinary(767) DEFAULT NULL,
|
659
|
`azimuth_deg_N` varbinary(767) DEFAULT NULL,
|
660
|
`boundary_WKT` varbinary(767) DEFAULT NULL,
|
661
|
`dimensions` set('hstore') COLLATE utf8_bin DEFAULT NULL,
|
662
|
PRIMARY KEY (`id`),
|
663
|
CONSTRAINT `fk_subplot_place1` FOREIGN KEY (`id`) REFERENCES `place` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
|
664
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
|
665
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
666
|
|
667
|
--
|
668
|
-- Dumping data for table `plot`
|
669
|
--
|
670
|
|
671
|
/*!40000 ALTER TABLE `plot` DISABLE KEYS */;
|
672
|
/*!40000 ALTER TABLE `plot` ENABLE KEYS */;
|
673
|
|
674
|
--
|
675
|
-- Table structure for table `project`
|
676
|
--
|
677
|
|
678
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
679
|
/*!40101 SET character_set_client = utf8 */;
|
680
|
CREATE TABLE `project` (
|
681
|
`id` varbinary(767) NOT NULL,
|
682
|
`name` varbinary(767) NOT NULL,
|
683
|
`info` set('hstore') COLLATE utf8_bin DEFAULT NULL,
|
684
|
PRIMARY KEY (`id`),
|
685
|
CONSTRAINT `fk_project_event1` FOREIGN KEY (`id`) REFERENCES `event` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
|
686
|
) 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)';
|
687
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
688
|
|
689
|
--
|
690
|
-- Dumping data for table `project`
|
691
|
--
|
692
|
|
693
|
/*!40000 ALTER TABLE `project` DISABLE KEYS */;
|
694
|
/*!40000 ALTER TABLE `project` ENABLE KEYS */;
|
695
|
|
696
|
--
|
697
|
-- Table structure for table `record`
|
698
|
--
|
699
|
|
700
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
701
|
/*!40101 SET character_set_client = utf8 */;
|
702
|
CREATE TABLE `record` (
|
703
|
`id` varbinary(767) NOT NULL,
|
704
|
`dataset` varbinary(767) NOT NULL,
|
705
|
`dataset_record_id` varbinary(767) NOT NULL,
|
706
|
PRIMARY KEY (`id`),
|
707
|
UNIQUE KEY `record_unique` (`dataset`,`dataset_record_id`),
|
708
|
KEY `fk_record_source1_idx` (`dataset`),
|
709
|
CONSTRAINT `fk_record_source10` FOREIGN KEY (`dataset`) REFERENCES `dataset` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
|
710
|
CONSTRAINT `fk_record_source2` FOREIGN KEY (`id`) REFERENCES `source` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
|
711
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='the record in the *source* data';
|
712
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
713
|
|
714
|
--
|
715
|
-- Dumping data for table `record`
|
716
|
--
|
717
|
|
718
|
/*!40000 ALTER TABLE `record` DISABLE KEYS */;
|
719
|
/*!40000 ALTER TABLE `record` ENABLE KEYS */;
|
720
|
|
721
|
--
|
722
|
-- Table structure for table `referenced_class`
|
723
|
--
|
724
|
|
725
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
726
|
/*!40101 SET character_set_client = utf8 */;
|
727
|
CREATE TABLE `referenced_class` (
|
728
|
`id` varbinary(767) NOT NULL,
|
729
|
PRIMARY KEY (`id`),
|
730
|
CONSTRAINT `fk_example_record10` FOREIGN KEY (`id`) REFERENCES `traceable` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
|
731
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
|
732
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
733
|
|
734
|
--
|
735
|
-- Dumping data for table `referenced_class`
|
736
|
--
|
737
|
|
738
|
/*!40000 ALTER TABLE `referenced_class` DISABLE KEYS */;
|
739
|
/*!40000 ALTER TABLE `referenced_class` ENABLE KEYS */;
|
740
|
|
741
|
--
|
742
|
-- Table structure for table `reobservable`
|
743
|
--
|
744
|
|
745
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
746
|
/*!40101 SET character_set_client = utf8 */;
|
747
|
CREATE TABLE `reobservable` (
|
748
|
`id` varbinary(767) NOT NULL,
|
749
|
`orig_observation` varbinary(767) DEFAULT NULL,
|
750
|
PRIMARY KEY (`id`),
|
751
|
KEY `fk_reobservable_taxon_determination1_idx` (`orig_observation`),
|
752
|
CONSTRAINT `fk_reobservable_taxon_determination1` FOREIGN KEY (`orig_observation`) REFERENCES `taxon_observation` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
|
753
|
CONSTRAINT `fk_reobservable_taxon_occurrence1` FOREIGN KEY (`id`) REFERENCES `taxon_occurrence` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
|
754
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Any entity on which [[VegCore#TaxonDetermination|TaxonDetermination]]s can be made';
|
755
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
756
|
|
757
|
--
|
758
|
-- Dumping data for table `reobservable`
|
759
|
--
|
760
|
|
761
|
/*!40000 ALTER TABLE `reobservable` DISABLE KEYS */;
|
762
|
/*!40000 ALTER TABLE `reobservable` ENABLE KEYS */;
|
763
|
|
764
|
--
|
765
|
-- Table structure for table `reobservable_presence`
|
766
|
--
|
767
|
|
768
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
769
|
/*!40101 SET character_set_client = utf8 */;
|
770
|
CREATE TABLE `reobservable_presence` (
|
771
|
`id` varbinary(767) NOT NULL,
|
772
|
`voucher` varbinary(767) NOT NULL,
|
773
|
PRIMARY KEY (`id`),
|
774
|
KEY `fk_reobservable_presence_reobservable2_idx` (`voucher`),
|
775
|
CONSTRAINT `fk_reobservable_presence_taxon_presence1` FOREIGN KEY (`id`) REFERENCES `taxon_presence` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
|
776
|
CONSTRAINT `fk_reobservable_presence_reobservable1` FOREIGN KEY (`id`) REFERENCES `reobservable` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
|
777
|
CONSTRAINT `fk_reobservable_presence_reobservable2` FOREIGN KEY (`voucher`) REFERENCES `reobservable` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
|
778
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
|
779
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
780
|
|
781
|
--
|
782
|
-- Dumping data for table `reobservable_presence`
|
783
|
--
|
784
|
|
785
|
/*!40000 ALTER TABLE `reobservable_presence` DISABLE KEYS */;
|
786
|
/*!40000 ALTER TABLE `reobservable_presence` ENABLE KEYS */;
|
787
|
|
788
|
--
|
789
|
-- Table structure for table `size_class`
|
790
|
--
|
791
|
|
792
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
793
|
/*!40101 SET character_set_client = utf8 */;
|
794
|
CREATE TABLE `size_class` (
|
795
|
`id` varbinary(767) NOT NULL,
|
796
|
`diameter_min_m` double NOT NULL,
|
797
|
`diameter_max_m` double NOT NULL,
|
798
|
`info` set('hstore') COLLATE utf8_bin DEFAULT NULL,
|
799
|
PRIMARY KEY (`id`),
|
800
|
CONSTRAINT `fk_layer_stratum10` FOREIGN KEY (`id`) REFERENCES `stratum` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
|
801
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
|
802
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
803
|
|
804
|
--
|
805
|
-- Dumping data for table `size_class`
|
806
|
--
|
807
|
|
808
|
/*!40000 ALTER TABLE `size_class` DISABLE KEYS */;
|
809
|
/*!40000 ALTER TABLE `size_class` ENABLE KEYS */;
|
810
|
|
811
|
--
|
812
|
-- Table structure for table `soil_observation`
|
813
|
--
|
814
|
|
815
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
816
|
/*!40101 SET character_set_client = utf8 */;
|
817
|
CREATE TABLE `soil_observation` (
|
818
|
`id` varbinary(767) NOT NULL,
|
819
|
`place_observation` varbinary(767) NOT NULL,
|
820
|
`measurement_spot` varbinary(767) DEFAULT NULL,
|
821
|
`observations` set('hstore') COLLATE utf8_bin DEFAULT NULL,
|
822
|
PRIMARY KEY (`id`),
|
823
|
KEY `fk_soil_observation_place_observation1_idx` (`place_observation`),
|
824
|
KEY `fk_soil_observation_subplace1_idx` (`measurement_spot`),
|
825
|
CONSTRAINT `fk_soil_observation_subplace1` FOREIGN KEY (`measurement_spot`) REFERENCES `subplace` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
|
826
|
CONSTRAINT `fk_soil_observation_place_observation1` FOREIGN KEY (`place_observation`) REFERENCES `place_observation` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
|
827
|
CONSTRAINT `fk_soil_observation_record1` FOREIGN KEY (`id`) REFERENCES `traceable` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
|
828
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='A sampling of a [[VegCore#Location|Location]]''s soil';
|
829
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
830
|
|
831
|
--
|
832
|
-- Dumping data for table `soil_observation`
|
833
|
--
|
834
|
|
835
|
/*!40000 ALTER TABLE `soil_observation` DISABLE KEYS */;
|
836
|
/*!40000 ALTER TABLE `soil_observation` ENABLE KEYS */;
|
837
|
|
838
|
--
|
839
|
-- Table structure for table `source`
|
840
|
--
|
841
|
|
842
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
843
|
/*!40101 SET character_set_client = utf8 */;
|
844
|
CREATE TABLE `source` (
|
845
|
`id` varbinary(767) NOT NULL,
|
846
|
`parent` varbinary(767) DEFAULT NULL,
|
847
|
`name` varbinary(767) DEFAULT NULL,
|
848
|
`info` set('hstore') COLLATE utf8_bin DEFAULT NULL,
|
849
|
PRIMARY KEY (`id`),
|
850
|
UNIQUE KEY `source_unique` (`parent`,`name`),
|
851
|
KEY `fk_source1_idx` (`parent`),
|
852
|
CONSTRAINT `fk_source10` FOREIGN KEY (`parent`) REFERENCES `source` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
|
853
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='where something came from; a "reference [...] cited within the database" ("VegBank":http://reference.VegBank.vegpath.org); = reference.VegBank.vegpath.org';
|
854
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
855
|
|
856
|
--
|
857
|
-- Dumping data for table `source`
|
858
|
--
|
859
|
|
860
|
/*!40000 ALTER TABLE `source` DISABLE KEYS */;
|
861
|
/*!40000 ALTER TABLE `source` ENABLE KEYS */;
|
862
|
|
863
|
--
|
864
|
-- Table structure for table `specimen`
|
865
|
--
|
866
|
|
867
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
868
|
/*!40101 SET character_set_client = utf8 */;
|
869
|
CREATE TABLE `specimen` (
|
870
|
`id` varbinary(767) NOT NULL,
|
871
|
`individual` varbinary(767) DEFAULT NULL,
|
872
|
`individual_observation` varbinary(767) DEFAULT NULL COMMENT 'stores observations about the plant the specimen was collected from. some specimens may not be traceable to a reobservable individual, but will still have these plant observations. the collection_event should be set to this field when provided.',
|
873
|
`code_in_individual` varbinary(767) DEFAULT NULL COMMENT 'can also be within the individual_observation if no reobservable individual is available',
|
874
|
`collection_event` varbinary(767) DEFAULT NULL,
|
875
|
`orig_collection` varbinary(767) DEFAULT NULL,
|
876
|
`barcode` varbinary(767) DEFAULT NULL,
|
877
|
`accession_number` varbinary(767) DEFAULT NULL,
|
878
|
`defining_data` set('hstore') COLLATE utf8_bin DEFAULT NULL COMMENT 'of the observations made about the specimen in individual_observation.traits, this stores the subset that can be used to make a taxonomic redetermination. for a digital-only specimen, this would be the information that comprises the specimen (e.g. a photo, a sketch, or a description that is detailed enough to be able to make a redetermination). note that a taxon_presence without a physical voucher can still qualify as reobservable if a detailed description of it is provided here.',
|
879
|
`specimenholder_institutions` varbinary(767) DEFAULT NULL,
|
880
|
`current_collection` varbinary(767) DEFAULT NULL,
|
881
|
`owner_collection` varbinary(767) DEFAULT NULL,
|
882
|
PRIMARY KEY (`id`),
|
883
|
UNIQUE KEY `specimen_unique_in_individual` (`individual`,`code_in_individual`),
|
884
|
UNIQUE KEY `specimen_unique_by_collection_event` (`collection_event`),
|
885
|
UNIQUE KEY `specimen_unique_in_collection_by_barcode` (`orig_collection`,`barcode`),
|
886
|
UNIQUE KEY `specimen_unique_in_collection_by_accession_number` (`orig_collection`,`accession_number`),
|
887
|
UNIQUE KEY `specimen_unique_in_individual_observation` (`individual_observation`,`code_in_individual`),
|
888
|
KEY `fk_specimen_collection1_idx` (`orig_collection`),
|
889
|
KEY `fk_specimen_taxon_observation1_idx` (`collection_event`),
|
890
|
KEY `fk_specimen_individual1_idx` (`individual`),
|
891
|
KEY `fk_specimen_collection2_idx` (`current_collection`),
|
892
|
KEY `fk_specimen_organization3_idx` (`owner_collection`),
|
893
|
KEY `fk_specimen_party_list1_idx` (`specimenholder_institutions`),
|
894
|
KEY `fk_specimen_individual_observation1_idx` (`individual_observation`),
|
895
|
CONSTRAINT `fk_specimen_collection1` FOREIGN KEY (`orig_collection`) REFERENCES `collection` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
|
896
|
CONSTRAINT `fk_specimen_individual_observation1` FOREIGN KEY (`individual_observation`) REFERENCES `individual_observation` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
|
897
|
CONSTRAINT `fk_specimen_collection2` FOREIGN KEY (`current_collection`) REFERENCES `collection` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
|
898
|
CONSTRAINT `fk_specimen_party_list1` FOREIGN KEY (`specimenholder_institutions`) REFERENCES `party_list` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
|
899
|
CONSTRAINT `fk_specimen_organization3` FOREIGN KEY (`owner_collection`) REFERENCES `collection` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
|
900
|
CONSTRAINT `fk_specimen_individual1` FOREIGN KEY (`individual`) REFERENCES `individual` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
|
901
|
CONSTRAINT `fk_specimen_taxon_occurrence1` FOREIGN KEY (`id`) REFERENCES `reobservable` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
|
902
|
CONSTRAINT `fk_specimen_taxon_observation1` FOREIGN KEY (`collection_event`) REFERENCES `taxon_observation` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
|
903
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='something collected from a plant. this can be a physical "part of a plant" ("Wikipedia":http://en.wikipedia.org/wiki/Specimen), or a picture or description of the plant. when there are multiple specimen replicates (copies) of a specimen, each gets its own specimen_observation pointing to the same specimen.';
|
904
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
905
|
|
906
|
--
|
907
|
-- Dumping data for table `specimen`
|
908
|
--
|
909
|
|
910
|
/*!40000 ALTER TABLE `specimen` DISABLE KEYS */;
|
911
|
/*!40000 ALTER TABLE `specimen` ENABLE KEYS */;
|
912
|
|
913
|
--
|
914
|
-- Table structure for table `specimen_observation`
|
915
|
--
|
916
|
|
917
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
918
|
/*!40101 SET character_set_client = utf8 */;
|
919
|
CREATE TABLE `specimen_observation` (
|
920
|
`id` varbinary(767) NOT NULL,
|
921
|
`specimen` varbinary(767) NOT NULL,
|
922
|
`description` varbinary(767) DEFAULT NULL,
|
923
|
`traits` set('hstore') COLLATE utf8_bin DEFAULT NULL,
|
924
|
PRIMARY KEY (`id`),
|
925
|
KEY `fk_specimen_observation_specimen1_idx` (`specimen`),
|
926
|
CONSTRAINT `fk_specimen_taxon_occurrence10` FOREIGN KEY (`id`) REFERENCES `taxon_observation` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
|
927
|
CONSTRAINT `fk_specimen_observation_specimen1` FOREIGN KEY (`specimen`) REFERENCES `specimen` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
|
928
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
|
929
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
930
|
|
931
|
--
|
932
|
-- Dumping data for table `specimen_observation`
|
933
|
--
|
934
|
|
935
|
/*!40000 ALTER TABLE `specimen_observation` DISABLE KEYS */;
|
936
|
/*!40000 ALTER TABLE `specimen_observation` ENABLE KEYS */;
|
937
|
|
938
|
--
|
939
|
-- Table structure for table `stem`
|
940
|
--
|
941
|
|
942
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
943
|
/*!40101 SET character_set_client = utf8 */;
|
944
|
CREATE TABLE `stem` (
|
945
|
`id` varbinary(767) NOT NULL,
|
946
|
`individual` varbinary(767) DEFAULT NULL,
|
947
|
PRIMARY KEY (`id`),
|
948
|
KEY `fk_stem_individual1_idx` (`individual`),
|
949
|
CONSTRAINT `fk_stem_individual1` FOREIGN KEY (`individual`) REFERENCES `individual` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
|
950
|
CONSTRAINT `fk_stem_individual2` FOREIGN KEY (`id`) REFERENCES `individual` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
|
951
|
) 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)';
|
952
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
953
|
|
954
|
--
|
955
|
-- Dumping data for table `stem`
|
956
|
--
|
957
|
|
958
|
/*!40000 ALTER TABLE `stem` DISABLE KEYS */;
|
959
|
/*!40000 ALTER TABLE `stem` ENABLE KEYS */;
|
960
|
|
961
|
--
|
962
|
-- Table structure for table `stem_observation`
|
963
|
--
|
964
|
|
965
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
966
|
/*!40101 SET character_set_client = utf8 */;
|
967
|
CREATE TABLE `stem_observation` (
|
968
|
`id` varbinary(767) NOT NULL,
|
969
|
`individual_observation` varbinary(767) DEFAULT NULL,
|
970
|
`stem` varbinary(767) DEFAULT NULL,
|
971
|
`traits` set('hstore') COLLATE utf8_bin DEFAULT NULL,
|
972
|
PRIMARY KEY (`id`),
|
973
|
UNIQUE KEY `stem_observation_unique` (`individual_observation`,`stem`),
|
974
|
KEY `fk_stem_observation_individual_observation1_idx` (`individual_observation`),
|
975
|
KEY `fk_stem_observation_stem1_idx` (`stem`),
|
976
|
CONSTRAINT `fk_stem_observation_stem1` FOREIGN KEY (`stem`) REFERENCES `stem` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
|
977
|
CONSTRAINT `fk_stem_observation_individual_observation1` FOREIGN KEY (`individual_observation`) REFERENCES `individual_observation` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
|
978
|
CONSTRAINT `fk_stem_observation_individual_observation2` FOREIGN KEY (`id`) REFERENCES `individual_observation` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
|
979
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='An observation of a [[VegCore#Stem|Stem]]';
|
980
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
981
|
|
982
|
--
|
983
|
-- Dumping data for table `stem_observation`
|
984
|
--
|
985
|
|
986
|
/*!40000 ALTER TABLE `stem_observation` DISABLE KEYS */;
|
987
|
/*!40000 ALTER TABLE `stem_observation` ENABLE KEYS */;
|
988
|
|
989
|
--
|
990
|
-- Table structure for table `stratum`
|
991
|
--
|
992
|
|
993
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
994
|
/*!40101 SET character_set_client = utf8 */;
|
995
|
CREATE TABLE `stratum` (
|
996
|
`id` varbinary(767) NOT NULL,
|
997
|
`info` set('hstore') COLLATE utf8_bin DEFAULT NULL,
|
998
|
PRIMARY KEY (`id`),
|
999
|
CONSTRAINT `fk_place_path_record10` FOREIGN KEY (`id`) REFERENCES `method` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
|
1000
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='= stratumType.VegBank.vegpath.org';
|
1001
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
1002
|
|
1003
|
--
|
1004
|
-- Dumping data for table `stratum`
|
1005
|
--
|
1006
|
|
1007
|
/*!40000 ALTER TABLE `stratum` DISABLE KEYS */;
|
1008
|
/*!40000 ALTER TABLE `stratum` ENABLE KEYS */;
|
1009
|
|
1010
|
--
|
1011
|
-- Table structure for table `stratum_event`
|
1012
|
--
|
1013
|
|
1014
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
1015
|
/*!40101 SET character_set_client = utf8 */;
|
1016
|
CREATE TABLE `stratum_event` (
|
1017
|
`id` varbinary(767) NOT NULL,
|
1018
|
`parent_event` varbinary(767) NOT NULL,
|
1019
|
`stratum` varbinary(767) NOT NULL,
|
1020
|
PRIMARY KEY (`id`),
|
1021
|
KEY `fk_stratum_event_stratum1_idx` (`stratum`),
|
1022
|
KEY `fk_stratum_event_sampling_event2_idx` (`parent_event`),
|
1023
|
CONSTRAINT `fk_stratum_event_stratum1` FOREIGN KEY (`stratum`) REFERENCES `stratum` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
|
1024
|
CONSTRAINT `fk_stratum_event_sampling_event1` FOREIGN KEY (`id`) REFERENCES `taxa_sampling_event` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
|
1025
|
CONSTRAINT `fk_stratum_event_sampling_event2` FOREIGN KEY (`parent_event`) REFERENCES `taxa_sampling_event` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
|
1026
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='= stratum.VegBank.vegpath.org (which was confusingly named)';
|
1027
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
1028
|
|
1029
|
--
|
1030
|
-- Dumping data for table `stratum_event`
|
1031
|
--
|
1032
|
|
1033
|
/*!40000 ALTER TABLE `stratum_event` DISABLE KEYS */;
|
1034
|
/*!40000 ALTER TABLE `stratum_event` ENABLE KEYS */;
|
1035
|
|
1036
|
--
|
1037
|
-- Table structure for table `subplace`
|
1038
|
--
|
1039
|
|
1040
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
1041
|
/*!40101 SET character_set_client = utf8 */;
|
1042
|
CREATE TABLE `subplace` (
|
1043
|
`id` varbinary(767) NOT NULL,
|
1044
|
`parent` varbinary(767) NOT NULL,
|
1045
|
`x_m` double DEFAULT NULL,
|
1046
|
`y_m` double DEFAULT NULL,
|
1047
|
`coords` set('hstore') COLLATE utf8_bin DEFAULT NULL,
|
1048
|
PRIMARY KEY (`id`),
|
1049
|
KEY `fk_rel_place_place1_idx` (`parent`),
|
1050
|
CONSTRAINT `fk_subplot_place2` FOREIGN KEY (`id`) REFERENCES `place` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
|
1051
|
CONSTRAINT `fk_rel_place_place1` FOREIGN KEY (`parent`) REFERENCES `place` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
|
1052
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='stores plot elements such as subplots ("subplot, line, or any other subsample or subdivision of plot" ("SALVIAS":http://salvias.net/Documents/salvias_data_dictionary.html#Plot_data/subplot))';
|
1053
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
1054
|
|
1055
|
--
|
1056
|
-- Dumping data for table `subplace`
|
1057
|
--
|
1058
|
|
1059
|
/*!40000 ALTER TABLE `subplace` DISABLE KEYS */;
|
1060
|
/*!40000 ALTER TABLE `subplace` ENABLE KEYS */;
|
1061
|
|
1062
|
--
|
1063
|
-- Table structure for table `subplot`
|
1064
|
--
|
1065
|
|
1066
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
1067
|
/*!40101 SET character_set_client = utf8 */;
|
1068
|
CREATE TABLE `subplot` (
|
1069
|
`id` varbinary(767) NOT NULL,
|
1070
|
`parent_plot` varbinary(767) NOT NULL,
|
1071
|
PRIMARY KEY (`id`),
|
1072
|
KEY `fk_subplot_plot2_idx` (`parent_plot`),
|
1073
|
CONSTRAINT `fk_subplot_plot1` FOREIGN KEY (`id`) REFERENCES `plot` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
|
1074
|
CONSTRAINT `fk_subplot_plot2` FOREIGN KEY (`parent_plot`) REFERENCES `plot` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
|
1075
|
CONSTRAINT `fk_subplot_rel_place1` FOREIGN KEY (`id`) REFERENCES `subplace` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
|
1076
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
|
1077
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
1078
|
|
1079
|
--
|
1080
|
-- Dumping data for table `subplot`
|
1081
|
--
|
1082
|
|
1083
|
/*!40000 ALTER TABLE `subplot` DISABLE KEYS */;
|
1084
|
/*!40000 ALTER TABLE `subplot` ENABLE KEYS */;
|
1085
|
|
1086
|
--
|
1087
|
-- Table structure for table `taxa_sampling_event`
|
1088
|
--
|
1089
|
|
1090
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
1091
|
/*!40101 SET character_set_client = utf8 */;
|
1092
|
CREATE TABLE `taxa_sampling_event` (
|
1093
|
`id` varbinary(767) NOT NULL,
|
1094
|
`within_place` varbinary(767) NOT NULL,
|
1095
|
`project` varbinary(767) DEFAULT NULL,
|
1096
|
`method` varbinary(767) DEFAULT NULL,
|
1097
|
PRIMARY KEY (`id`),
|
1098
|
KEY `fk_sampling_event_method1_idx` (`method`),
|
1099
|
KEY `fk_taxa_sampling_event_place1_idx` (`within_place`),
|
1100
|
KEY `fk_taxa_sampling_event_project1_idx` (`project`),
|
1101
|
CONSTRAINT `fk_taxa_sampling_event_project1` FOREIGN KEY (`project`) REFERENCES `project` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
|
1102
|
CONSTRAINT `fk_project_event10` FOREIGN KEY (`id`) REFERENCES `event` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
|
1103
|
CONSTRAINT `fk_taxa_sampling_event_place1` FOREIGN KEY (`within_place`) REFERENCES `place` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
|
1104
|
CONSTRAINT `fk_sampling_event_method1` FOREIGN KEY (`method`) REFERENCES `method` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
|
1105
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='for plots and aggregate_observations within them';
|
1106
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
1107
|
|
1108
|
--
|
1109
|
-- Dumping data for table `taxa_sampling_event`
|
1110
|
--
|
1111
|
|
1112
|
/*!40000 ALTER TABLE `taxa_sampling_event` DISABLE KEYS */;
|
1113
|
/*!40000 ALTER TABLE `taxa_sampling_event` ENABLE KEYS */;
|
1114
|
|
1115
|
--
|
1116
|
-- Table structure for table `taxon_absence`
|
1117
|
--
|
1118
|
|
1119
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
1120
|
/*!40101 SET character_set_client = utf8 */;
|
1121
|
CREATE TABLE `taxon_absence` (
|
1122
|
`id` varbinary(767) NOT NULL,
|
1123
|
PRIMARY KEY (`id`),
|
1124
|
CONSTRAINT `fk_taxon_absence_taxa_sampling_event1` FOREIGN KEY (`id`) REFERENCES `aggregate_observation` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
|
1125
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='An observation that a [[VegCore#Taxon|Taxon]]''s does _not_ exist in a place';
|
1126
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
1127
|
|
1128
|
--
|
1129
|
-- Dumping data for table `taxon_absence`
|
1130
|
--
|
1131
|
|
1132
|
/*!40000 ALTER TABLE `taxon_absence` DISABLE KEYS */;
|
1133
|
/*!40000 ALTER TABLE `taxon_absence` ENABLE KEYS */;
|
1134
|
|
1135
|
--
|
1136
|
-- Table structure for table `taxon_assertion`
|
1137
|
--
|
1138
|
|
1139
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
1140
|
/*!40101 SET character_set_client = utf8 */;
|
1141
|
CREATE TABLE `taxon_assertion` (
|
1142
|
`id` varbinary(767) NOT NULL,
|
1143
|
`string` varbinary(767) NOT NULL COMMENT 'for parsed_taxon_assertion, this is the TNRS input name, not the concatenated matched name',
|
1144
|
`taxon` varbinary(767) DEFAULT NULL,
|
1145
|
`cf_aff` varbinary(767) DEFAULT NULL,
|
1146
|
`annotations` set('hstore') COLLATE utf8_bin DEFAULT NULL,
|
1147
|
PRIMARY KEY (`id`),
|
1148
|
KEY `fk_taxon_assertion_taxon_string1_idx` (`string`),
|
1149
|
KEY `fk_taxon_assertion_taxon_name1_idx` (`taxon`),
|
1150
|
CONSTRAINT `fk_qualified_taxon_record1` FOREIGN KEY (`id`) REFERENCES `traceable` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
|
1151
|
CONSTRAINT `fk_taxon_assertion_taxon_string1` FOREIGN KEY (`string`) REFERENCES `taxon_string` (`string`) ON DELETE CASCADE ON UPDATE CASCADE,
|
1152
|
CONSTRAINT `fk_taxon_assertion_taxon_name1` FOREIGN KEY (`taxon`) REFERENCES `taxon_name` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
|
1153
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
|
1154
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
1155
|
|
1156
|
--
|
1157
|
-- Dumping data for table `taxon_assertion`
|
1158
|
--
|
1159
|
|
1160
|
/*!40000 ALTER TABLE `taxon_assertion` DISABLE KEYS */;
|
1161
|
/*!40000 ALTER TABLE `taxon_assertion` ENABLE KEYS */;
|
1162
|
|
1163
|
--
|
1164
|
-- Table structure for table `taxon_concept`
|
1165
|
--
|
1166
|
|
1167
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
1168
|
/*!40101 SET character_set_client = utf8 */;
|
1169
|
CREATE TABLE `taxon_concept` (
|
1170
|
`id` varbinary(767) NOT NULL,
|
1171
|
`according_to` varbinary(767) NOT NULL,
|
1172
|
`parent` varbinary(767) DEFAULT NULL,
|
1173
|
`accepted_taxon_concept` varbinary(767) DEFAULT NULL,
|
1174
|
PRIMARY KEY (`id`),
|
1175
|
UNIQUE KEY `taxon_concept_unique_name` (`according_to`),
|
1176
|
KEY `fk_taxon_taxon1_idx` (`parent`),
|
1177
|
KEY `fk_taxon_concept_source1_idx` (`according_to`),
|
1178
|
KEY `fk_taxon_concept_taxon_concept1_idx` (`accepted_taxon_concept`),
|
1179
|
CONSTRAINT `fk_taxon_taxon1` FOREIGN KEY (`parent`) REFERENCES `taxon_concept` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
|
1180
|
CONSTRAINT `fk_taxon_concept_source1` FOREIGN KEY (`according_to`) REFERENCES `dataset` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
|
1181
|
CONSTRAINT `fk_taxon_concept_taxon_concept1` FOREIGN KEY (`accepted_taxon_concept`) REFERENCES `taxon_concept` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
|
1182
|
CONSTRAINT `fk_taxon_concept_taxon_name1` FOREIGN KEY (`id`) REFERENCES `taxon_name` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
|
1183
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='A [[VegCore#Taxon|Taxon]] described by a specific [[VegCore#Reference|Reference]]';
|
1184
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
1185
|
|
1186
|
--
|
1187
|
-- Dumping data for table `taxon_concept`
|
1188
|
--
|
1189
|
|
1190
|
/*!40000 ALTER TABLE `taxon_concept` DISABLE KEYS */;
|
1191
|
/*!40000 ALTER TABLE `taxon_concept` ENABLE KEYS */;
|
1192
|
|
1193
|
--
|
1194
|
-- Table structure for table `taxon_determination`
|
1195
|
--
|
1196
|
|
1197
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
1198
|
/*!40101 SET character_set_client = utf8 */;
|
1199
|
CREATE TABLE `taxon_determination` (
|
1200
|
`id` varbinary(767) NOT NULL,
|
1201
|
`taxon_assertion` varbinary(767) NOT NULL,
|
1202
|
`identified_by` varbinary(767) DEFAULT NULL,
|
1203
|
`fit_info` set('hstore') COLLATE utf8_bin DEFAULT NULL,
|
1204
|
PRIMARY KEY (`id`),
|
1205
|
UNIQUE KEY `taxon_determination_unique` (`taxon_assertion`,`identified_by`),
|
1206
|
KEY `fk_taxon_occurrence_has_qualified_taxon1_idx` (`taxon_assertion`),
|
1207
|
KEY `fk_taxon_determination_party_list1_idx` (`identified_by`),
|
1208
|
CONSTRAINT `fk_taxon_occurrence_has_qualified_taxon1` FOREIGN KEY (`taxon_assertion`) REFERENCES `taxon_assertion` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
|
1209
|
CONSTRAINT `fk_taxon_determination_party_list1` FOREIGN KEY (`identified_by`) REFERENCES `party_list` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
|
1210
|
CONSTRAINT `fk_taxon_determination_taxon_observation1` FOREIGN KEY (`id`) REFERENCES `taxon_observation` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
|
1211
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='An assertion that a [[VegCore#TaxonOccurrence|TaxonOccurrence]] is a particular [[VegCore#Taxon|Taxon]]';
|
1212
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
1213
|
|
1214
|
--
|
1215
|
-- Dumping data for table `taxon_determination`
|
1216
|
--
|
1217
|
|
1218
|
/*!40000 ALTER TABLE `taxon_determination` DISABLE KEYS */;
|
1219
|
/*!40000 ALTER TABLE `taxon_determination` ENABLE KEYS */;
|
1220
|
|
1221
|
--
|
1222
|
-- Table structure for table `taxon_name`
|
1223
|
--
|
1224
|
|
1225
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
1226
|
/*!40101 SET character_set_client = utf8 */;
|
1227
|
CREATE TABLE `taxon_name` (
|
1228
|
`id` varbinary(767) NOT NULL,
|
1229
|
`unique_name` varbinary(767) NOT NULL,
|
1230
|
`formal_name` varbinary(767) DEFAULT NULL,
|
1231
|
`taxon_name` varbinary(767) DEFAULT NULL,
|
1232
|
`author` varbinary(767) DEFAULT NULL,
|
1233
|
`common_name` varbinary(767) DEFAULT NULL,
|
1234
|
`rank` varbinary(767) DEFAULT NULL,
|
1235
|
`taxon_path` varbinary(767) DEFAULT NULL,
|
1236
|
PRIMARY KEY (`id`),
|
1237
|
KEY `fk_taxon_concept_taxon_string10_idx` (`unique_name`),
|
1238
|
KEY `fk_taxon_name_taxon_path1_idx` (`taxon_path`),
|
1239
|
CONSTRAINT `fk_taxon_record10` FOREIGN KEY (`id`) REFERENCES `traceable` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
|
1240
|
CONSTRAINT `fk_taxon_concept_taxon_string10` FOREIGN KEY (`unique_name`) REFERENCES `taxon_string` (`string`) ON DELETE CASCADE ON UPDATE CASCADE,
|
1241
|
CONSTRAINT `fk_taxon_name_taxon_path1` FOREIGN KEY (`taxon_path`) REFERENCES `taxon_path` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
|
1242
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
|
1243
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
1244
|
|
1245
|
--
|
1246
|
-- Dumping data for table `taxon_name`
|
1247
|
--
|
1248
|
|
1249
|
/*!40000 ALTER TABLE `taxon_name` DISABLE KEYS */;
|
1250
|
/*!40000 ALTER TABLE `taxon_name` ENABLE KEYS */;
|
1251
|
|
1252
|
--
|
1253
|
-- Table structure for table `taxon_observation`
|
1254
|
--
|
1255
|
|
1256
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
1257
|
/*!40101 SET character_set_client = utf8 */;
|
1258
|
CREATE TABLE `taxon_observation` (
|
1259
|
`id` varbinary(767) NOT NULL,
|
1260
|
`taxon_occurrence` varbinary(767) NOT NULL,
|
1261
|
`sampling_event` varbinary(767) DEFAULT NULL,
|
1262
|
`observation_in_parent_place` varbinary(767) DEFAULT NULL COMMENT 'points to the observation of the same taxon/individual in the parent place; = VegBank.vegpath.org?taxonImportance.taxonObservation_ID',
|
1263
|
`collectors` varbinary(767) DEFAULT NULL,
|
1264
|
`collector_number` varbinary(767) DEFAULT NULL,
|
1265
|
`growth_form` varbinary(767) DEFAULT NULL,
|
1266
|
`cultivated` tinyint(1) DEFAULT NULL,
|
1267
|
`traits` set('hstore') COLLATE utf8_bin DEFAULT NULL,
|
1268
|
PRIMARY KEY (`id`),
|
1269
|
KEY `fk_taxon_observation_party_list1_idx` (`collectors`),
|
1270
|
KEY `fk_taxon_observation_taxon_occurrence1_idx` (`taxon_occurrence`),
|
1271
|
KEY `fk_taxon_observation_taxa_sampling_event1_idx` (`sampling_event`),
|
1272
|
KEY `fk_taxon_observation_taxon_observation1_idx` (`observation_in_parent_place`),
|
1273
|
CONSTRAINT `fk_taxon_observation_taxon_observation1` FOREIGN KEY (`observation_in_parent_place`) REFERENCES `taxon_observation` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
|
1274
|
CONSTRAINT `fk_taxon_observation_party_list1` FOREIGN KEY (`collectors`) REFERENCES `party_list` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
|
1275
|
CONSTRAINT `fk_taxon_observation_sampling_event1` FOREIGN KEY (`id`) REFERENCES `event` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
|
1276
|
CONSTRAINT `fk_taxon_observation_taxa_sampling_event1` FOREIGN KEY (`sampling_event`) REFERENCES `taxa_sampling_event` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
|
1277
|
CONSTRAINT `fk_taxon_observation_taxon_occurrence1` FOREIGN KEY (`taxon_occurrence`) REFERENCES `taxon_occurrence` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
|
1278
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
|
1279
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
1280
|
|
1281
|
--
|
1282
|
-- Dumping data for table `taxon_observation`
|
1283
|
--
|
1284
|
|
1285
|
/*!40000 ALTER TABLE `taxon_observation` DISABLE KEYS */;
|
1286
|
/*!40000 ALTER TABLE `taxon_observation` ENABLE KEYS */;
|
1287
|
|
1288
|
--
|
1289
|
-- Table structure for table `taxon_occurrence`
|
1290
|
--
|
1291
|
|
1292
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
1293
|
/*!40101 SET character_set_client = utf8 */;
|
1294
|
CREATE TABLE `taxon_occurrence` (
|
1295
|
`id` varbinary(767) NOT NULL,
|
1296
|
`within_place` varbinary(767) NOT NULL,
|
1297
|
`current_observation` varbinary(767) DEFAULT NULL,
|
1298
|
PRIMARY KEY (`id`),
|
1299
|
KEY `fk_taxon_occurrence_taxon_determination3_idx` (`current_observation`),
|
1300
|
KEY `fk_taxon_occurrence_place1_idx` (`within_place`),
|
1301
|
CONSTRAINT `fk_taxon_occurrence_taxon_determination3` FOREIGN KEY (`current_observation`) REFERENCES `taxon_observation` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
|
1302
|
CONSTRAINT `fk_taxon_occurrence_record1` FOREIGN KEY (`id`) REFERENCES `traceable` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
|
1303
|
CONSTRAINT `fk_taxon_occurrence_place1` FOREIGN KEY (`within_place`) REFERENCES `place` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
|
1304
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
|
1305
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
1306
|
|
1307
|
--
|
1308
|
-- Dumping data for table `taxon_occurrence`
|
1309
|
--
|
1310
|
|
1311
|
/*!40000 ALTER TABLE `taxon_occurrence` DISABLE KEYS */;
|
1312
|
/*!40000 ALTER TABLE `taxon_occurrence` ENABLE KEYS */;
|
1313
|
|
1314
|
--
|
1315
|
-- Table structure for table `taxon_path`
|
1316
|
--
|
1317
|
|
1318
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
1319
|
/*!40101 SET character_set_client = utf8 */;
|
1320
|
CREATE TABLE `taxon_path` (
|
1321
|
`id` varbinary(767) NOT NULL,
|
1322
|
`family` varbinary(767) DEFAULT NULL,
|
1323
|
`genus` varbinary(767) DEFAULT NULL,
|
1324
|
`specific_epithet` varbinary(767) DEFAULT NULL,
|
1325
|
`ranks` set('hstore') COLLATE utf8_bin DEFAULT NULL,
|
1326
|
PRIMARY KEY (`id`)
|
1327
|
) 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)';
|
1328
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
1329
|
|
1330
|
--
|
1331
|
-- Dumping data for table `taxon_path`
|
1332
|
--
|
1333
|
|
1334
|
/*!40000 ALTER TABLE `taxon_path` DISABLE KEYS */;
|
1335
|
/*!40000 ALTER TABLE `taxon_path` ENABLE KEYS */;
|
1336
|
|
1337
|
--
|
1338
|
-- Table structure for table `taxon_presence`
|
1339
|
--
|
1340
|
|
1341
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
1342
|
/*!40101 SET character_set_client = utf8 */;
|
1343
|
CREATE TABLE `taxon_presence` (
|
1344
|
`id` varbinary(767) NOT NULL,
|
1345
|
`cover_percent` double DEFAULT NULL,
|
1346
|
`traits` set('hstore') COLLATE utf8_bin DEFAULT NULL,
|
1347
|
PRIMARY KEY (`id`),
|
1348
|
CONSTRAINT `fk_taxon_presence_taxon_determination1` FOREIGN KEY (`id`) REFERENCES `aggregate_observation` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
|
1349
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='= aggregateOrganismObservation.VegX.vegpath.org, taxonImportance.VegBank.vegpath.org; "An observation applying to all occurrences of an organism" ("VegX":http://wiki.tdwg.org/twiki/pub/Vegetation/WebHome/VegX_Schema_1.5.3_proposed.zip#/veg.xsd#/aggregateOrganismObservations/aggregateOrganismObservation).';
|
1350
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
1351
|
|
1352
|
--
|
1353
|
-- Dumping data for table `taxon_presence`
|
1354
|
--
|
1355
|
|
1356
|
/*!40000 ALTER TABLE `taxon_presence` DISABLE KEYS */;
|
1357
|
/*!40000 ALTER TABLE `taxon_presence` ENABLE KEYS */;
|
1358
|
|
1359
|
--
|
1360
|
-- Table structure for table `taxon_scrub`
|
1361
|
--
|
1362
|
|
1363
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
1364
|
/*!40101 SET character_set_client = utf8 */;
|
1365
|
CREATE TABLE `taxon_scrub` (
|
1366
|
`id` varbinary(767) NOT NULL,
|
1367
|
`input_string` varbinary(767) NOT NULL,
|
1368
|
`parsed_taxon_assertion` varbinary(767) NOT NULL,
|
1369
|
`matched_taxon_concept` varbinary(767) DEFAULT NULL,
|
1370
|
`match_score` float DEFAULT NULL,
|
1371
|
`match_info` set('hstore') COLLATE utf8_bin DEFAULT NULL,
|
1372
|
PRIMARY KEY (`id`),
|
1373
|
KEY `fk_parsed_taxon_assertion_taxon_name1_idx` (`matched_taxon_concept`),
|
1374
|
KEY `fk_taxon_scrub_taxon_assertion1_idx` (`parsed_taxon_assertion`),
|
1375
|
KEY `fk_taxon_scrub_taxon_string1_idx` (`input_string`),
|
1376
|
CONSTRAINT `fk_parsed_taxon_assertion_taxon_name1` FOREIGN KEY (`matched_taxon_concept`) REFERENCES `taxon_concept` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
|
1377
|
CONSTRAINT `fk_taxon_scrub_taxon_assertion1` FOREIGN KEY (`parsed_taxon_assertion`) REFERENCES `taxon_assertion` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
|
1378
|
CONSTRAINT `fk_taxon_scrub_taxon_string1` FOREIGN KEY (`input_string`) REFERENCES `taxon_string` (`string`) ON DELETE CASCADE ON UPDATE CASCADE,
|
1379
|
CONSTRAINT `fk_taxon_scrub_record1` FOREIGN KEY (`id`) REFERENCES `traceable` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
|
1380
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
|
1381
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
1382
|
|
1383
|
--
|
1384
|
-- Dumping data for table `taxon_scrub`
|
1385
|
--
|
1386
|
|
1387
|
/*!40000 ALTER TABLE `taxon_scrub` DISABLE KEYS */;
|
1388
|
/*!40000 ALTER TABLE `taxon_scrub` ENABLE KEYS */;
|
1389
|
|
1390
|
--
|
1391
|
-- Table structure for table `taxon_string`
|
1392
|
--
|
1393
|
|
1394
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
1395
|
/*!40101 SET character_set_client = utf8 */;
|
1396
|
CREATE TABLE `taxon_string` (
|
1397
|
`string` varbinary(767) NOT NULL,
|
1398
|
PRIMARY KEY (`string`)
|
1399
|
) 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)';
|
1400
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
1401
|
|
1402
|
--
|
1403
|
-- Dumping data for table `taxon_string`
|
1404
|
--
|
1405
|
|
1406
|
/*!40000 ALTER TABLE `taxon_string` DISABLE KEYS */;
|
1407
|
/*!40000 ALTER TABLE `taxon_string` ENABLE KEYS */;
|
1408
|
|
1409
|
--
|
1410
|
-- Table structure for table `traceable`
|
1411
|
--
|
1412
|
|
1413
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
1414
|
/*!40101 SET character_set_client = utf8 */;
|
1415
|
CREATE TABLE `traceable` (
|
1416
|
`id` varbinary(767) NOT NULL,
|
1417
|
`source` varbinary(767) DEFAULT NULL,
|
1418
|
PRIMARY KEY (`id`),
|
1419
|
UNIQUE KEY `record_unique` (`source`),
|
1420
|
CONSTRAINT `fk_record_source1` FOREIGN KEY (`source`) REFERENCES `source` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
|
1421
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='a row that can have associated source information';
|
1422
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
1423
|
|
1424
|
--
|
1425
|
-- Dumping data for table `traceable`
|
1426
|
--
|
1427
|
|
1428
|
/*!40000 ALTER TABLE `traceable` DISABLE KEYS */;
|
1429
|
/*!40000 ALTER TABLE `traceable` ENABLE KEYS */;
|
1430
|
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
|
1431
|
|
1432
|
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
|
1433
|
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
|
1434
|
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
|
1435
|
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
|
1436
|
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
|
1437
|
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
|
1438
|
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
|
1439
|
|
1440
|
-- Dump completed
|