Revision 10526
Added by Aaron Marcuse-Kubitza almost 11 years ago
VegCore.my.sql | ||
---|---|---|
299 | 299 |
`tag_history` set('hstore') COLLATE utf8_bin DEFAULT NULL, |
300 | 300 |
PRIMARY KEY (`id`), |
301 | 301 |
KEY `fk_individual_place1_idx` (`place`), |
302 |
CONSTRAINT `fk_individual_place1` FOREIGN KEY (`place`) REFERENCES `place` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
|
|
303 |
CONSTRAINT `fk_individual_record1` FOREIGN KEY (`id`) REFERENCES `reobservable` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
|
|
302 |
CONSTRAINT `fk_individual_record1` FOREIGN KEY (`id`) REFERENCES `reobservable` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
|
|
303 |
CONSTRAINT `fk_individual_place1` FOREIGN KEY (`place`) REFERENCES `place` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
|
|
304 | 304 |
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='A distinct biological organism'; |
305 | 305 |
/*!40101 SET character_set_client = @saved_cs_client */; |
306 | 306 |
|
... | ... | |
611 | 611 |
/*!40000 ALTER TABLE `referenced_class` ENABLE KEYS */; |
612 | 612 |
|
613 | 613 |
-- |
614 |
-- Table structure for table `rel_place` |
|
615 |
-- |
|
616 |
|
|
617 |
/*!40101 SET @saved_cs_client = @@character_set_client */; |
|
618 |
/*!40101 SET character_set_client = utf8 */; |
|
619 |
CREATE TABLE `rel_place` ( |
|
620 |
`id` varbinary(767) NOT NULL, |
|
621 |
`parent` varbinary(767) NOT NULL, |
|
622 |
`x_m` double DEFAULT NULL, |
|
623 |
`y_m` double DEFAULT NULL, |
|
624 |
`coords` set('hstore') COLLATE utf8_bin DEFAULT NULL, |
|
625 |
PRIMARY KEY (`id`), |
|
626 |
KEY `fk_rel_place_place1_idx` (`parent`), |
|
627 |
CONSTRAINT `fk_rel_place_place1` FOREIGN KEY (`parent`) REFERENCES `place` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, |
|
628 |
CONSTRAINT `fk_subplot_place2` FOREIGN KEY (`id`) REFERENCES `place` (`id`) ON DELETE CASCADE ON UPDATE CASCADE |
|
629 |
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='stores plot elements such as subplots ("subplot, line, or any other subsample or subdivision of plot" ("SALVIAS":http://salvias.net/Documents/salvias_data_dictionary.html#Plot_data/subplot))'; |
|
630 |
/*!40101 SET character_set_client = @saved_cs_client */; |
|
631 |
|
|
632 |
-- |
|
633 |
-- Dumping data for table `rel_place` |
|
634 |
-- |
|
635 |
|
|
636 |
/*!40000 ALTER TABLE `rel_place` DISABLE KEYS */; |
|
637 |
/*!40000 ALTER TABLE `rel_place` ENABLE KEYS */; |
|
638 |
|
|
639 |
-- |
|
640 | 614 |
-- Table structure for table `relationship` |
641 | 615 |
-- |
642 | 616 |
|
... | ... | |
931 | 905 |
/*!40000 ALTER TABLE `stratum` ENABLE KEYS */; |
932 | 906 |
|
933 | 907 |
-- |
908 |
-- Table structure for table `subplace` |
|
909 |
-- |
|
910 |
|
|
911 |
/*!40101 SET @saved_cs_client = @@character_set_client */; |
|
912 |
/*!40101 SET character_set_client = utf8 */; |
|
913 |
CREATE TABLE `subplace` ( |
|
914 |
`id` varbinary(767) NOT NULL, |
|
915 |
`parent` varbinary(767) NOT NULL, |
|
916 |
`x_m` double DEFAULT NULL, |
|
917 |
`y_m` double DEFAULT NULL, |
|
918 |
`coords` set('hstore') COLLATE utf8_bin DEFAULT NULL, |
|
919 |
PRIMARY KEY (`id`), |
|
920 |
KEY `fk_rel_place_place1_idx` (`parent`), |
|
921 |
CONSTRAINT `fk_subplot_place2` FOREIGN KEY (`id`) REFERENCES `place` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, |
|
922 |
CONSTRAINT `fk_rel_place_place1` FOREIGN KEY (`parent`) REFERENCES `place` (`id`) ON DELETE CASCADE ON UPDATE CASCADE |
|
923 |
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='stores plot elements such as subplots ("subplot, line, or any other subsample or subdivision of plot" ("SALVIAS":http://salvias.net/Documents/salvias_data_dictionary.html#Plot_data/subplot))'; |
|
924 |
/*!40101 SET character_set_client = @saved_cs_client */; |
|
925 |
|
|
926 |
-- |
|
927 |
-- Dumping data for table `subplace` |
|
928 |
-- |
|
929 |
|
|
930 |
/*!40000 ALTER TABLE `subplace` DISABLE KEYS */; |
|
931 |
/*!40000 ALTER TABLE `subplace` ENABLE KEYS */; |
|
932 |
|
|
933 |
-- |
|
934 | 934 |
-- Table structure for table `subplot` |
935 | 935 |
-- |
936 | 936 |
|
... | ... | |
941 | 941 |
`parent_plot` varbinary(767) NOT NULL, |
942 | 942 |
PRIMARY KEY (`id`), |
943 | 943 |
KEY `fk_subplot_plot2_idx` (`parent_plot`), |
944 |
CONSTRAINT `fk_subplot_plot1` FOREIGN KEY (`id`) REFERENCES `plot` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, |
|
944 | 945 |
CONSTRAINT `fk_subplot_plot2` FOREIGN KEY (`parent_plot`) REFERENCES `plot` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, |
945 |
CONSTRAINT `fk_subplot_rel_place1` FOREIGN KEY (`id`) REFERENCES `rel_place` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, |
|
946 |
CONSTRAINT `fk_subplot_plot1` FOREIGN KEY (`id`) REFERENCES `plot` (`id`) ON DELETE CASCADE ON UPDATE CASCADE |
|
946 |
CONSTRAINT `fk_subplot_rel_place1` FOREIGN KEY (`id`) REFERENCES `subplace` (`id`) ON DELETE CASCADE ON UPDATE CASCADE |
|
947 | 947 |
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin; |
948 | 948 |
/*!40101 SET character_set_client = @saved_cs_client */; |
949 | 949 |
|
Also available in: Unified diff
schemas/VegCore/VegCore.ERD.mwb: rel_place: renamed to subplace to clarify that this is any place contained within another place, not just places with a position relative to their parent place