Project

General

Profile

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