Project

General

Profile

1
-- MySQL dump 10.13  Distrib 5.5.31, for debian-linux-gnu (x86_64)
2
--
3
-- Host: localhost    Database: VegCore
4
-- ------------------------------------------------------
5
-- Server version	5.5.31-0ubuntu0.12.04.2
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
  `taxon_concept` varbinary(767) NOT NULL,
27
  `traits` set('hstore') COLLATE utf8_bin DEFAULT NULL,
28
  PRIMARY KEY (`id`),
29
  KEY `fk_aggregate_observation_taxon_name1_idx` (`taxon_concept`),
30
  CONSTRAINT `fk_aggregate_observation_taxon_occurrence1` FOREIGN KEY (`id`) REFERENCES `taxon_observation` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
31
  CONSTRAINT `fk_aggregate_observation_taxon_name1` FOREIGN KEY (`taxon_concept`) REFERENCES `taxon_concept` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
32
) 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)';
33
/*!40101 SET character_set_client = @saved_cs_client */;
34

    
35
--
36
-- Dumping data for table `aggregate_observation`
37
--
38

    
39
/*!40000 ALTER TABLE `aggregate_observation` DISABLE KEYS */;
40
/*!40000 ALTER TABLE `aggregate_observation` ENABLE KEYS */;
41

    
42
--
43
-- Table structure for table `base_class`
44
--
45

    
46
/*!40101 SET @saved_cs_client     = @@character_set_client */;
47
/*!40101 SET character_set_client = utf8 */;
48
CREATE TABLE `base_class` (
49
  `id` varbinary(767) NOT NULL,
50
  `referenced_class` varbinary(767) NOT NULL,
51
  PRIMARY KEY (`id`),
52
  KEY `fk_base_class_referenced_class1_idx` (`referenced_class`),
53
  CONSTRAINT `fk_base_class_referenced_class1` FOREIGN KEY (`referenced_class`) REFERENCES `referenced_class` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
54
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
55
/*!40101 SET character_set_client = @saved_cs_client */;
56

    
57
--
58
-- Dumping data for table `base_class`
59
--
60

    
61
/*!40000 ALTER TABLE `base_class` DISABLE KEYS */;
62
/*!40000 ALTER TABLE `base_class` ENABLE KEYS */;
63

    
64
--
65
-- Table structure for table `collection`
66
--
67

    
68
/*!40101 SET @saved_cs_client     = @@character_set_client */;
69
/*!40101 SET character_set_client = utf8 */;
70
CREATE TABLE `collection` (
71
  `id` varbinary(767) NOT NULL,
72
  `institution` varbinary(767) NOT NULL,
73
  `name` varbinary(767) NOT NULL,
74
  PRIMARY KEY (`id`),
75
  UNIQUE KEY `collection_unique` (`institution`,`name`),
76
  KEY `fk_collection_organization1_idx` (`institution`),
77
  KEY `fk_collection_source1_idx` (`id`),
78
  CONSTRAINT `fk_collection_source1` FOREIGN KEY (`id`) REFERENCES `record` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
79
  CONSTRAINT `fk_collection_organization1` FOREIGN KEY (`institution`) REFERENCES `organization` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
80
) 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)';
81
/*!40101 SET character_set_client = @saved_cs_client */;
82

    
83
--
84
-- Dumping data for table `collection`
85
--
86

    
87
/*!40000 ALTER TABLE `collection` DISABLE KEYS */;
88
/*!40000 ALTER TABLE `collection` ENABLE KEYS */;
89

    
90
--
91
-- Table structure for table `community`
92
--
93

    
94
/*!40101 SET @saved_cs_client     = @@character_set_client */;
95
/*!40101 SET character_set_client = utf8 */;
96
CREATE TABLE `community` (
97
  `id` varbinary(767) NOT NULL,
98
  `name` varbinary(767) NOT NULL,
99
  `info` set('hstore') COLLATE utf8_bin DEFAULT NULL,
100
  PRIMARY KEY (`id`),
101
  CONSTRAINT `fk_community_record1` FOREIGN KEY (`id`) REFERENCES `record` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
102
) 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]])';
103
/*!40101 SET character_set_client = @saved_cs_client */;
104

    
105
--
106
-- Dumping data for table `community`
107
--
108

    
109
/*!40000 ALTER TABLE `community` DISABLE KEYS */;
110
/*!40000 ALTER TABLE `community` ENABLE KEYS */;
111

    
112
--
113
-- Table structure for table `coordinates`
114
--
115

    
116
/*!40101 SET @saved_cs_client     = @@character_set_client */;
117
/*!40101 SET character_set_client = utf8 */;
118
CREATE TABLE `coordinates` (
119
  `id` varbinary(767) NOT NULL,
120
  `latitude_deg` varbinary(767) DEFAULT NULL,
121
  `longitude_deg` varbinary(767) DEFAULT NULL,
122
  PRIMARY KEY (`id`)
123
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='A numerically-defined point';
124
/*!40101 SET character_set_client = @saved_cs_client */;
125

    
126
--
127
-- Dumping data for table `coordinates`
128
--
129

    
130
/*!40000 ALTER TABLE `coordinates` DISABLE KEYS */;
131
/*!40000 ALTER TABLE `coordinates` ENABLE KEYS */;
132

    
133
--
134
-- Table structure for table `derived_class`
135
--
136

    
137
/*!40101 SET @saved_cs_client     = @@character_set_client */;
138
/*!40101 SET character_set_client = utf8 */;
139
CREATE TABLE `derived_class` (
140
  `id` varbinary(767) NOT NULL,
141
  PRIMARY KEY (`id`),
142
  CONSTRAINT `fk_derived_class_base_class1` FOREIGN KEY (`id`) REFERENCES `base_class` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
143
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
144
/*!40101 SET character_set_client = @saved_cs_client */;
145

    
146
--
147
-- Dumping data for table `derived_class`
148
--
149

    
150
/*!40000 ALTER TABLE `derived_class` DISABLE KEYS */;
151
/*!40000 ALTER TABLE `derived_class` ENABLE KEYS */;
152

    
153
--
154
-- Table structure for table `event`
155
--
156

    
157
/*!40101 SET @saved_cs_client     = @@character_set_client */;
158
/*!40101 SET character_set_client = utf8 */;
159
CREATE TABLE `event` (
160
  `id` varbinary(767) NOT NULL,
161
  `parent` varbinary(767) NOT NULL,
162
  `name` varbinary(767) DEFAULT NULL,
163
  `date_range` varbinary(767) DEFAULT NULL,
164
  `place` varbinary(767) DEFAULT NULL,
165
  `method` varbinary(767) DEFAULT NULL,
166
  PRIMARY KEY (`id`),
167
  KEY `fk_event_place1_idx` (`place`),
168
  KEY `fk_event1_idx` (`parent`),
169
  KEY `fk_event_method1_idx` (`method`),
170
  CONSTRAINT `fk_event_record1` FOREIGN KEY (`id`) REFERENCES `record` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
171
  CONSTRAINT `fk_event_place1` FOREIGN KEY (`place`) REFERENCES `place` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
172
  CONSTRAINT `fk_event1` FOREIGN KEY (`parent`) REFERENCES `event` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
173
  CONSTRAINT `fk_event_method1` FOREIGN KEY (`method`) REFERENCES `method` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
174
) 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)';
175
/*!40101 SET character_set_client = @saved_cs_client */;
176

    
177
--
178
-- Dumping data for table `event`
179
--
180

    
181
/*!40000 ALTER TABLE `event` DISABLE KEYS */;
182
/*!40000 ALTER TABLE `event` ENABLE KEYS */;
183

    
184
--
185
-- Table structure for table `event_participant`
186
--
187

    
188
/*!40101 SET @saved_cs_client     = @@character_set_client */;
189
/*!40101 SET character_set_client = utf8 */;
190
CREATE TABLE `event_participant` (
191
  `event` varbinary(767) NOT NULL,
192
  `party` varbinary(767) NOT NULL,
193
  `sort_order` int(11) DEFAULT NULL,
194
  PRIMARY KEY (`event`,`party`),
195
  KEY `fk_event_has_party_party1_idx` (`party`),
196
  KEY `fk_event_has_party_event1_idx` (`event`),
197
  CONSTRAINT `fk_event_has_party_event1` FOREIGN KEY (`event`) REFERENCES `event` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
198
  CONSTRAINT `fk_event_has_party_party1` FOREIGN KEY (`party`) REFERENCES `party` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
199
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
200
/*!40101 SET character_set_client = @saved_cs_client */;
201

    
202
--
203
-- Dumping data for table `event_participant`
204
--
205

    
206
/*!40000 ALTER TABLE `event_participant` DISABLE KEYS */;
207
/*!40000 ALTER TABLE `event_participant` ENABLE KEYS */;
208

    
209
--
210
-- Table structure for table `geological_context`
211
--
212

    
213
/*!40101 SET @saved_cs_client     = @@character_set_client */;
214
/*!40101 SET character_set_client = utf8 */;
215
CREATE TABLE `geological_context` (
216
  `id` varbinary(767) NOT NULL,
217
  `name` varbinary(767) NOT NULL,
218
  `info` set('hstore') COLLATE utf8_bin DEFAULT NULL,
219
  PRIMARY KEY (`id`),
220
  CONSTRAINT `fk_geological_context_record1` FOREIGN KEY (`id`) REFERENCES `record` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
221
) 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)';
222
/*!40101 SET character_set_client = @saved_cs_client */;
223

    
224
--
225
-- Dumping data for table `geological_context`
226
--
227

    
228
/*!40000 ALTER TABLE `geological_context` DISABLE KEYS */;
229
/*!40000 ALTER TABLE `geological_context` ENABLE KEYS */;
230

    
231
--
232
-- Table structure for table `geovalidation`
233
--
234

    
235
/*!40101 SET @saved_cs_client     = @@character_set_client */;
236
/*!40101 SET character_set_client = utf8 */;
237
CREATE TABLE `geovalidation` (
238
  `id` varbinary(767) NOT NULL,
239
  `geovalid` tinyint(1) NOT NULL,
240
  `lat_long_domain_valid` tinyint(1) NOT NULL,
241
  `lat_long_in_ranks` set('hstore') COLLATE utf8_bin DEFAULT NULL,
242
  PRIMARY KEY (`id`),
243
  CONSTRAINT `fk_geovalidation_validatable_place1` FOREIGN KEY (`id`) REFERENCES `validatable_place` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
244
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='The accuracy of the [[VegCore#Coordinates|Coordinates]], taking into account the [[VegCore#Placename|Placename]]';
245
/*!40101 SET character_set_client = @saved_cs_client */;
246

    
247
--
248
-- Dumping data for table `geovalidation`
249
--
250

    
251
/*!40000 ALTER TABLE `geovalidation` DISABLE KEYS */;
252
/*!40000 ALTER TABLE `geovalidation` ENABLE KEYS */;
253

    
254
--
255
-- Table structure for table `individual`
256
--
257

    
258
/*!40101 SET @saved_cs_client     = @@character_set_client */;
259
/*!40101 SET character_set_client = utf8 */;
260
CREATE TABLE `individual` (
261
  `id` varbinary(767) NOT NULL,
262
  `tag` varbinary(767) DEFAULT NULL,
263
  PRIMARY KEY (`id`),
264
  CONSTRAINT `fk_individual_record1` FOREIGN KEY (`id`) REFERENCES `taxon_occurrence` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
265
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='A distinct biological organism';
266
/*!40101 SET character_set_client = @saved_cs_client */;
267

    
268
--
269
-- Dumping data for table `individual`
270
--
271

    
272
/*!40000 ALTER TABLE `individual` DISABLE KEYS */;
273
/*!40000 ALTER TABLE `individual` ENABLE KEYS */;
274

    
275
--
276
-- Table structure for table `individual_observation`
277
--
278

    
279
/*!40101 SET @saved_cs_client     = @@character_set_client */;
280
/*!40101 SET character_set_client = utf8 */;
281
CREATE TABLE `individual_observation` (
282
  `id` varbinary(767) NOT NULL,
283
  `individual` varbinary(767) DEFAULT NULL,
284
  `code` varbinary(767) DEFAULT NULL,
285
  `traits` set('hstore') COLLATE utf8_bin DEFAULT NULL,
286
  PRIMARY KEY (`id`),
287
  KEY `fk_individual_observation_individual1_idx` (`individual`),
288
  CONSTRAINT `fk_individual_observation_taxon_occurrence1` FOREIGN KEY (`id`) REFERENCES `taxon_observation` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
289
  CONSTRAINT `fk_individual_observation_individual1` FOREIGN KEY (`individual`) REFERENCES `individual` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
290
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='An observation of an [[VegCore#Individual|Individual]]';
291
/*!40101 SET character_set_client = @saved_cs_client */;
292

    
293
--
294
-- Dumping data for table `individual_observation`
295
--
296

    
297
/*!40000 ALTER TABLE `individual_observation` DISABLE KEYS */;
298
/*!40000 ALTER TABLE `individual_observation` ENABLE KEYS */;
299

    
300
--
301
-- Table structure for table `method`
302
--
303

    
304
/*!40101 SET @saved_cs_client     = @@character_set_client */;
305
/*!40101 SET character_set_client = utf8 */;
306
CREATE TABLE `method` (
307
  `id` varbinary(767) NOT NULL,
308
  `parent` varbinary(767) NOT NULL,
309
  `info` set('hstore') COLLATE utf8_bin DEFAULT NULL,
310
  PRIMARY KEY (`id`),
311
  KEY `fk_method_method1_idx` (`parent`),
312
  CONSTRAINT `fk_method_record1` FOREIGN KEY (`id`) REFERENCES `record` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
313
  CONSTRAINT `fk_method_method1` FOREIGN KEY (`parent`) REFERENCES `method` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
314
) 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)';
315
/*!40101 SET character_set_client = @saved_cs_client */;
316

    
317
--
318
-- Dumping data for table `method`
319
--
320

    
321
/*!40000 ALTER TABLE `method` DISABLE KEYS */;
322
/*!40000 ALTER TABLE `method` ENABLE KEYS */;
323

    
324
--
325
-- Table structure for table `organization`
326
--
327

    
328
/*!40101 SET @saved_cs_client     = @@character_set_client */;
329
/*!40101 SET character_set_client = utf8 */;
330
CREATE TABLE `organization` (
331
  `id` varbinary(767) NOT NULL,
332
  `info` set('hstore') COLLATE utf8_bin DEFAULT NULL,
333
  PRIMARY KEY (`id`),
334
  CONSTRAINT `fk_organization_party1` FOREIGN KEY (`id`) REFERENCES `party` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
335
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
336
/*!40101 SET character_set_client = @saved_cs_client */;
337

    
338
--
339
-- Dumping data for table `organization`
340
--
341

    
342
/*!40000 ALTER TABLE `organization` DISABLE KEYS */;
343
/*!40000 ALTER TABLE `organization` ENABLE KEYS */;
344

    
345
--
346
-- Table structure for table `parsed_taxon_assertion`
347
--
348

    
349
/*!40101 SET @saved_cs_client     = @@character_set_client */;
350
/*!40101 SET character_set_client = utf8 */;
351
CREATE TABLE `parsed_taxon_assertion` (
352
  `id` varbinary(767) NOT NULL,
353
  `matched_taxon_concept` varbinary(767) DEFAULT NULL,
354
  `match_score` float DEFAULT NULL,
355
  `match_info` set('hstore') COLLATE utf8_bin DEFAULT NULL,
356
  PRIMARY KEY (`id`),
357
  KEY `fk_parsed_taxon_assertion_taxon_name1_idx` (`matched_taxon_concept`),
358
  CONSTRAINT `fk_matched_taxon_qualified_taxon10` FOREIGN KEY (`id`) REFERENCES `taxon_assertion` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
359
  CONSTRAINT `fk_parsed_taxon_assertion_taxon_name1` FOREIGN KEY (`matched_taxon_concept`) REFERENCES `taxon_concept` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
360
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
361
/*!40101 SET character_set_client = @saved_cs_client */;
362

    
363
--
364
-- Dumping data for table `parsed_taxon_assertion`
365
--
366

    
367
/*!40000 ALTER TABLE `parsed_taxon_assertion` DISABLE KEYS */;
368
/*!40000 ALTER TABLE `parsed_taxon_assertion` ENABLE KEYS */;
369

    
370
--
371
-- Table structure for table `party`
372
--
373

    
374
/*!40101 SET @saved_cs_client     = @@character_set_client */;
375
/*!40101 SET character_set_client = utf8 */;
376
CREATE TABLE `party` (
377
  `id` varbinary(767) NOT NULL,
378
  `info` set('hstore') COLLATE utf8_bin DEFAULT NULL,
379
  PRIMARY KEY (`id`),
380
  CONSTRAINT `fk_collection_source10` FOREIGN KEY (`id`) REFERENCES `record` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
381
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
382
/*!40101 SET character_set_client = @saved_cs_client */;
383

    
384
--
385
-- Dumping data for table `party`
386
--
387

    
388
/*!40000 ALTER TABLE `party` DISABLE KEYS */;
389
/*!40000 ALTER TABLE `party` ENABLE KEYS */;
390

    
391
--
392
-- Table structure for table `place`
393
--
394

    
395
/*!40101 SET @saved_cs_client     = @@character_set_client */;
396
/*!40101 SET character_set_client = utf8 */;
397
CREATE TABLE `place` (
398
  `id` varbinary(767) NOT NULL,
399
  `parent` varbinary(767) NOT NULL,
400
  `coordinates` varbinary(767) DEFAULT NULL,
401
  `path` varbinary(767) DEFAULT NULL,
402
  `locality` varbinary(767) DEFAULT NULL,
403
  PRIMARY KEY (`id`),
404
  KEY `fk_place_coordinates1_idx` (`coordinates`),
405
  KEY `fk_place1_idx` (`parent`),
406
  KEY `fk_place_place_path1_idx` (`path`),
407
  CONSTRAINT `fk_place_record1` FOREIGN KEY (`id`) REFERENCES `record` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
408
  CONSTRAINT `fk_place_coordinates1` FOREIGN KEY (`coordinates`) REFERENCES `coordinates` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
409
  CONSTRAINT `fk_place1` FOREIGN KEY (`parent`) REFERENCES `place` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
410
  CONSTRAINT `fk_place_place_path1` FOREIGN KEY (`path`) REFERENCES `place_path` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
411
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='"A spatial region" ("DwC":http://rs.tdwg.org/dwc/terms/#dcterms:Location) or point';
412
/*!40101 SET character_set_client = @saved_cs_client */;
413

    
414
--
415
-- Dumping data for table `place`
416
--
417

    
418
/*!40000 ALTER TABLE `place` DISABLE KEYS */;
419
/*!40000 ALTER TABLE `place` ENABLE KEYS */;
420

    
421
--
422
-- Table structure for table `place_observation`
423
--
424

    
425
/*!40101 SET @saved_cs_client     = @@character_set_client */;
426
/*!40101 SET character_set_client = utf8 */;
427
CREATE TABLE `place_observation` (
428
  `id` varbinary(767) NOT NULL,
429
  `place` varbinary(767) NOT NULL,
430
  `elevation_m` double DEFAULT NULL,
431
  `slope_incline_deg` double DEFAULT NULL,
432
  `slope_direction_deg_N` double DEFAULT NULL,
433
  `geological_context` varbinary(767) DEFAULT NULL,
434
  `community` varbinary(767) DEFAULT NULL,
435
  `observations` set('hstore') COLLATE utf8_bin DEFAULT NULL,
436
  PRIMARY KEY (`id`),
437
  KEY `fk_place_observation_place1_idx` (`place`),
438
  KEY `fk_place_observation_geological_context1_idx` (`geological_context`),
439
  KEY `fk_place_observation_community1_idx` (`community`),
440
  KEY `fk_place_observation_event1_idx` (`id`),
441
  CONSTRAINT `fk_place_observation_place1` FOREIGN KEY (`place`) REFERENCES `place` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
442
  CONSTRAINT `fk_place_observation_geological_context1` FOREIGN KEY (`geological_context`) REFERENCES `geological_context` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
443
  CONSTRAINT `fk_place_observation_community1` FOREIGN KEY (`community`) REFERENCES `community` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
444
  CONSTRAINT `fk_place_observation_event1` FOREIGN KEY (`id`) REFERENCES `event` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
445
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='A sampling of a [[VegCore#Location|Location]]';
446
/*!40101 SET character_set_client = @saved_cs_client */;
447

    
448
--
449
-- Dumping data for table `place_observation`
450
--
451

    
452
/*!40000 ALTER TABLE `place_observation` DISABLE KEYS */;
453
/*!40000 ALTER TABLE `place_observation` ENABLE KEYS */;
454

    
455
--
456
-- Table structure for table `place_path`
457
--
458

    
459
/*!40101 SET @saved_cs_client     = @@character_set_client */;
460
/*!40101 SET character_set_client = utf8 */;
461
CREATE TABLE `place_path` (
462
  `id` varbinary(767) NOT NULL,
463
  `continent` varbinary(767) DEFAULT NULL,
464
  `country` varbinary(767) DEFAULT NULL,
465
  `state_province` varbinary(767) DEFAULT NULL,
466
  `county` varbinary(767) DEFAULT NULL,
467
  `municipality` varbinary(767) DEFAULT NULL,
468
  `ranks` set('hstore') COLLATE utf8_bin DEFAULT NULL,
469
  PRIMARY KEY (`id`)
470
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='A named region';
471
/*!40101 SET character_set_client = @saved_cs_client */;
472

    
473
--
474
-- Dumping data for table `place_path`
475
--
476

    
477
/*!40000 ALTER TABLE `place_path` DISABLE KEYS */;
478
/*!40000 ALTER TABLE `place_path` ENABLE KEYS */;
479

    
480
--
481
-- Table structure for table `plot`
482
--
483

    
484
/*!40101 SET @saved_cs_client     = @@character_set_client */;
485
/*!40101 SET character_set_client = utf8 */;
486
CREATE TABLE `plot` (
487
  `id` varbinary(767) NOT NULL,
488
  `name` varbinary(767) DEFAULT NULL,
489
  `area_m2` double DEFAULT NULL,
490
  `bounding_box` varbinary(767) DEFAULT NULL,
491
  PRIMARY KEY (`id`),
492
  CONSTRAINT `fk_subplot_place1` FOREIGN KEY (`id`) REFERENCES `place` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
493
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
494
/*!40101 SET character_set_client = @saved_cs_client */;
495

    
496
--
497
-- Dumping data for table `plot`
498
--
499

    
500
/*!40000 ALTER TABLE `plot` DISABLE KEYS */;
501
/*!40000 ALTER TABLE `plot` ENABLE KEYS */;
502

    
503
--
504
-- Table structure for table `project`
505
--
506

    
507
/*!40101 SET @saved_cs_client     = @@character_set_client */;
508
/*!40101 SET character_set_client = utf8 */;
509
CREATE TABLE `project` (
510
  `id` varbinary(767) NOT NULL,
511
  `name` varbinary(767) NOT NULL,
512
  `info` set('hstore') COLLATE utf8_bin DEFAULT NULL,
513
  PRIMARY KEY (`id`),
514
  CONSTRAINT `fk_project_event1` FOREIGN KEY (`id`) REFERENCES `event` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
515
) 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)';
516
/*!40101 SET character_set_client = @saved_cs_client */;
517

    
518
--
519
-- Dumping data for table `project`
520
--
521

    
522
/*!40000 ALTER TABLE `project` DISABLE KEYS */;
523
/*!40000 ALTER TABLE `project` ENABLE KEYS */;
524

    
525
--
526
-- Table structure for table `record`
527
--
528

    
529
/*!40101 SET @saved_cs_client     = @@character_set_client */;
530
/*!40101 SET character_set_client = utf8 */;
531
CREATE TABLE `record` (
532
  `id` varbinary(767) NOT NULL,
533
  `source` varbinary(767) NOT NULL,
534
  `source_id_scope` varbinary(767) DEFAULT NULL,
535
  `source_record_id` varbinary(767) DEFAULT NULL,
536
  `info` set('hstore') COLLATE utf8_bin DEFAULT NULL,
537
  PRIMARY KEY (`id`),
538
  UNIQUE KEY `record_unique` (`source`,`source_id_scope`,`source_record_id`),
539
  KEY `fk_record_source1_idx` (`source`),
540
  CONSTRAINT `fk_record_source1` FOREIGN KEY (`source`) REFERENCES `source` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
541
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
542
/*!40101 SET character_set_client = @saved_cs_client */;
543

    
544
--
545
-- Dumping data for table `record`
546
--
547

    
548
/*!40000 ALTER TABLE `record` DISABLE KEYS */;
549
/*!40000 ALTER TABLE `record` ENABLE KEYS */;
550

    
551
--
552
-- Table structure for table `referenced_class`
553
--
554

    
555
/*!40101 SET @saved_cs_client     = @@character_set_client */;
556
/*!40101 SET character_set_client = utf8 */;
557
CREATE TABLE `referenced_class` (
558
  `id` varbinary(767) NOT NULL,
559
  PRIMARY KEY (`id`),
560
  CONSTRAINT `fk_example_record10` FOREIGN KEY (`id`) REFERENCES `record` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
561
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
562
/*!40101 SET character_set_client = @saved_cs_client */;
563

    
564
--
565
-- Dumping data for table `referenced_class`
566
--
567

    
568
/*!40000 ALTER TABLE `referenced_class` DISABLE KEYS */;
569
/*!40000 ALTER TABLE `referenced_class` ENABLE KEYS */;
570

    
571
--
572
-- Table structure for table `relationship`
573
--
574

    
575
/*!40101 SET @saved_cs_client     = @@character_set_client */;
576
/*!40101 SET character_set_client = utf8 */;
577
CREATE TABLE `relationship` (
578
  `id` varbinary(767) NOT NULL,
579
  `record` varbinary(767) NOT NULL,
580
  `related_record` varbinary(767) NOT NULL,
581
  `info` set('hstore') COLLATE utf8_bin DEFAULT NULL,
582
  PRIMARY KEY (`id`),
583
  KEY `fk_relationship_record1_idx` (`record`),
584
  KEY `fk_relationship_related_record_idx` (`related_record`),
585
  CONSTRAINT `fk_relationship_record1` FOREIGN KEY (`id`) REFERENCES `record` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
586
  CONSTRAINT `fk_relationship_record2` FOREIGN KEY (`record`) REFERENCES `record` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
587
  CONSTRAINT `fk_relationship_related_record` FOREIGN KEY (`related_record`) REFERENCES `record` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
588
) 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)';
589
/*!40101 SET character_set_client = @saved_cs_client */;
590

    
591
--
592
-- Dumping data for table `relationship`
593
--
594

    
595
/*!40000 ALTER TABLE `relationship` DISABLE KEYS */;
596
/*!40000 ALTER TABLE `relationship` ENABLE KEYS */;
597

    
598
--
599
-- Table structure for table `soil_observation`
600
--
601

    
602
/*!40101 SET @saved_cs_client     = @@character_set_client */;
603
/*!40101 SET character_set_client = utf8 */;
604
CREATE TABLE `soil_observation` (
605
  `id` varbinary(767) NOT NULL,
606
  `observations` set('hstore') COLLATE utf8_bin DEFAULT NULL,
607
  PRIMARY KEY (`id`),
608
  CONSTRAINT `fk_soil_observation_place_observation1` FOREIGN KEY (`id`) REFERENCES `place_observation` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
609
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='A sampling of a [[VegCore#Location|Location]]''s soil';
610
/*!40101 SET character_set_client = @saved_cs_client */;
611

    
612
--
613
-- Dumping data for table `soil_observation`
614
--
615

    
616
/*!40000 ALTER TABLE `soil_observation` DISABLE KEYS */;
617
/*!40000 ALTER TABLE `soil_observation` ENABLE KEYS */;
618

    
619
--
620
-- Table structure for table `source`
621
--
622

    
623
/*!40101 SET @saved_cs_client     = @@character_set_client */;
624
/*!40101 SET character_set_client = utf8 */;
625
CREATE TABLE `source` (
626
  `id` varbinary(767) NOT NULL,
627
  `parent` varbinary(767) NOT NULL,
628
  `name` varbinary(767) NOT NULL,
629
  `first_publisher` varbinary(767) DEFAULT NULL,
630
  `owner` varbinary(767) DEFAULT NULL,
631
  `info` set('hstore') COLLATE utf8_bin DEFAULT NULL,
632
  PRIMARY KEY (`id`),
633
  UNIQUE KEY `source_unique` (`parent`,`name`),
634
  KEY `fk_source1_idx` (`parent`),
635
  KEY `fk_source_party1_idx` (`owner`),
636
  KEY `fk_source_party2_idx` (`first_publisher`),
637
  CONSTRAINT `fk_source1` FOREIGN KEY (`parent`) REFERENCES `source` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
638
  CONSTRAINT `fk_source_party1` FOREIGN KEY (`owner`) REFERENCES `party` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
639
  CONSTRAINT `fk_source_party2` FOREIGN KEY (`first_publisher`) REFERENCES `party` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
640
) 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)';
641
/*!40101 SET character_set_client = @saved_cs_client */;
642

    
643
--
644
-- Dumping data for table `source`
645
--
646

    
647
/*!40000 ALTER TABLE `source` DISABLE KEYS */;
648
/*!40000 ALTER TABLE `source` ENABLE KEYS */;
649

    
650
--
651
-- Table structure for table `specimen`
652
--
653

    
654
/*!40101 SET @saved_cs_client     = @@character_set_client */;
655
/*!40101 SET character_set_client = utf8 */;
656
CREATE TABLE `specimen` (
657
  `id` varbinary(767) NOT NULL,
658
  `individual` varbinary(767) DEFAULT NULL,
659
  `code_in_individual` varbinary(767) DEFAULT NULL,
660
  `collection_event` varbinary(767) DEFAULT NULL,
661
  `orig_collection` varbinary(767) DEFAULT NULL,
662
  `barcode` varbinary(767) DEFAULT NULL,
663
  `accession_number` varbinary(767) DEFAULT NULL,
664
  `current_collection` varbinary(767) DEFAULT NULL,
665
  `owner_collection` varbinary(767) DEFAULT NULL,
666
  PRIMARY KEY (`id`),
667
  UNIQUE KEY `specimen_unique_in_individual` (`individual`,`code_in_individual`),
668
  UNIQUE KEY `specimen_unique_by_collection_event` (`collection_event`),
669
  UNIQUE KEY `specimen_unique_in_collection_by_barcode` (`orig_collection`,`barcode`),
670
  UNIQUE KEY `specimen_unique_in_collection_by_accession_number` (`orig_collection`,`accession_number`),
671
  KEY `fk_specimen_collection1_idx` (`orig_collection`),
672
  KEY `fk_specimen_taxon_observation1_idx` (`collection_event`),
673
  KEY `fk_specimen_individual1_idx` (`individual`),
674
  KEY `fk_specimen_collection2_idx` (`current_collection`),
675
  KEY `fk_specimen_organization3_idx` (`owner_collection`),
676
  CONSTRAINT `fk_specimen_taxon_occurrence1` FOREIGN KEY (`id`) REFERENCES `taxon_occurrence` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
677
  CONSTRAINT `fk_specimen_collection1` FOREIGN KEY (`orig_collection`) REFERENCES `collection` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
678
  CONSTRAINT `fk_specimen_organization3` FOREIGN KEY (`owner_collection`) REFERENCES `collection` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
679
  CONSTRAINT `fk_specimen_taxon_observation1` FOREIGN KEY (`collection_event`) REFERENCES `taxon_observation` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
680
  CONSTRAINT `fk_specimen_individual1` FOREIGN KEY (`individual`) REFERENCES `individual` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
681
  CONSTRAINT `fk_specimen_collection2` FOREIGN KEY (`current_collection`) REFERENCES `collection` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
682
) 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';
683
/*!40101 SET character_set_client = @saved_cs_client */;
684

    
685
--
686
-- Dumping data for table `specimen`
687
--
688

    
689
/*!40000 ALTER TABLE `specimen` DISABLE KEYS */;
690
/*!40000 ALTER TABLE `specimen` ENABLE KEYS */;
691

    
692
--
693
-- Table structure for table `specimen_observation`
694
--
695

    
696
/*!40101 SET @saved_cs_client     = @@character_set_client */;
697
/*!40101 SET character_set_client = utf8 */;
698
CREATE TABLE `specimen_observation` (
699
  `id` varbinary(767) NOT NULL,
700
  `specimen` varbinary(767) NOT NULL,
701
  `traits` set('hstore') COLLATE utf8_bin DEFAULT NULL,
702
  PRIMARY KEY (`id`),
703
  KEY `fk_specimen_observation_specimen1_idx` (`specimen`),
704
  CONSTRAINT `fk_specimen_taxon_occurrence10` FOREIGN KEY (`id`) REFERENCES `taxon_observation` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
705
  CONSTRAINT `fk_specimen_observation_specimen1` FOREIGN KEY (`specimen`) REFERENCES `specimen` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
706
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
707
/*!40101 SET character_set_client = @saved_cs_client */;
708

    
709
--
710
-- Dumping data for table `specimen_observation`
711
--
712

    
713
/*!40000 ALTER TABLE `specimen_observation` DISABLE KEYS */;
714
/*!40000 ALTER TABLE `specimen_observation` ENABLE KEYS */;
715

    
716
--
717
-- Table structure for table `specimenholder_institution`
718
--
719

    
720
/*!40101 SET @saved_cs_client     = @@character_set_client */;
721
/*!40101 SET character_set_client = utf8 */;
722
CREATE TABLE `specimenholder_institution` (
723
  `specimen` varbinary(767) NOT NULL,
724
  `institution` varbinary(767) NOT NULL,
725
  `sort_order` int(11) DEFAULT NULL,
726
  PRIMARY KEY (`specimen`,`institution`),
727
  KEY `fk_specimen_has_organization_organization1_idx` (`institution`),
728
  KEY `fk_specimen_has_organization_specimen1_idx` (`specimen`),
729
  CONSTRAINT `fk_specimen_has_organization_specimen1` FOREIGN KEY (`specimen`) REFERENCES `specimen` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
730
  CONSTRAINT `fk_specimen_has_organization_organization1` FOREIGN KEY (`institution`) REFERENCES `organization` (`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 `specimenholder_institution`
736
--
737

    
738
/*!40000 ALTER TABLE `specimenholder_institution` DISABLE KEYS */;
739
/*!40000 ALTER TABLE `specimenholder_institution` ENABLE KEYS */;
740

    
741
--
742
-- Table structure for table `stem`
743
--
744

    
745
/*!40101 SET @saved_cs_client     = @@character_set_client */;
746
/*!40101 SET character_set_client = utf8 */;
747
CREATE TABLE `stem` (
748
  `id` varbinary(767) NOT NULL,
749
  `individual` varbinary(767) NOT NULL,
750
  PRIMARY KEY (`id`),
751
  KEY `fk_stem_individual1_idx` (`individual`),
752
  CONSTRAINT `fk_stem_individual1` FOREIGN KEY (`individual`) REFERENCES `individual` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
753
  CONSTRAINT `fk_stem_individual2` FOREIGN KEY (`id`) REFERENCES `individual` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
754
) 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)';
755
/*!40101 SET character_set_client = @saved_cs_client */;
756

    
757
--
758
-- Dumping data for table `stem`
759
--
760

    
761
/*!40000 ALTER TABLE `stem` DISABLE KEYS */;
762
/*!40000 ALTER TABLE `stem` ENABLE KEYS */;
763

    
764
--
765
-- Table structure for table `stem_observation`
766
--
767

    
768
/*!40101 SET @saved_cs_client     = @@character_set_client */;
769
/*!40101 SET character_set_client = utf8 */;
770
CREATE TABLE `stem_observation` (
771
  `id` varbinary(767) NOT NULL,
772
  `individual_observation` varbinary(767) NOT NULL,
773
  `stem` varbinary(767) DEFAULT NULL,
774
  `traits` set('hstore') COLLATE utf8_bin DEFAULT NULL,
775
  PRIMARY KEY (`id`),
776
  UNIQUE KEY `stem_observation_unique` (`individual_observation`,`stem`),
777
  KEY `fk_stem_observation_individual_observation1_idx` (`individual_observation`),
778
  KEY `fk_stem_observation_stem1_idx` (`stem`),
779
  CONSTRAINT `fk_stem_observation_individual_observation1` FOREIGN KEY (`individual_observation`) REFERENCES `individual_observation` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
780
  CONSTRAINT `fk_stem_observation_stem1` FOREIGN KEY (`stem`) REFERENCES `stem` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
781
  CONSTRAINT `fk_stem_observation_individual_observation2` FOREIGN KEY (`id`) REFERENCES `individual_observation` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
782
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='An observation of a [[VegCore#Stem|Stem]]';
783
/*!40101 SET character_set_client = @saved_cs_client */;
784

    
785
--
786
-- Dumping data for table `stem_observation`
787
--
788

    
789
/*!40000 ALTER TABLE `stem_observation` DISABLE KEYS */;
790
/*!40000 ALTER TABLE `stem_observation` ENABLE KEYS */;
791

    
792
--
793
-- Table structure for table `stratum`
794
--
795

    
796
/*!40101 SET @saved_cs_client     = @@character_set_client */;
797
/*!40101 SET character_set_client = utf8 */;
798
CREATE TABLE `stratum` (
799
  `id` varbinary(767) NOT NULL,
800
  `name` varbinary(767) NOT NULL,
801
  `info` set('hstore') COLLATE utf8_bin DEFAULT NULL,
802
  PRIMARY KEY (`id`),
803
  CONSTRAINT `fk_place_path_record10` FOREIGN KEY (`id`) REFERENCES `method` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
804
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
805
/*!40101 SET character_set_client = @saved_cs_client */;
806

    
807
--
808
-- Dumping data for table `stratum`
809
--
810

    
811
/*!40000 ALTER TABLE `stratum` DISABLE KEYS */;
812
/*!40000 ALTER TABLE `stratum` ENABLE KEYS */;
813

    
814
--
815
-- Table structure for table `subplot`
816
--
817

    
818
/*!40101 SET @saved_cs_client     = @@character_set_client */;
819
/*!40101 SET character_set_client = utf8 */;
820
CREATE TABLE `subplot` (
821
  `id` varbinary(767) NOT NULL,
822
  `x_m` double DEFAULT NULL,
823
  `y_m` double DEFAULT NULL,
824
  PRIMARY KEY (`id`),
825
  CONSTRAINT `fk_subplot_plot1` FOREIGN KEY (`id`) REFERENCES `plot` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
826
) 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)';
827
/*!40101 SET character_set_client = @saved_cs_client */;
828

    
829
--
830
-- Dumping data for table `subplot`
831
--
832

    
833
/*!40000 ALTER TABLE `subplot` DISABLE KEYS */;
834
/*!40000 ALTER TABLE `subplot` ENABLE KEYS */;
835

    
836
--
837
-- Table structure for table `taxon_assertion`
838
--
839

    
840
/*!40101 SET @saved_cs_client     = @@character_set_client */;
841
/*!40101 SET character_set_client = utf8 */;
842
CREATE TABLE `taxon_assertion` (
843
  `id` varbinary(767) NOT NULL,
844
  `string` varbinary(767) NOT NULL COMMENT 'for parsed_taxon_assertion, this is the TNRS input name, not the concatenated matched name',
845
  `taxon` varbinary(767) DEFAULT NULL,
846
  `cf_aff` varbinary(767) DEFAULT NULL,
847
  `annotations` set('hstore') COLLATE utf8_bin DEFAULT NULL,
848
  PRIMARY KEY (`id`),
849
  KEY `fk_taxon_assertion_taxon_string1_idx` (`string`),
850
  KEY `fk_taxon_assertion_taxon_name1_idx` (`taxon`),
851
  CONSTRAINT `fk_qualified_taxon_record1` FOREIGN KEY (`id`) REFERENCES `record` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
852
  CONSTRAINT `fk_taxon_assertion_taxon_string1` FOREIGN KEY (`string`) REFERENCES `taxon_string` (`string`) ON DELETE CASCADE ON UPDATE CASCADE,
853
  CONSTRAINT `fk_taxon_assertion_taxon_name1` FOREIGN KEY (`taxon`) REFERENCES `taxon_name` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
854
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
855
/*!40101 SET character_set_client = @saved_cs_client */;
856

    
857
--
858
-- Dumping data for table `taxon_assertion`
859
--
860

    
861
/*!40000 ALTER TABLE `taxon_assertion` DISABLE KEYS */;
862
/*!40000 ALTER TABLE `taxon_assertion` ENABLE KEYS */;
863

    
864
--
865
-- Table structure for table `taxon_concept`
866
--
867

    
868
/*!40101 SET @saved_cs_client     = @@character_set_client */;
869
/*!40101 SET character_set_client = utf8 */;
870
CREATE TABLE `taxon_concept` (
871
  `id` varbinary(767) NOT NULL,
872
  `according_to` varbinary(767) NOT NULL,
873
  `parent` varbinary(767) NOT NULL,
874
  `accepted_taxon_concept` varbinary(767) DEFAULT NULL,
875
  PRIMARY KEY (`id`),
876
  UNIQUE KEY `taxon_concept_unique_name` (`according_to`),
877
  KEY `fk_taxon_taxon1_idx` (`parent`),
878
  KEY `fk_taxon_concept_source1_idx` (`according_to`),
879
  KEY `fk_taxon_concept_taxon_concept1_idx` (`accepted_taxon_concept`),
880
  CONSTRAINT `fk_taxon_taxon1` FOREIGN KEY (`parent`) REFERENCES `taxon_concept` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
881
  CONSTRAINT `fk_taxon_concept_source1` FOREIGN KEY (`according_to`) REFERENCES `source` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
882
  CONSTRAINT `fk_taxon_concept_taxon_concept1` FOREIGN KEY (`accepted_taxon_concept`) REFERENCES `taxon_concept` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
883
  CONSTRAINT `fk_taxon_concept_taxon_name1` FOREIGN KEY (`id`) REFERENCES `taxon_name` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
884
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='A [[VegCore#Taxon|Taxon]] described by a specific [[VegCore#Reference|Reference]]';
885
/*!40101 SET character_set_client = @saved_cs_client */;
886

    
887
--
888
-- Dumping data for table `taxon_concept`
889
--
890

    
891
/*!40000 ALTER TABLE `taxon_concept` DISABLE KEYS */;
892
/*!40000 ALTER TABLE `taxon_concept` ENABLE KEYS */;
893

    
894
--
895
-- Table structure for table `taxon_determination`
896
--
897

    
898
/*!40101 SET @saved_cs_client     = @@character_set_client */;
899
/*!40101 SET character_set_client = utf8 */;
900
CREATE TABLE `taxon_determination` (
901
  `id` varbinary(767) NOT NULL,
902
  `taxon_assertion` varbinary(767) NOT NULL,
903
  `identified_by` varbinary(767) DEFAULT NULL,
904
  `fit_info` set('hstore') COLLATE utf8_bin DEFAULT NULL,
905
  PRIMARY KEY (`id`),
906
  UNIQUE KEY `taxon_determination_unique` (`taxon_assertion`,`identified_by`),
907
  KEY `fk_taxon_occurrence_has_qualified_taxon1_idx` (`taxon_assertion`),
908
  KEY `fk_taxon_determination_party1_idx` (`identified_by`),
909
  CONSTRAINT `fk_taxon_occurrence_has_qualified_taxon1` FOREIGN KEY (`taxon_assertion`) REFERENCES `taxon_assertion` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
910
  CONSTRAINT `fk_taxon_determination_record1` FOREIGN KEY (`id`) REFERENCES `taxon_observation` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
911
  CONSTRAINT `fk_taxon_determination_party1` FOREIGN KEY (`identified_by`) REFERENCES `party` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
912
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='An assertion that a [[VegCore#TaxonOccurrence|TaxonOccurrence]] is a particular [[VegCore#Taxon|Taxon]]';
913
/*!40101 SET character_set_client = @saved_cs_client */;
914

    
915
--
916
-- Dumping data for table `taxon_determination`
917
--
918

    
919
/*!40000 ALTER TABLE `taxon_determination` DISABLE KEYS */;
920
/*!40000 ALTER TABLE `taxon_determination` ENABLE KEYS */;
921

    
922
--
923
-- Table structure for table `taxon_name`
924
--
925

    
926
/*!40101 SET @saved_cs_client     = @@character_set_client */;
927
/*!40101 SET character_set_client = utf8 */;
928
CREATE TABLE `taxon_name` (
929
  `id` varbinary(767) NOT NULL,
930
  `unique_name` varbinary(767) NOT NULL,
931
  `formal_name` varbinary(767) DEFAULT NULL,
932
  `taxon_name` varbinary(767) DEFAULT NULL,
933
  `author` varbinary(767) DEFAULT NULL,
934
  `common_name` varbinary(767) DEFAULT NULL,
935
  `rank` varbinary(767) DEFAULT NULL,
936
  PRIMARY KEY (`id`),
937
  KEY `fk_taxon_concept_taxon_string10_idx` (`unique_name`),
938
  CONSTRAINT `fk_taxon_record10` FOREIGN KEY (`id`) REFERENCES `record` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
939
  CONSTRAINT `fk_taxon_concept_taxon_string10` FOREIGN KEY (`unique_name`) REFERENCES `taxon_string` (`string`) ON DELETE CASCADE ON UPDATE CASCADE
940
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
941
/*!40101 SET character_set_client = @saved_cs_client */;
942

    
943
--
944
-- Dumping data for table `taxon_name`
945
--
946

    
947
/*!40000 ALTER TABLE `taxon_name` DISABLE KEYS */;
948
/*!40000 ALTER TABLE `taxon_name` ENABLE KEYS */;
949

    
950
--
951
-- Table structure for table `taxon_observation`
952
--
953

    
954
/*!40101 SET @saved_cs_client     = @@character_set_client */;
955
/*!40101 SET character_set_client = utf8 */;
956
CREATE TABLE `taxon_observation` (
957
  `id` varbinary(767) NOT NULL,
958
  `taxon_occurrence` varbinary(767) NOT NULL,
959
  `collector` varbinary(767) DEFAULT NULL,
960
  `collector_number` varbinary(767) DEFAULT NULL,
961
  `voucher` varbinary(767) DEFAULT NULL,
962
  `growth_form` varbinary(767) DEFAULT NULL,
963
  `cultivated` tinyint(1) DEFAULT NULL,
964
  `traits` set('hstore') COLLATE utf8_bin DEFAULT NULL,
965
  PRIMARY KEY (`id`),
966
  KEY `fk_taxon_observation_taxon_occurrence2_idx` (`taxon_occurrence`),
967
  KEY `fk_taxon_observation_specimen1_idx` (`voucher`),
968
  KEY `fk_taxon_observation_party1_idx` (`collector`),
969
  CONSTRAINT `fk_taxon_observation_event1` FOREIGN KEY (`id`) REFERENCES `event` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
970
  CONSTRAINT `fk_taxon_observation_taxon_occurrence2` FOREIGN KEY (`taxon_occurrence`) REFERENCES `taxon_occurrence` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
971
  CONSTRAINT `fk_taxon_observation_specimen1` FOREIGN KEY (`voucher`) REFERENCES `specimen` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
972
  CONSTRAINT `fk_taxon_observation_party1` FOREIGN KEY (`collector`) REFERENCES `party` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
973
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
974
/*!40101 SET character_set_client = @saved_cs_client */;
975

    
976
--
977
-- Dumping data for table `taxon_observation`
978
--
979

    
980
/*!40000 ALTER TABLE `taxon_observation` DISABLE KEYS */;
981
/*!40000 ALTER TABLE `taxon_observation` ENABLE KEYS */;
982

    
983
--
984
-- Table structure for table `taxon_occurrence`
985
--
986

    
987
/*!40101 SET @saved_cs_client     = @@character_set_client */;
988
/*!40101 SET character_set_client = utf8 */;
989
CREATE TABLE `taxon_occurrence` (
990
  `id` varbinary(767) NOT NULL,
991
  `current_determination` varbinary(767) DEFAULT NULL,
992
  `original_determination` varbinary(767) DEFAULT NULL,
993
  PRIMARY KEY (`id`),
994
  KEY `fk_taxon_occurrence_taxon_determination1_idx` (`original_determination`),
995
  KEY `fk_taxon_occurrence_taxon_determination2_idx` (`current_determination`),
996
  CONSTRAINT `fk_taxon_occurrence_taxon_determination1` FOREIGN KEY (`original_determination`) REFERENCES `taxon_determination` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
997
  CONSTRAINT `fk_taxon_occurrence_taxon_determination2` FOREIGN KEY (`current_determination`) REFERENCES `taxon_determination` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
998
  CONSTRAINT `fk_taxon_occurrence_event1` FOREIGN KEY (`id`) REFERENCES `record` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
999
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Any entity on which [[VegCore#TaxonDetermination|TaxonDetermination]]s can be made';
1000
/*!40101 SET character_set_client = @saved_cs_client */;
1001

    
1002
--
1003
-- Dumping data for table `taxon_occurrence`
1004
--
1005

    
1006
/*!40000 ALTER TABLE `taxon_occurrence` DISABLE KEYS */;
1007
/*!40000 ALTER TABLE `taxon_occurrence` ENABLE KEYS */;
1008

    
1009
--
1010
-- Table structure for table `taxon_path`
1011
--
1012

    
1013
/*!40101 SET @saved_cs_client     = @@character_set_client */;
1014
/*!40101 SET character_set_client = utf8 */;
1015
CREATE TABLE `taxon_path` (
1016
  `id` varbinary(767) NOT NULL,
1017
  `family` varbinary(767) DEFAULT NULL,
1018
  `genus` varbinary(767) DEFAULT NULL,
1019
  `specific_epithet` varbinary(767) DEFAULT NULL,
1020
  `ranks` set('hstore') COLLATE utf8_bin DEFAULT NULL,
1021
  PRIMARY KEY (`id`),
1022
  CONSTRAINT `fk_taxon_path_taxon_name1` FOREIGN KEY (`id`) REFERENCES `taxon_name` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
1023
) 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)';
1024
/*!40101 SET character_set_client = @saved_cs_client */;
1025

    
1026
--
1027
-- Dumping data for table `taxon_path`
1028
--
1029

    
1030
/*!40000 ALTER TABLE `taxon_path` DISABLE KEYS */;
1031
/*!40000 ALTER TABLE `taxon_path` ENABLE KEYS */;
1032

    
1033
--
1034
-- Table structure for table `taxon_presence`
1035
--
1036

    
1037
/*!40101 SET @saved_cs_client     = @@character_set_client */;
1038
/*!40101 SET character_set_client = utf8 */;
1039
CREATE TABLE `taxon_presence` (
1040
  `id` varbinary(767) NOT NULL,
1041
  `taxon_concept` varbinary(767) NOT NULL,
1042
  `traits` set('hstore') COLLATE utf8_bin DEFAULT NULL,
1043
  PRIMARY KEY (`id`),
1044
  KEY `fk_taxon_presence_taxon_name1_idx` (`taxon_concept`),
1045
  CONSTRAINT `fk_taxon_observation_taxon_occurrence1` FOREIGN KEY (`id`) REFERENCES `taxon_observation` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
1046
  CONSTRAINT `fk_taxon_presence_taxon_name1` FOREIGN KEY (`taxon_concept`) REFERENCES `taxon_concept` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
1047
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='An observation of just a [[VegCore#Taxon|Taxon]]''s _presence_';
1048
/*!40101 SET character_set_client = @saved_cs_client */;
1049

    
1050
--
1051
-- Dumping data for table `taxon_presence`
1052
--
1053

    
1054
/*!40000 ALTER TABLE `taxon_presence` DISABLE KEYS */;
1055
/*!40000 ALTER TABLE `taxon_presence` ENABLE KEYS */;
1056

    
1057
--
1058
-- Table structure for table `taxon_string`
1059
--
1060

    
1061
/*!40101 SET @saved_cs_client     = @@character_set_client */;
1062
/*!40101 SET character_set_client = utf8 */;
1063
CREATE TABLE `taxon_string` (
1064
  `string` varbinary(767) NOT NULL,
1065
  PRIMARY KEY (`string`)
1066
) 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)';
1067
/*!40101 SET character_set_client = @saved_cs_client */;
1068

    
1069
--
1070
-- Dumping data for table `taxon_string`
1071
--
1072

    
1073
/*!40000 ALTER TABLE `taxon_string` DISABLE KEYS */;
1074
/*!40000 ALTER TABLE `taxon_string` ENABLE KEYS */;
1075

    
1076
--
1077
-- Table structure for table `validatable_place`
1078
--
1079

    
1080
/*!40101 SET @saved_cs_client     = @@character_set_client */;
1081
/*!40101 SET character_set_client = utf8 */;
1082
CREATE TABLE `validatable_place` (
1083
  `id` varbinary(767) NOT NULL,
1084
  `coordinates` varbinary(767) NOT NULL,
1085
  `path` varbinary(767) NOT NULL,
1086
  PRIMARY KEY (`id`),
1087
  UNIQUE KEY `validatable_place_unique` (`path`,`coordinates`),
1088
  KEY `fk_geovalidation_place_path1_idx` (`path`),
1089
  KEY `fk_geovalidation_coordinates1_idx` (`coordinates`),
1090
  CONSTRAINT `fk_geovalidation_place_path1` FOREIGN KEY (`path`) REFERENCES `place_path` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
1091
  CONSTRAINT `fk_geovalidation_coordinates1` FOREIGN KEY (`coordinates`) REFERENCES `coordinates` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
1092
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
1093
/*!40101 SET character_set_client = @saved_cs_client */;
1094

    
1095
--
1096
-- Dumping data for table `validatable_place`
1097
--
1098

    
1099
/*!40000 ALTER TABLE `validatable_place` DISABLE KEYS */;
1100
/*!40000 ALTER TABLE `validatable_place` ENABLE KEYS */;
1101
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
1102

    
1103
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
1104
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
1105
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
1106
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
1107
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
1108
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
1109
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
1110

    
1111
-- Dump completed
(8-8/14)