Revision 11460
Added by Aaron Marcuse-Kubitza about 11 years ago
schemas/vegbien.my.sql | ||
---|---|---|
764 | 764 |
|
765 | 765 |
|
766 | 766 |
-- |
767 |
-- Name: analytical_stem; Type: TABLE; Schema: public; Owner: -; Tablespace: |
|
768 |
-- |
|
769 |
|
|
770 |
CREATE TABLE analytical_stem ( |
|
771 |
datasource varchar(255) NOT NULL, |
|
772 |
`specimenHolderInstitutions` varchar(255), |
|
773 |
collection varchar(255), |
|
774 |
`accessionNumber` varchar(255), |
|
775 |
`occurrenceID` varchar(255), |
|
776 |
country varchar(255), |
|
777 |
`stateProvince` varchar(255), |
|
778 |
county varchar(255), |
|
779 |
locality varchar(255), |
|
780 |
`decimalLatitude` double precision, |
|
781 |
`decimalLongitude` double precision, |
|
782 |
`coordinateUncertaintyInMeters` double precision, |
|
783 |
`coordinateSource_bien` varchar(255), |
|
784 |
`georeferenceProtocol_bien` varchar(255), |
|
785 |
geovalid_bien int(11), |
|
786 |
`isNewWorld_bien` int(11), |
|
787 |
`projectID` varchar(255), |
|
788 |
`locationID` varchar(255) NOT NULL, |
|
789 |
`locationName` varchar(255), |
|
790 |
subplot varchar(255), |
|
791 |
`individualCode` varchar(255), |
|
792 |
`elevationInMeters` double precision, |
|
793 |
`plotArea_ha` double precision, |
|
794 |
`samplingProtocol` varchar(255), |
|
795 |
`temperature_C` double precision, |
|
796 |
precipitation_m double precision, |
|
797 |
stratum__name varchar(255), |
|
798 |
communities varchar(255), |
|
799 |
plot__collectors varchar(255), |
|
800 |
`recordedBy` varchar(255), |
|
801 |
`recordNumber` varchar(255), |
|
802 |
`dateCollected` date, |
|
803 |
family_verbatim varchar(255), |
|
804 |
`scientificName_verbatim` varchar(255), |
|
805 |
`identifiedBy` varchar(255), |
|
806 |
`dateIdentified` date, |
|
807 |
`identificationRemarks` varchar(255), |
|
808 |
family_matched varchar(255), |
|
809 |
`taxonName_matched` varchar(255), |
|
810 |
`scientificNameAuthorship_matched` varchar(255), |
|
811 |
`higherPlantGroup_bien` varchar(255), |
|
812 |
family varchar(255), |
|
813 |
genus varchar(255), |
|
814 |
`speciesBinomialWithMorphospecies` varchar(255), |
|
815 |
`taxonName` varchar(255), |
|
816 |
`scientificNameAuthorship` varchar(255), |
|
817 |
`growthForm` varchar(255), |
|
818 |
`reproductiveCondition` varchar(255), |
|
819 |
threatened_bien int(11), |
|
820 |
cultivated_bien int(11), |
|
821 |
`cultivatedBasis_bien` varchar(255), |
|
822 |
`occurrenceRemarks` varchar(255), |
|
823 |
`coverPercent` double precision, |
|
824 |
`diameterBreastHeight_cm` double precision, |
|
825 |
height_m double precision, |
|
826 |
tag varchar(255), |
|
827 |
`organismX_m` double precision, |
|
828 |
`organismY_m` double precision, |
|
829 |
`taxonOccurrenceID` varchar(255), |
|
830 |
`authorTaxonCode` varchar(255), |
|
831 |
`aggregateOrganismObservationID` varchar(255), |
|
832 |
`individualObservationID` varchar(255), |
|
833 |
`authorStemCode` varchar(255) |
|
834 |
); |
|
835 |
|
|
836 |
|
|
837 |
-- |
|
838 |
-- Name: 2013-10-18.Brian_Enquist.Canadensys; Type: VIEW; Schema: public; Owner: - |
|
839 |
-- |
|
840 |
|
|
841 |
|
|
842 |
|
|
843 |
|
|
844 |
-- |
|
767 | 845 |
-- Name: address; Type: TABLE; Schema: public; Owner: -; Tablespace: |
768 | 846 |
-- |
769 | 847 |
|
... | ... | |
870 | 948 |
|
871 | 949 |
|
872 | 950 |
-- |
873 |
-- Name: analytical_stem; Type: TABLE; Schema: public; Owner: -; Tablespace: |
|
874 |
-- |
|
875 |
|
|
876 |
CREATE TABLE analytical_stem ( |
|
877 |
datasource varchar(255) NOT NULL, |
|
878 |
`specimenHolderInstitutions` varchar(255), |
|
879 |
collection varchar(255), |
|
880 |
`accessionNumber` varchar(255), |
|
881 |
`occurrenceID` varchar(255), |
|
882 |
country varchar(255), |
|
883 |
`stateProvince` varchar(255), |
|
884 |
county varchar(255), |
|
885 |
locality varchar(255), |
|
886 |
`decimalLatitude` double precision, |
|
887 |
`decimalLongitude` double precision, |
|
888 |
`coordinateUncertaintyInMeters` double precision, |
|
889 |
`coordinateSource_bien` varchar(255), |
|
890 |
`georeferenceProtocol_bien` varchar(255), |
|
891 |
geovalid_bien int(11), |
|
892 |
`isNewWorld_bien` int(11), |
|
893 |
`projectID` varchar(255), |
|
894 |
`locationID` varchar(255) NOT NULL, |
|
895 |
`locationName` varchar(255), |
|
896 |
subplot varchar(255), |
|
897 |
`individualCode` varchar(255), |
|
898 |
`elevationInMeters` double precision, |
|
899 |
`plotArea_ha` double precision, |
|
900 |
`samplingProtocol` varchar(255), |
|
901 |
`temperature_C` double precision, |
|
902 |
precipitation_m double precision, |
|
903 |
stratum__name varchar(255), |
|
904 |
communities varchar(255), |
|
905 |
plot__collectors varchar(255), |
|
906 |
`recordedBy` varchar(255), |
|
907 |
`recordNumber` varchar(255), |
|
908 |
`dateCollected` date, |
|
909 |
family_verbatim varchar(255), |
|
910 |
`scientificName_verbatim` varchar(255), |
|
911 |
`identifiedBy` varchar(255), |
|
912 |
`dateIdentified` date, |
|
913 |
`identificationRemarks` varchar(255), |
|
914 |
family_matched varchar(255), |
|
915 |
`taxonName_matched` varchar(255), |
|
916 |
`scientificNameAuthorship_matched` varchar(255), |
|
917 |
`higherPlantGroup_bien` varchar(255), |
|
918 |
family varchar(255), |
|
919 |
genus varchar(255), |
|
920 |
`speciesBinomialWithMorphospecies` varchar(255), |
|
921 |
`taxonName` varchar(255), |
|
922 |
`scientificNameAuthorship` varchar(255), |
|
923 |
`growthForm` varchar(255), |
|
924 |
`reproductiveCondition` varchar(255), |
|
925 |
threatened_bien int(11), |
|
926 |
cultivated_bien int(11), |
|
927 |
`cultivatedBasis_bien` varchar(255), |
|
928 |
`occurrenceRemarks` varchar(255), |
|
929 |
`coverPercent` double precision, |
|
930 |
`diameterBreastHeight_cm` double precision, |
|
931 |
height_m double precision, |
|
932 |
tag varchar(255), |
|
933 |
`organismX_m` double precision, |
|
934 |
`organismY_m` double precision, |
|
935 |
`taxonOccurrenceID` varchar(255), |
|
936 |
`authorTaxonCode` varchar(255), |
|
937 |
`aggregateOrganismObservationID` varchar(255), |
|
938 |
`individualObservationID` varchar(255), |
|
939 |
`authorStemCode` varchar(255) |
|
940 |
); |
|
941 |
|
|
942 |
|
|
943 |
-- |
|
944 | 951 |
-- Name: analytical_plot; Type: VIEW; Schema: public; Owner: - |
945 | 952 |
-- |
946 | 953 |
|
... | ... | |
7351 | 7358 |
|
7352 | 7359 |
|
7353 | 7360 |
-- |
7354 |
-- Name: address; Type: ACL; Schema: public; Owner: -
|
|
7361 |
-- Name: analytical_stem; Type: ACL; Schema: public; Owner: -
|
|
7355 | 7362 |
-- |
7356 | 7363 |
|
7357 | 7364 |
|
... | ... | |
7361 | 7368 |
|
7362 | 7369 |
|
7363 | 7370 |
-- |
7364 |
-- Name: aggregateoccurrence; Type: ACL; Schema: public; Owner: -
|
|
7371 |
-- Name: 2013-10-18.Brian_Enquist.Canadensys; Type: ACL; Schema: public; Owner: -
|
|
7365 | 7372 |
-- |
7366 | 7373 |
|
7367 | 7374 |
|
... | ... | |
7371 | 7378 |
|
7372 | 7379 |
|
7373 | 7380 |
-- |
7374 |
-- Name: analytical_stem; Type: ACL; Schema: public; Owner: -
|
|
7381 |
-- Name: address; Type: ACL; Schema: public; Owner: -
|
|
7375 | 7382 |
-- |
7376 | 7383 |
|
7377 | 7384 |
|
... | ... | |
7381 | 7388 |
|
7382 | 7389 |
|
7383 | 7390 |
-- |
7391 |
-- Name: aggregateoccurrence; Type: ACL; Schema: public; Owner: - |
|
7392 |
-- |
|
7393 |
|
|
7394 |
|
|
7395 |
|
|
7396 |
|
|
7397 |
|
|
7398 |
|
|
7399 |
|
|
7400 |
-- |
|
7384 | 7401 |
-- Name: analytical_plot; Type: ACL; Schema: public; Owner: - |
7385 | 7402 |
-- |
7386 | 7403 |
|
schemas/vegbien.sql | ||
---|---|---|
1735 | 1735 |
|
1736 | 1736 |
|
1737 | 1737 |
-- |
1738 |
-- Name: analytical_stem; Type: TABLE; Schema: public; Owner: -; Tablespace: |
|
1739 |
-- |
|
1740 |
|
|
1741 |
CREATE TABLE analytical_stem ( |
|
1742 |
datasource text NOT NULL, |
|
1743 |
"specimenHolderInstitutions" text, |
|
1744 |
collection text, |
|
1745 |
"accessionNumber" text, |
|
1746 |
"occurrenceID" text, |
|
1747 |
country text, |
|
1748 |
"stateProvince" text, |
|
1749 |
county text, |
|
1750 |
locality text, |
|
1751 |
"decimalLatitude" double precision, |
|
1752 |
"decimalLongitude" double precision, |
|
1753 |
"coordinateUncertaintyInMeters" double precision, |
|
1754 |
"coordinateSource_bien" coordinatesource, |
|
1755 |
"georeferenceProtocol_bien" text, |
|
1756 |
geovalid_bien integer, |
|
1757 |
"isNewWorld_bien" integer, |
|
1758 |
"projectID" text, |
|
1759 |
"locationID" text NOT NULL, |
|
1760 |
"locationName" text, |
|
1761 |
subplot text, |
|
1762 |
"individualCode" text, |
|
1763 |
"elevationInMeters" double precision, |
|
1764 |
"plotArea_ha" double precision, |
|
1765 |
"samplingProtocol" text, |
|
1766 |
"temperature_C" double precision, |
|
1767 |
precipitation_m double precision, |
|
1768 |
stratum__name text, |
|
1769 |
communities text[], |
|
1770 |
plot__collectors text[], |
|
1771 |
"recordedBy" text, |
|
1772 |
"recordNumber" text, |
|
1773 |
"dateCollected" date, |
|
1774 |
family_verbatim text, |
|
1775 |
"scientificName_verbatim" text, |
|
1776 |
"identifiedBy" text, |
|
1777 |
"dateIdentified" date, |
|
1778 |
"identificationRemarks" text, |
|
1779 |
family_matched text, |
|
1780 |
"taxonName_matched" text, |
|
1781 |
"scientificNameAuthorship_matched" text, |
|
1782 |
"higherPlantGroup_bien" higher_plant_group, |
|
1783 |
family text, |
|
1784 |
genus text, |
|
1785 |
"speciesBinomialWithMorphospecies" text, |
|
1786 |
"taxonName" text, |
|
1787 |
"scientificNameAuthorship" text, |
|
1788 |
"growthForm" growthform, |
|
1789 |
"reproductiveCondition" text, |
|
1790 |
threatened_bien integer, |
|
1791 |
cultivated_bien integer, |
|
1792 |
"cultivatedBasis_bien" text, |
|
1793 |
"occurrenceRemarks" text, |
|
1794 |
"coverPercent" double precision, |
|
1795 |
"diameterBreastHeight_cm" double precision, |
|
1796 |
height_m double precision, |
|
1797 |
tag text, |
|
1798 |
"organismX_m" double precision, |
|
1799 |
"organismY_m" double precision, |
|
1800 |
"taxonOccurrenceID" text, |
|
1801 |
"authorTaxonCode" text, |
|
1802 |
"aggregateOrganismObservationID" text, |
|
1803 |
"individualObservationID" text, |
|
1804 |
"authorStemCode" text |
|
1805 |
); |
|
1806 |
|
|
1807 |
|
|
1808 |
-- |
|
1809 |
-- Name: 2013-10-18.Brian_Enquist.Canadensys; Type: VIEW; Schema: public; Owner: - |
|
1810 |
-- |
|
1811 |
|
|
1812 |
CREATE VIEW "2013-10-18.Brian_Enquist.Canadensys" AS |
|
1813 |
SELECT analytical_stem."speciesBinomialWithMorphospecies" AS species, analytical_stem."decimalLatitude" AS latitude__deg, analytical_stem."decimalLongitude" AS longitude__deg, analytical_stem."coordinateUncertaintyInMeters" AS coords__uncertainty__m FROM analytical_stem WHERE (((((analytical_stem."speciesBinomialWithMorphospecies" = ANY (ARRAY['Juniperus scopulorum'::text, 'Picea engelmannii'::text, 'Pinus contorta'::text, 'Pinus edulis'::text, 'Pinus ponderosa'::text, 'Populus tremuloides'::text, 'Pseudotsuga menziesii'::text, 'Quercus gambelii'::text])) AND (NOT COALESCE((analytical_stem.cultivated_bien)::boolean, false))) AND COALESCE((analytical_stem.geovalid_bien)::boolean, true)) AND (analytical_stem."decimalLatitude" IS NOT NULL)) AND (analytical_stem."decimalLongitude" IS NOT NULL)) ORDER BY analytical_stem."speciesBinomialWithMorphospecies"; |
|
1814 |
|
|
1815 |
|
|
1816 |
-- |
|
1738 | 1817 |
-- Name: address; Type: TABLE; Schema: public; Owner: -; Tablespace: |
1739 | 1818 |
-- |
1740 | 1819 |
|
... | ... | |
1852 | 1931 |
|
1853 | 1932 |
|
1854 | 1933 |
-- |
1855 |
-- Name: analytical_stem; Type: TABLE; Schema: public; Owner: -; Tablespace: |
|
1856 |
-- |
|
1857 |
|
|
1858 |
CREATE TABLE analytical_stem ( |
|
1859 |
datasource text NOT NULL, |
|
1860 |
"specimenHolderInstitutions" text, |
|
1861 |
collection text, |
|
1862 |
"accessionNumber" text, |
|
1863 |
"occurrenceID" text, |
|
1864 |
country text, |
|
1865 |
"stateProvince" text, |
|
1866 |
county text, |
|
1867 |
locality text, |
|
1868 |
"decimalLatitude" double precision, |
|
1869 |
"decimalLongitude" double precision, |
|
1870 |
"coordinateUncertaintyInMeters" double precision, |
|
1871 |
"coordinateSource_bien" coordinatesource, |
|
1872 |
"georeferenceProtocol_bien" text, |
|
1873 |
geovalid_bien integer, |
|
1874 |
"isNewWorld_bien" integer, |
|
1875 |
"projectID" text, |
|
1876 |
"locationID" text NOT NULL, |
|
1877 |
"locationName" text, |
|
1878 |
subplot text, |
|
1879 |
"individualCode" text, |
|
1880 |
"elevationInMeters" double precision, |
|
1881 |
"plotArea_ha" double precision, |
|
1882 |
"samplingProtocol" text, |
|
1883 |
"temperature_C" double precision, |
|
1884 |
precipitation_m double precision, |
|
1885 |
stratum__name text, |
|
1886 |
communities text[], |
|
1887 |
plot__collectors text[], |
|
1888 |
"recordedBy" text, |
|
1889 |
"recordNumber" text, |
|
1890 |
"dateCollected" date, |
|
1891 |
family_verbatim text, |
|
1892 |
"scientificName_verbatim" text, |
|
1893 |
"identifiedBy" text, |
|
1894 |
"dateIdentified" date, |
|
1895 |
"identificationRemarks" text, |
|
1896 |
family_matched text, |
|
1897 |
"taxonName_matched" text, |
|
1898 |
"scientificNameAuthorship_matched" text, |
|
1899 |
"higherPlantGroup_bien" higher_plant_group, |
|
1900 |
family text, |
|
1901 |
genus text, |
|
1902 |
"speciesBinomialWithMorphospecies" text, |
|
1903 |
"taxonName" text, |
|
1904 |
"scientificNameAuthorship" text, |
|
1905 |
"growthForm" growthform, |
|
1906 |
"reproductiveCondition" text, |
|
1907 |
threatened_bien integer, |
|
1908 |
cultivated_bien integer, |
|
1909 |
"cultivatedBasis_bien" text, |
|
1910 |
"occurrenceRemarks" text, |
|
1911 |
"coverPercent" double precision, |
|
1912 |
"diameterBreastHeight_cm" double precision, |
|
1913 |
height_m double precision, |
|
1914 |
tag text, |
|
1915 |
"organismX_m" double precision, |
|
1916 |
"organismY_m" double precision, |
|
1917 |
"taxonOccurrenceID" text, |
|
1918 |
"authorTaxonCode" text, |
|
1919 |
"aggregateOrganismObservationID" text, |
|
1920 |
"individualObservationID" text, |
|
1921 |
"authorStemCode" text |
|
1922 |
); |
|
1923 |
|
|
1924 |
|
|
1925 |
-- |
|
1926 | 1934 |
-- Name: analytical_plot; Type: VIEW; Schema: public; Owner: - |
1927 | 1935 |
-- |
1928 | 1936 |
|
... | ... | |
8726 | 8734 |
|
8727 | 8735 |
|
8728 | 8736 |
-- |
8737 |
-- Name: analytical_stem; Type: ACL; Schema: public; Owner: - |
|
8738 |
-- |
|
8739 |
|
|
8740 |
REVOKE ALL ON TABLE analytical_stem FROM PUBLIC; |
|
8741 |
REVOKE ALL ON TABLE analytical_stem FROM bien; |
|
8742 |
GRANT ALL ON TABLE analytical_stem TO bien; |
|
8743 |
GRANT SELECT ON TABLE analytical_stem TO bien_read; |
|
8744 |
|
|
8745 |
|
|
8746 |
-- |
|
8747 |
-- Name: 2013-10-18.Brian_Enquist.Canadensys; Type: ACL; Schema: public; Owner: - |
|
8748 |
-- |
|
8749 |
|
|
8750 |
REVOKE ALL ON TABLE "2013-10-18.Brian_Enquist.Canadensys" FROM PUBLIC; |
|
8751 |
REVOKE ALL ON TABLE "2013-10-18.Brian_Enquist.Canadensys" FROM bien; |
|
8752 |
GRANT ALL ON TABLE "2013-10-18.Brian_Enquist.Canadensys" TO bien; |
|
8753 |
GRANT SELECT ON TABLE "2013-10-18.Brian_Enquist.Canadensys" TO bien_read; |
|
8754 |
|
|
8755 |
|
|
8756 |
-- |
|
8729 | 8757 |
-- Name: address; Type: ACL; Schema: public; Owner: - |
8730 | 8758 |
-- |
8731 | 8759 |
|
... | ... | |
8746 | 8774 |
|
8747 | 8775 |
|
8748 | 8776 |
-- |
8749 |
-- Name: analytical_stem; Type: ACL; Schema: public; Owner: - |
|
8750 |
-- |
|
8751 |
|
|
8752 |
REVOKE ALL ON TABLE analytical_stem FROM PUBLIC; |
|
8753 |
REVOKE ALL ON TABLE analytical_stem FROM bien; |
|
8754 |
GRANT ALL ON TABLE analytical_stem TO bien; |
|
8755 |
GRANT SELECT ON TABLE analytical_stem TO bien_read; |
|
8756 |
|
|
8757 |
|
|
8758 |
-- |
|
8759 | 8777 |
-- Name: analytical_plot; Type: ACL; Schema: public; Owner: - |
8760 | 8778 |
-- |
8761 | 8779 |
|
Also available in: Unified diff
schemas/vegbien.sql: added 2013-10-18.Brian_Enquist.Canadensys view