-- MySQL dump 10.13 Distrib 5.5.32, for debian-linux-gnu (x86_64) -- -- Host: localhost Database: VegCore -- ------------------------------------------------------ -- Server version 5.5.32-0ubuntu0.12.04.1 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; /*!40101 SET NAMES utf8 */; /*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; /*!40103 SET TIME_ZONE='+00:00' */; /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; /*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; /*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; /*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; -- -- Table structure for table `aggregate_observation` -- /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `aggregate_observation` ( `id` varbinary(767) NOT NULL, `traits` set('hstore') COLLATE utf8_bin DEFAULT NULL, PRIMARY KEY (`id`), CONSTRAINT `fk_aggregate_observation_taxon_presence1` FOREIGN KEY (`id`) REFERENCES `taxon_presence` (`id`) ON DELETE CASCADE ON UPDATE CASCADE ) 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)'; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Dumping data for table `aggregate_observation` -- /*!40000 ALTER TABLE `aggregate_observation` DISABLE KEYS */; /*!40000 ALTER TABLE `aggregate_observation` ENABLE KEYS */; -- -- Table structure for table `base_class` -- /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `base_class` ( `id` varbinary(767) NOT NULL, `referenced_class` varbinary(767) NOT NULL, PRIMARY KEY (`id`), KEY `fk_base_class_referenced_class1_idx` (`referenced_class`), CONSTRAINT `fk_base_class_referenced_class1` FOREIGN KEY (`referenced_class`) REFERENCES `referenced_class` (`id`) ON DELETE CASCADE ON UPDATE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Dumping data for table `base_class` -- /*!40000 ALTER TABLE `base_class` DISABLE KEYS */; /*!40000 ALTER TABLE `base_class` ENABLE KEYS */; -- -- Table structure for table `collection` -- /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `collection` ( `id` varbinary(767) NOT NULL, `institution` varbinary(767) NOT NULL, `name` varbinary(767) NOT NULL, PRIMARY KEY (`id`), UNIQUE KEY `collection_unique` (`institution`,`name`), KEY `fk_collection_organization1_idx` (`institution`), KEY `fk_collection_source1_idx` (`id`), CONSTRAINT `fk_collection_source1` FOREIGN KEY (`id`) REFERENCES `record` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `fk_collection_organization1` FOREIGN KEY (`institution`) REFERENCES `organization` (`id`) ON DELETE CASCADE ON UPDATE CASCADE ) 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)'; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Dumping data for table `collection` -- /*!40000 ALTER TABLE `collection` DISABLE KEYS */; /*!40000 ALTER TABLE `collection` ENABLE KEYS */; -- -- Table structure for table `community` -- /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `community` ( `id` varbinary(767) NOT NULL, `name` varbinary(767) NOT NULL, `info` set('hstore') COLLATE utf8_bin DEFAULT NULL, PRIMARY KEY (`id`), CONSTRAINT `fk_community_record1` FOREIGN KEY (`id`) REFERENCES `record` (`id`) ON DELETE CASCADE ON UPDATE CASCADE ) 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]])'; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Dumping data for table `community` -- /*!40000 ALTER TABLE `community` DISABLE KEYS */; /*!40000 ALTER TABLE `community` ENABLE KEYS */; -- -- Table structure for table `derived_class` -- /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `derived_class` ( `id` varbinary(767) NOT NULL, PRIMARY KEY (`id`), CONSTRAINT `fk_derived_class_base_class1` FOREIGN KEY (`id`) REFERENCES `base_class` (`id`) ON DELETE CASCADE ON UPDATE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Dumping data for table `derived_class` -- /*!40000 ALTER TABLE `derived_class` DISABLE KEYS */; /*!40000 ALTER TABLE `derived_class` ENABLE KEYS */; -- -- Table structure for table `event` -- /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `event` ( `id` varbinary(767) NOT NULL, `parent` varbinary(767) NOT NULL, `name` varbinary(767) DEFAULT NULL, `date_range` varbinary(767) DEFAULT NULL, `place` varbinary(767) DEFAULT NULL, `participants` varbinary(767) DEFAULT NULL, PRIMARY KEY (`id`), KEY `fk_event_place1_idx` (`place`), KEY `fk_event1_idx` (`parent`), KEY `fk_event_party_list1_idx` (`participants`), CONSTRAINT `fk_event_party_list1` FOREIGN KEY (`participants`) REFERENCES `party_list` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `fk_event1` FOREIGN KEY (`parent`) REFERENCES `event` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `fk_event_place1` FOREIGN KEY (`place`) REFERENCES `place` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `fk_event_record1` FOREIGN KEY (`id`) REFERENCES `record` (`id`) ON DELETE CASCADE ON UPDATE CASCADE ) 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)'; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Dumping data for table `event` -- /*!40000 ALTER TABLE `event` DISABLE KEYS */; /*!40000 ALTER TABLE `event` ENABLE KEYS */; -- -- Table structure for table `geocoords` -- /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `geocoords` ( `id` varbinary(767) NOT NULL, `latitude_deg` varbinary(767) NOT NULL, `longitude_deg` varbinary(767) NOT NULL, PRIMARY KEY (`id`), KEY `geocoords_unique` (`latitude_deg`,`longitude_deg`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='A numerically-defined point'; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Dumping data for table `geocoords` -- /*!40000 ALTER TABLE `geocoords` DISABLE KEYS */; /*!40000 ALTER TABLE `geocoords` ENABLE KEYS */; -- -- Table structure for table `geological_context` -- /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `geological_context` ( `id` varbinary(767) NOT NULL, `name` varbinary(767) NOT NULL, `info` set('hstore') COLLATE utf8_bin DEFAULT NULL, PRIMARY KEY (`id`), CONSTRAINT `fk_geological_context_record1` FOREIGN KEY (`id`) REFERENCES `record` (`id`) ON DELETE CASCADE ON UPDATE CASCADE ) 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)'; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Dumping data for table `geological_context` -- /*!40000 ALTER TABLE `geological_context` DISABLE KEYS */; /*!40000 ALTER TABLE `geological_context` ENABLE KEYS */; -- -- Table structure for table `geopath` -- /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `geopath` ( `id` varbinary(767) NOT NULL, `continent` varbinary(767) DEFAULT NULL, `country` varbinary(767) NOT NULL, `state_province` varbinary(767) DEFAULT NULL, `county` varbinary(767) DEFAULT NULL, `municipality` varbinary(767) DEFAULT NULL, `ranks` set('hstore') COLLATE utf8_bin DEFAULT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='A named region'; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Dumping data for table `geopath` -- /*!40000 ALTER TABLE `geopath` DISABLE KEYS */; /*!40000 ALTER TABLE `geopath` ENABLE KEYS */; -- -- Table structure for table `geoplace` -- /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `geoplace` ( `id` varbinary(767) NOT NULL, `geocoords` varbinary(767) NOT NULL, `geopath` varbinary(767) NOT NULL, PRIMARY KEY (`id`), UNIQUE KEY `validatable_place_unique` (`geopath`,`geocoords`), KEY `fk_geovalidation_place_path1_idx` (`geopath`), KEY `fk_geovalidation_coordinates1_idx` (`geocoords`), CONSTRAINT `fk_geovalidation_place_path1` FOREIGN KEY (`geopath`) REFERENCES `geopath` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `fk_geovalidation_coordinates1` FOREIGN KEY (`geocoords`) REFERENCES `geocoords` (`id`) ON DELETE CASCADE ON UPDATE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Dumping data for table `geoplace` -- /*!40000 ALTER TABLE `geoplace` DISABLE KEYS */; /*!40000 ALTER TABLE `geoplace` ENABLE KEYS */; -- -- Table structure for table `geovalidation` -- /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `geovalidation` ( `id` varbinary(767) NOT NULL, `input_geoplace` varbinary(767) NOT NULL, `scrubbed_geoplace` varbinary(767) NOT NULL, `geovalid` tinyint(1) NOT NULL, `lat_long_domain_valid` tinyint(1) NOT NULL, `lat_long_in_place_ranks` set('hstore') COLLATE utf8_bin DEFAULT NULL, PRIMARY KEY (`id`), KEY `fk_geovalidation_geoplace1_idx` (`input_geoplace`), KEY `fk_geovalidation_geoplace2_idx` (`scrubbed_geoplace`), CONSTRAINT `fk_geovalidation_record1` FOREIGN KEY (`id`) REFERENCES `record` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `fk_geovalidation_geoplace1` FOREIGN KEY (`input_geoplace`) REFERENCES `geoplace` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `fk_geovalidation_geoplace2` FOREIGN KEY (`scrubbed_geoplace`) REFERENCES `geoplace` (`id`) ON DELETE CASCADE ON UPDATE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='The accuracy of the [[VegCore#Coordinates|Coordinates]], taking into account the [[VegCore#Placename|Placename]]'; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Dumping data for table `geovalidation` -- /*!40000 ALTER TABLE `geovalidation` DISABLE KEYS */; /*!40000 ALTER TABLE `geovalidation` ENABLE KEYS */; -- -- Table structure for table `individual` -- /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `individual` ( `id` varbinary(767) NOT NULL, `tag` varbinary(767) DEFAULT NULL, `tag_history` set('hstore') COLLATE utf8_bin DEFAULT NULL, PRIMARY KEY (`id`), CONSTRAINT `fk_individual_record1` FOREIGN KEY (`id`) REFERENCES `taxon_occurrence` (`id`) ON DELETE CASCADE ON UPDATE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='A distinct biological organism'; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Dumping data for table `individual` -- /*!40000 ALTER TABLE `individual` DISABLE KEYS */; /*!40000 ALTER TABLE `individual` ENABLE KEYS */; -- -- Table structure for table `individual_observation` -- /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `individual_observation` ( `id` varbinary(767) NOT NULL, `individual` varbinary(767) DEFAULT NULL, `code` varbinary(767) DEFAULT NULL, `traits` set('hstore') COLLATE utf8_bin DEFAULT NULL, PRIMARY KEY (`id`), KEY `fk_individual_observation_individual1_idx` (`individual`), CONSTRAINT `fk_individual_observation_individual1` FOREIGN KEY (`individual`) REFERENCES `individual` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `fk_individual_observation_taxon_occurrence1` FOREIGN KEY (`id`) REFERENCES `taxon_observation` (`id`) ON DELETE CASCADE ON UPDATE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='An observation of an [[VegCore#Individual|Individual]]'; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Dumping data for table `individual_observation` -- /*!40000 ALTER TABLE `individual_observation` DISABLE KEYS */; /*!40000 ALTER TABLE `individual_observation` ENABLE KEYS */; -- -- Table structure for table `method` -- /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `method` ( `id` varbinary(767) NOT NULL, `parent` varbinary(767) NOT NULL, `info` set('hstore') COLLATE utf8_bin DEFAULT NULL, PRIMARY KEY (`id`), KEY `fk_method_method1_idx` (`parent`), CONSTRAINT `fk_method_record1` FOREIGN KEY (`id`) REFERENCES `record` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `fk_method_method1` FOREIGN KEY (`parent`) REFERENCES `method` (`id`) ON DELETE CASCADE ON UPDATE CASCADE ) 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)'; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Dumping data for table `method` -- /*!40000 ALTER TABLE `method` DISABLE KEYS */; /*!40000 ALTER TABLE `method` ENABLE KEYS */; -- -- Table structure for table `organization` -- /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `organization` ( `id` varbinary(767) NOT NULL, `info` set('hstore') COLLATE utf8_bin DEFAULT NULL, PRIMARY KEY (`id`), CONSTRAINT `fk_organization_party1` FOREIGN KEY (`id`) REFERENCES `party` (`id`) ON DELETE CASCADE ON UPDATE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Dumping data for table `organization` -- /*!40000 ALTER TABLE `organization` DISABLE KEYS */; /*!40000 ALTER TABLE `organization` ENABLE KEYS */; -- -- Table structure for table `party` -- /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `party` ( `id` varbinary(767) NOT NULL, `organization` varbinary(767) DEFAULT NULL, `info` set('hstore') COLLATE utf8_bin DEFAULT NULL, PRIMARY KEY (`id`), KEY `fk_party_organization1_idx` (`organization`), CONSTRAINT `fk_party_organization1` FOREIGN KEY (`organization`) REFERENCES `organization` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `fk_collection_source10` FOREIGN KEY (`id`) REFERENCES `record` (`id`) ON DELETE CASCADE ON UPDATE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Dumping data for table `party` -- /*!40000 ALTER TABLE `party` DISABLE KEYS */; /*!40000 ALTER TABLE `party` ENABLE KEYS */; -- -- Table structure for table `party_list` -- /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `party_list` ( `id` varbinary(767) NOT NULL, `count` int(11) NOT NULL, PRIMARY KEY (`id`), CONSTRAINT `fk_collection_source100` FOREIGN KEY (`id`) REFERENCES `record` (`id`) ON DELETE CASCADE ON UPDATE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Dumping data for table `party_list` -- /*!40000 ALTER TABLE `party_list` DISABLE KEYS */; /*!40000 ALTER TABLE `party_list` ENABLE KEYS */; -- -- Table structure for table `party_list_entry` -- /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `party_list_entry` ( `id` varbinary(767) NOT NULL, `entry` varbinary(767) NOT NULL, `sort_order` int(11) DEFAULT NULL, PRIMARY KEY (`id`,`entry`), KEY `fk_party_list_has_party_party1_idx` (`entry`), KEY `fk_party_list_has_party_party_list1_idx` (`id`), CONSTRAINT `fk_party_list_has_party_party_list1` FOREIGN KEY (`id`) REFERENCES `party_list` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `fk_party_list_has_party_party1` FOREIGN KEY (`entry`) REFERENCES `party` (`id`) ON DELETE CASCADE ON UPDATE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Dumping data for table `party_list_entry` -- /*!40000 ALTER TABLE `party_list_entry` DISABLE KEYS */; /*!40000 ALTER TABLE `party_list_entry` ENABLE KEYS */; -- -- Table structure for table `place` -- /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `place` ( `id` varbinary(767) NOT NULL, `parent` varbinary(767) NOT NULL, `geocoords` varbinary(767) DEFAULT NULL, `geopath` varbinary(767) DEFAULT NULL, `locality` varbinary(767) DEFAULT NULL, `coords` set('hstore') COLLATE utf8_bin DEFAULT NULL COMMENT 'for verbatim coordinates, etc.', PRIMARY KEY (`id`), KEY `fk_place_coordinates1_idx` (`geocoords`), KEY `fk_place1_idx` (`parent`), KEY `fk_place_place_path1_idx` (`geopath`), CONSTRAINT `fk_place_record1` FOREIGN KEY (`id`) REFERENCES `record` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `fk_place_coordinates1` FOREIGN KEY (`geocoords`) REFERENCES `geocoords` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `fk_place1` FOREIGN KEY (`parent`) REFERENCES `place` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `fk_place_place_path1` FOREIGN KEY (`geopath`) REFERENCES `geopath` (`id`) ON DELETE CASCADE ON UPDATE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='"A spatial region" ("DwC":http://rs.tdwg.org/dwc/terms/#dcterms:Location) or point'; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Dumping data for table `place` -- /*!40000 ALTER TABLE `place` DISABLE KEYS */; /*!40000 ALTER TABLE `place` ENABLE KEYS */; -- -- Table structure for table `place_observation` -- /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `place_observation` ( `id` varbinary(767) NOT NULL, `place` varbinary(767) NOT NULL, `elevation_m` double DEFAULT NULL, `slope_incline_deg` double DEFAULT NULL, `slope_direction_deg_N` double DEFAULT NULL, `geological_context` varbinary(767) DEFAULT NULL, `community` varbinary(767) DEFAULT NULL, `observations` set('hstore') COLLATE utf8_bin DEFAULT NULL, PRIMARY KEY (`id`), KEY `fk_place_observation_place1_idx` (`place`), KEY `fk_place_observation_geological_context1_idx` (`geological_context`), KEY `fk_place_observation_community1_idx` (`community`), CONSTRAINT `fk_place_observation_place1` FOREIGN KEY (`place`) REFERENCES `place` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `fk_place_observation_geological_context1` FOREIGN KEY (`geological_context`) REFERENCES `geological_context` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `fk_place_observation_community1` FOREIGN KEY (`community`) REFERENCES `community` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `fk_place_observation_sampling_event1` FOREIGN KEY (`id`) REFERENCES `sampling_event` (`id`) ON DELETE CASCADE ON UPDATE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='A sampling of a [[VegCore#Location|Location]]'; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Dumping data for table `place_observation` -- /*!40000 ALTER TABLE `place_observation` DISABLE KEYS */; /*!40000 ALTER TABLE `place_observation` ENABLE KEYS */; -- -- Table structure for table `plot` -- /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `plot` ( `id` varbinary(767) NOT NULL, `name` varbinary(767) DEFAULT NULL, `area_m2` double DEFAULT NULL, `shape` varbinary(767) DEFAULT NULL, `bounding_box_rect` varbinary(767) DEFAULT NULL, `footprint_geom_WKT` varbinary(767) DEFAULT NULL, `dimensions` set('hstore') COLLATE utf8_bin DEFAULT NULL, PRIMARY KEY (`id`), CONSTRAINT `fk_subplot_place1` FOREIGN KEY (`id`) REFERENCES `place` (`id`) ON DELETE CASCADE ON UPDATE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Dumping data for table `plot` -- /*!40000 ALTER TABLE `plot` DISABLE KEYS */; /*!40000 ALTER TABLE `plot` ENABLE KEYS */; -- -- Table structure for table `project` -- /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `project` ( `id` varbinary(767) NOT NULL, `name` varbinary(767) NOT NULL, `info` set('hstore') COLLATE utf8_bin DEFAULT NULL, PRIMARY KEY (`id`), CONSTRAINT `fk_project_event1` FOREIGN KEY (`id`) REFERENCES `event` (`id`) ON DELETE CASCADE ON UPDATE CASCADE ) 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)'; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Dumping data for table `project` -- /*!40000 ALTER TABLE `project` DISABLE KEYS */; /*!40000 ALTER TABLE `project` ENABLE KEYS */; -- -- Table structure for table `record` -- /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `record` ( `id` varbinary(767) NOT NULL, `source` varbinary(767) NOT NULL, `source_id_scope` varbinary(767) DEFAULT NULL, `source_record_id` varbinary(767) DEFAULT NULL, `info` set('hstore') COLLATE utf8_bin DEFAULT NULL, PRIMARY KEY (`id`), UNIQUE KEY `record_unique` (`source`,`source_id_scope`,`source_record_id`), KEY `fk_record_source1_idx` (`source`), CONSTRAINT `fk_record_source1` FOREIGN KEY (`source`) REFERENCES `source` (`id`) ON DELETE CASCADE ON UPDATE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Dumping data for table `record` -- /*!40000 ALTER TABLE `record` DISABLE KEYS */; /*!40000 ALTER TABLE `record` ENABLE KEYS */; -- -- Table structure for table `referenced_class` -- /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `referenced_class` ( `id` varbinary(767) NOT NULL, PRIMARY KEY (`id`), CONSTRAINT `fk_example_record10` FOREIGN KEY (`id`) REFERENCES `record` (`id`) ON DELETE CASCADE ON UPDATE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Dumping data for table `referenced_class` -- /*!40000 ALTER TABLE `referenced_class` DISABLE KEYS */; /*!40000 ALTER TABLE `referenced_class` ENABLE KEYS */; -- -- Table structure for table `relationship` -- /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `relationship` ( `id` varbinary(767) NOT NULL, `record` varbinary(767) NOT NULL, `related_record` varbinary(767) NOT NULL, `info` set('hstore') COLLATE utf8_bin DEFAULT NULL, PRIMARY KEY (`id`), KEY `fk_relationship_record1_idx` (`record`), KEY `fk_relationship_related_record_idx` (`related_record`), CONSTRAINT `fk_relationship_record1` FOREIGN KEY (`id`) REFERENCES `record` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `fk_relationship_record2` FOREIGN KEY (`record`) REFERENCES `record` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `fk_relationship_related_record` FOREIGN KEY (`related_record`) REFERENCES `record` (`id`) ON DELETE CASCADE ON UPDATE CASCADE ) 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)'; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Dumping data for table `relationship` -- /*!40000 ALTER TABLE `relationship` DISABLE KEYS */; /*!40000 ALTER TABLE `relationship` ENABLE KEYS */; -- -- Table structure for table `sampling_event` -- /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `sampling_event` ( `id` varbinary(767) NOT NULL, `method` varbinary(767) DEFAULT NULL, PRIMARY KEY (`id`), KEY `fk_sampling_event_method1_idx` (`method`), CONSTRAINT `fk_sampling_event_method1` FOREIGN KEY (`method`) REFERENCES `method` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `fk_project_event10` FOREIGN KEY (`id`) REFERENCES `event` (`id`) ON DELETE CASCADE ON UPDATE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Dumping data for table `sampling_event` -- /*!40000 ALTER TABLE `sampling_event` DISABLE KEYS */; /*!40000 ALTER TABLE `sampling_event` ENABLE KEYS */; -- -- Table structure for table `soil_observation` -- /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `soil_observation` ( `id` varbinary(767) NOT NULL, `observations` set('hstore') COLLATE utf8_bin DEFAULT NULL, PRIMARY KEY (`id`), CONSTRAINT `fk_soil_observation_place_observation1` FOREIGN KEY (`id`) REFERENCES `place_observation` (`id`) ON DELETE CASCADE ON UPDATE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='A sampling of a [[VegCore#Location|Location]]''s soil'; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Dumping data for table `soil_observation` -- /*!40000 ALTER TABLE `soil_observation` DISABLE KEYS */; /*!40000 ALTER TABLE `soil_observation` ENABLE KEYS */; -- -- Table structure for table `source` -- /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `source` ( `id` varbinary(767) NOT NULL, `parent` varbinary(767) NOT NULL, `name` varbinary(767) NOT NULL, `first_publisher` varbinary(767) DEFAULT NULL, `owner` varbinary(767) DEFAULT NULL, `info` set('hstore') COLLATE utf8_bin DEFAULT NULL, PRIMARY KEY (`id`), UNIQUE KEY `source_unique` (`parent`,`name`), KEY `fk_source1_idx` (`parent`), KEY `fk_source_party1_idx` (`owner`), KEY `fk_source_party2_idx` (`first_publisher`), CONSTRAINT `fk_source1` FOREIGN KEY (`parent`) REFERENCES `source` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `fk_source_party1` FOREIGN KEY (`owner`) REFERENCES `party` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `fk_source_party2` FOREIGN KEY (`first_publisher`) REFERENCES `party` (`id`) ON DELETE CASCADE ON UPDATE CASCADE ) 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)'; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Dumping data for table `source` -- /*!40000 ALTER TABLE `source` DISABLE KEYS */; /*!40000 ALTER TABLE `source` ENABLE KEYS */; -- -- Table structure for table `specimen` -- /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `specimen` ( `id` varbinary(767) NOT NULL, `individual` varbinary(767) DEFAULT NULL, `code_in_individual` varbinary(767) DEFAULT NULL, `collection_event` varbinary(767) DEFAULT NULL, `orig_collection` varbinary(767) DEFAULT NULL, `barcode` varbinary(767) DEFAULT NULL, `accession_number` varbinary(767) DEFAULT NULL, `specimenholder_institutions` varbinary(767) DEFAULT NULL, `current_collection` varbinary(767) DEFAULT NULL, `owner_collection` varbinary(767) DEFAULT NULL, PRIMARY KEY (`id`), UNIQUE KEY `specimen_unique_in_individual` (`individual`,`code_in_individual`), UNIQUE KEY `specimen_unique_by_collection_event` (`collection_event`), UNIQUE KEY `specimen_unique_in_collection_by_barcode` (`orig_collection`,`barcode`), UNIQUE KEY `specimen_unique_in_collection_by_accession_number` (`orig_collection`,`accession_number`), KEY `fk_specimen_collection1_idx` (`orig_collection`), KEY `fk_specimen_taxon_observation1_idx` (`collection_event`), KEY `fk_specimen_individual1_idx` (`individual`), KEY `fk_specimen_collection2_idx` (`current_collection`), KEY `fk_specimen_organization3_idx` (`owner_collection`), KEY `fk_specimen_party_list1_idx` (`specimenholder_institutions`), CONSTRAINT `fk_specimen_organization3` FOREIGN KEY (`owner_collection`) REFERENCES `collection` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `fk_specimen_taxon_observation1` FOREIGN KEY (`collection_event`) REFERENCES `taxon_observation` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `fk_specimen_individual1` FOREIGN KEY (`individual`) REFERENCES `individual` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `fk_specimen_collection2` FOREIGN KEY (`current_collection`) REFERENCES `collection` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `fk_specimen_party_list1` FOREIGN KEY (`specimenholder_institutions`) REFERENCES `party_list` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `fk_specimen_collection1` FOREIGN KEY (`orig_collection`) REFERENCES `collection` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `fk_specimen_taxon_occurrence1` FOREIGN KEY (`id`) REFERENCES `taxon_occurrence` (`id`) ON DELETE CASCADE ON UPDATE CASCADE ) 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'; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Dumping data for table `specimen` -- /*!40000 ALTER TABLE `specimen` DISABLE KEYS */; /*!40000 ALTER TABLE `specimen` ENABLE KEYS */; -- -- Table structure for table `specimen_observation` -- /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `specimen_observation` ( `id` varbinary(767) NOT NULL, `specimen` varbinary(767) NOT NULL, `traits` set('hstore') COLLATE utf8_bin DEFAULT NULL, PRIMARY KEY (`id`), KEY `fk_specimen_observation_specimen1_idx` (`specimen`), CONSTRAINT `fk_specimen_taxon_occurrence10` FOREIGN KEY (`id`) REFERENCES `taxon_observation` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `fk_specimen_observation_specimen1` FOREIGN KEY (`specimen`) REFERENCES `specimen` (`id`) ON DELETE CASCADE ON UPDATE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Dumping data for table `specimen_observation` -- /*!40000 ALTER TABLE `specimen_observation` DISABLE KEYS */; /*!40000 ALTER TABLE `specimen_observation` ENABLE KEYS */; -- -- Table structure for table `stem` -- /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `stem` ( `id` varbinary(767) NOT NULL, `individual` varbinary(767) NOT NULL, PRIMARY KEY (`id`), KEY `fk_stem_individual1_idx` (`individual`), CONSTRAINT `fk_stem_individual1` FOREIGN KEY (`individual`) REFERENCES `individual` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `fk_stem_individual2` FOREIGN KEY (`id`) REFERENCES `individual` (`id`) ON DELETE CASCADE ON UPDATE CASCADE ) 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)'; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Dumping data for table `stem` -- /*!40000 ALTER TABLE `stem` DISABLE KEYS */; /*!40000 ALTER TABLE `stem` ENABLE KEYS */; -- -- Table structure for table `stem_observation` -- /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `stem_observation` ( `id` varbinary(767) NOT NULL, `individual_observation` varbinary(767) NOT NULL, `stem` varbinary(767) DEFAULT NULL, `traits` set('hstore') COLLATE utf8_bin DEFAULT NULL, PRIMARY KEY (`id`), UNIQUE KEY `stem_observation_unique` (`individual_observation`,`stem`), KEY `fk_stem_observation_individual_observation1_idx` (`individual_observation`), KEY `fk_stem_observation_stem1_idx` (`stem`), CONSTRAINT `fk_stem_observation_stem1` FOREIGN KEY (`stem`) REFERENCES `stem` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `fk_stem_observation_individual_observation1` FOREIGN KEY (`individual_observation`) REFERENCES `individual_observation` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `fk_stem_observation_individual_observation2` FOREIGN KEY (`id`) REFERENCES `individual_observation` (`id`) ON DELETE CASCADE ON UPDATE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='An observation of a [[VegCore#Stem|Stem]]'; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Dumping data for table `stem_observation` -- /*!40000 ALTER TABLE `stem_observation` DISABLE KEYS */; /*!40000 ALTER TABLE `stem_observation` ENABLE KEYS */; -- -- Table structure for table `stratum` -- /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `stratum` ( `id` varbinary(767) NOT NULL, `name` varbinary(767) NOT NULL, `info` set('hstore') COLLATE utf8_bin DEFAULT NULL, PRIMARY KEY (`id`), CONSTRAINT `fk_place_path_record10` FOREIGN KEY (`id`) REFERENCES `method` (`id`) ON DELETE CASCADE ON UPDATE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Dumping data for table `stratum` -- /*!40000 ALTER TABLE `stratum` DISABLE KEYS */; /*!40000 ALTER TABLE `stratum` ENABLE KEYS */; -- -- Table structure for table `subplot` -- /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `subplot` ( `id` varbinary(767) NOT NULL, `x_m` double DEFAULT NULL, `y_m` double DEFAULT NULL, `coords` set('hstore') COLLATE utf8_bin DEFAULT NULL, PRIMARY KEY (`id`), CONSTRAINT `fk_subplot_plot1` FOREIGN KEY (`id`) REFERENCES `plot` (`id`) ON DELETE CASCADE ON UPDATE CASCADE ) 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)'; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Dumping data for table `subplot` -- /*!40000 ALTER TABLE `subplot` DISABLE KEYS */; /*!40000 ALTER TABLE `subplot` ENABLE KEYS */; -- -- Table structure for table `taxon_absence` -- /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `taxon_absence` ( `id` varbinary(767) NOT NULL, `taxon_concept` varbinary(767) NOT NULL, PRIMARY KEY (`id`), KEY `fk_taxon_presence_taxon_name1_idx` (`taxon_concept`), CONSTRAINT `fk_taxon_observation_taxon_occurrence10` FOREIGN KEY (`id`) REFERENCES `taxon_observation` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `fk_taxon_presence_taxon_name10` FOREIGN KEY (`taxon_concept`) REFERENCES `taxon_concept` (`id`) ON DELETE CASCADE ON UPDATE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='An observation that a [[VegCore#Taxon|Taxon]]''s does _not_ exist in a place'; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Dumping data for table `taxon_absence` -- /*!40000 ALTER TABLE `taxon_absence` DISABLE KEYS */; /*!40000 ALTER TABLE `taxon_absence` ENABLE KEYS */; -- -- Table structure for table `taxon_assertion` -- /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `taxon_assertion` ( `id` varbinary(767) NOT NULL, `string` varbinary(767) NOT NULL COMMENT 'for parsed_taxon_assertion, this is the TNRS input name, not the concatenated matched name', `taxon` varbinary(767) DEFAULT NULL, `cf_aff` varbinary(767) DEFAULT NULL, `annotations` set('hstore') COLLATE utf8_bin DEFAULT NULL, PRIMARY KEY (`id`), KEY `fk_taxon_assertion_taxon_string1_idx` (`string`), KEY `fk_taxon_assertion_taxon_name1_idx` (`taxon`), CONSTRAINT `fk_qualified_taxon_record1` FOREIGN KEY (`id`) REFERENCES `record` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `fk_taxon_assertion_taxon_string1` FOREIGN KEY (`string`) REFERENCES `taxon_string` (`string`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `fk_taxon_assertion_taxon_name1` FOREIGN KEY (`taxon`) REFERENCES `taxon_name` (`id`) ON DELETE CASCADE ON UPDATE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Dumping data for table `taxon_assertion` -- /*!40000 ALTER TABLE `taxon_assertion` DISABLE KEYS */; /*!40000 ALTER TABLE `taxon_assertion` ENABLE KEYS */; -- -- Table structure for table `taxon_concept` -- /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `taxon_concept` ( `id` varbinary(767) NOT NULL, `according_to` varbinary(767) NOT NULL, `parent` varbinary(767) NOT NULL, `accepted_taxon_concept` varbinary(767) DEFAULT NULL, PRIMARY KEY (`id`), UNIQUE KEY `taxon_concept_unique_name` (`according_to`), KEY `fk_taxon_taxon1_idx` (`parent`), KEY `fk_taxon_concept_source1_idx` (`according_to`), KEY `fk_taxon_concept_taxon_concept1_idx` (`accepted_taxon_concept`), CONSTRAINT `fk_taxon_taxon1` FOREIGN KEY (`parent`) REFERENCES `taxon_concept` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `fk_taxon_concept_source1` FOREIGN KEY (`according_to`) REFERENCES `source` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `fk_taxon_concept_taxon_concept1` FOREIGN KEY (`accepted_taxon_concept`) REFERENCES `taxon_concept` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `fk_taxon_concept_taxon_name1` FOREIGN KEY (`id`) REFERENCES `taxon_name` (`id`) ON DELETE CASCADE ON UPDATE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='A [[VegCore#Taxon|Taxon]] described by a specific [[VegCore#Reference|Reference]]'; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Dumping data for table `taxon_concept` -- /*!40000 ALTER TABLE `taxon_concept` DISABLE KEYS */; /*!40000 ALTER TABLE `taxon_concept` ENABLE KEYS */; -- -- Table structure for table `taxon_determination` -- /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `taxon_determination` ( `id` varbinary(767) NOT NULL, `taxon_observation` varbinary(767) NOT NULL, `identified_by` varbinary(767) DEFAULT NULL, `taxon_assertion` varbinary(767) NOT NULL, `fit_info` set('hstore') COLLATE utf8_bin DEFAULT NULL, PRIMARY KEY (`id`), UNIQUE KEY `taxon_determination_unique` (`taxon_assertion`,`identified_by`), KEY `fk_taxon_occurrence_has_qualified_taxon1_idx` (`taxon_assertion`), KEY `fk_taxon_determination_party_list1_idx` (`identified_by`), KEY `fk_taxon_determination_taxon_observation1_idx` (`taxon_observation`), CONSTRAINT `fk_taxon_occurrence_has_qualified_taxon1` FOREIGN KEY (`taxon_assertion`) REFERENCES `taxon_assertion` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `fk_taxon_determination_party_list1` FOREIGN KEY (`identified_by`) REFERENCES `party_list` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `fk_taxon_determination_taxon_observation1` FOREIGN KEY (`taxon_observation`) REFERENCES `taxon_observation` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `fk_taxon_determination_sampling_event1` FOREIGN KEY (`id`) REFERENCES `sampling_event` (`id`) ON DELETE CASCADE ON UPDATE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='An assertion that a [[VegCore#TaxonOccurrence|TaxonOccurrence]] is a particular [[VegCore#Taxon|Taxon]]'; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Dumping data for table `taxon_determination` -- /*!40000 ALTER TABLE `taxon_determination` DISABLE KEYS */; /*!40000 ALTER TABLE `taxon_determination` ENABLE KEYS */; -- -- Table structure for table `taxon_name` -- /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `taxon_name` ( `id` varbinary(767) NOT NULL, `unique_name` varbinary(767) NOT NULL, `formal_name` varbinary(767) DEFAULT NULL, `taxon_name` varbinary(767) DEFAULT NULL, `author` varbinary(767) DEFAULT NULL, `common_name` varbinary(767) DEFAULT NULL, `rank` varbinary(767) DEFAULT NULL, PRIMARY KEY (`id`), KEY `fk_taxon_concept_taxon_string10_idx` (`unique_name`), CONSTRAINT `fk_taxon_record10` FOREIGN KEY (`id`) REFERENCES `record` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `fk_taxon_concept_taxon_string10` FOREIGN KEY (`unique_name`) REFERENCES `taxon_string` (`string`) ON DELETE CASCADE ON UPDATE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Dumping data for table `taxon_name` -- /*!40000 ALTER TABLE `taxon_name` DISABLE KEYS */; /*!40000 ALTER TABLE `taxon_name` ENABLE KEYS */; -- -- Table structure for table `taxon_observation` -- /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `taxon_observation` ( `id` varbinary(767) NOT NULL, `taxon_occurrence` varbinary(767) NOT NULL, `collectors` varbinary(767) DEFAULT NULL, `collector_number` varbinary(767) DEFAULT NULL, `voucher` varbinary(767) DEFAULT NULL, `growth_form` varbinary(767) DEFAULT NULL, `cultivated` tinyint(1) DEFAULT NULL, `traits` set('hstore') COLLATE utf8_bin DEFAULT NULL, PRIMARY KEY (`id`), KEY `fk_taxon_observation_taxon_occurrence2_idx` (`taxon_occurrence`), KEY `fk_taxon_observation_specimen1_idx` (`voucher`), KEY `fk_taxon_observation_party_list1_idx` (`collectors`), CONSTRAINT `fk_taxon_observation_party_list1` FOREIGN KEY (`collectors`) REFERENCES `party_list` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `fk_taxon_observation_sampling_event1` FOREIGN KEY (`id`) REFERENCES `sampling_event` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `fk_taxon_observation_specimen1` FOREIGN KEY (`voucher`) REFERENCES `specimen` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `fk_taxon_observation_taxon_occurrence2` FOREIGN KEY (`taxon_occurrence`) REFERENCES `taxon_occurrence` (`id`) ON DELETE CASCADE ON UPDATE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Dumping data for table `taxon_observation` -- /*!40000 ALTER TABLE `taxon_observation` DISABLE KEYS */; /*!40000 ALTER TABLE `taxon_observation` ENABLE KEYS */; -- -- Table structure for table `taxon_occurrence` -- /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `taxon_occurrence` ( `id` varbinary(767) NOT NULL, `current_determination` varbinary(767) DEFAULT NULL, `original_determination` varbinary(767) DEFAULT NULL, PRIMARY KEY (`id`), KEY `fk_taxon_occurrence_taxon_determination1_idx` (`original_determination`), KEY `fk_taxon_occurrence_taxon_determination2_idx` (`current_determination`), CONSTRAINT `fk_taxon_occurrence_taxon_determination1` FOREIGN KEY (`original_determination`) REFERENCES `taxon_determination` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `fk_taxon_occurrence_taxon_determination2` FOREIGN KEY (`current_determination`) REFERENCES `taxon_determination` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `fk_taxon_occurrence_event1` FOREIGN KEY (`id`) REFERENCES `record` (`id`) ON DELETE CASCADE ON UPDATE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Any entity on which [[VegCore#TaxonDetermination|TaxonDetermination]]s can be made'; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Dumping data for table `taxon_occurrence` -- /*!40000 ALTER TABLE `taxon_occurrence` DISABLE KEYS */; /*!40000 ALTER TABLE `taxon_occurrence` ENABLE KEYS */; -- -- Table structure for table `taxon_path` -- /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `taxon_path` ( `id` varbinary(767) NOT NULL, `family` varbinary(767) DEFAULT NULL, `genus` varbinary(767) DEFAULT NULL, `specific_epithet` varbinary(767) DEFAULT NULL, `ranks` set('hstore') COLLATE utf8_bin DEFAULT NULL, PRIMARY KEY (`id`), CONSTRAINT `fk_taxon_path_taxon_name1` FOREIGN KEY (`id`) REFERENCES `taxon_name` (`id`) ON DELETE CASCADE ON UPDATE CASCADE ) 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)'; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Dumping data for table `taxon_path` -- /*!40000 ALTER TABLE `taxon_path` DISABLE KEYS */; /*!40000 ALTER TABLE `taxon_path` ENABLE KEYS */; -- -- Table structure for table `taxon_presence` -- /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `taxon_presence` ( `id` varbinary(767) NOT NULL, `taxon_concept` varbinary(767) NOT NULL, `traits` set('hstore') COLLATE utf8_bin DEFAULT NULL, PRIMARY KEY (`id`), KEY `fk_taxon_presence_taxon_name1_idx` (`taxon_concept`), CONSTRAINT `fk_taxon_observation_taxon_occurrence1` FOREIGN KEY (`id`) REFERENCES `taxon_observation` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `fk_taxon_presence_taxon_name1` FOREIGN KEY (`taxon_concept`) REFERENCES `taxon_concept` (`id`) ON DELETE CASCADE ON UPDATE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='An observation of just a [[VegCore#Taxon|Taxon]]''s _presence_'; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Dumping data for table `taxon_presence` -- /*!40000 ALTER TABLE `taxon_presence` DISABLE KEYS */; /*!40000 ALTER TABLE `taxon_presence` ENABLE KEYS */; -- -- Table structure for table `taxon_scrub` -- /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `taxon_scrub` ( `id` varbinary(767) NOT NULL, `input_string` varbinary(767) NOT NULL, `parsed_taxon_assertion` varbinary(767) NOT NULL, `matched_taxon_concept` varbinary(767) DEFAULT NULL, `match_score` float DEFAULT NULL, `match_info` set('hstore') COLLATE utf8_bin DEFAULT NULL, PRIMARY KEY (`id`), KEY `fk_parsed_taxon_assertion_taxon_name1_idx` (`matched_taxon_concept`), KEY `fk_taxon_scrub_taxon_assertion1_idx` (`parsed_taxon_assertion`), KEY `fk_taxon_scrub_taxon_string1_idx` (`input_string`), CONSTRAINT `fk_parsed_taxon_assertion_taxon_name1` FOREIGN KEY (`matched_taxon_concept`) REFERENCES `taxon_concept` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `fk_taxon_scrub_taxon_assertion1` FOREIGN KEY (`parsed_taxon_assertion`) REFERENCES `taxon_assertion` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `fk_taxon_scrub_taxon_string1` FOREIGN KEY (`input_string`) REFERENCES `taxon_string` (`string`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `fk_taxon_scrub_record1` FOREIGN KEY (`id`) REFERENCES `record` (`id`) ON DELETE CASCADE ON UPDATE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Dumping data for table `taxon_scrub` -- /*!40000 ALTER TABLE `taxon_scrub` DISABLE KEYS */; /*!40000 ALTER TABLE `taxon_scrub` ENABLE KEYS */; -- -- Table structure for table `taxon_string` -- /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `taxon_string` ( `string` varbinary(767) NOT NULL, PRIMARY KEY (`string`) ) 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)'; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Dumping data for table `taxon_string` -- /*!40000 ALTER TABLE `taxon_string` DISABLE KEYS */; /*!40000 ALTER TABLE `taxon_string` ENABLE KEYS */; /*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; /*!40101 SET SQL_MODE=@OLD_SQL_MODE */; /*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; /*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */; /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; -- Dump completed