Project

General

Profile

« Previous | Next » 

Revision 6497

schemas/vegbien.sql: Added darwin_core_view

View differences:

vegbien.my.sql
402 402

  
403 403

  
404 404
--
405
-- Name: sync_darwin_core_to_view(); Type: FUNCTION; Schema: public; Owner: -
406
--
407

  
408

  
409

  
410

  
411
--
405 412
-- Name: sync_geoscrub_input_to_view(); Type: FUNCTION; Schema: public; Owner: -
406 413
--
407 414

  
......
1893 1900

  
1894 1901

  
1895 1902
--
1903
-- Name: darwin_core; Type: TABLE; Schema: public; Owner: -; Tablespace: 
1904
--
1905

  
1906
CREATE TABLE darwin_core (
1907
    `institutionCode` varchar(255),
1908
    `subInstitutionCode` varchar(255),
1909
    `collectionCode` varchar(255),
1910
    `catalogNumber` varchar(255),
1911
    `occurrenceID` varchar(255),
1912
    country varchar(255),
1913
    `stateProvince` varchar(255),
1914
    county varchar(255),
1915
    `decimalLatitude` double precision,
1916
    `decimalLongitude` double precision,
1917
    `coordinateUncertaintyInMeters` double precision,
1918
    geovalid int(1),
1919
    `isNewWorld` int(1),
1920
    `projectID` int(11),
1921
    `plotName` varchar(255),
1922
    `elevationInMeters` double precision,
1923
    `plotArea_ha` double precision,
1924
    `samplingProtocol` varchar(255),
1925
    `dateCollected` date,
1926
    `higherPlantGroup` varchar(255),
1927
    family varchar(255),
1928
    genus varchar(255),
1929
    `speciesBinomial` varchar(255),
1930
    `scientificName` varchar(255),
1931
    `scientificNameAuthorship` varchar(255),
1932
    `speciesBinomialWithMorphospecies` varchar(255),
1933
    `scientificNameWithMorphospecies` varchar(255),
1934
    threatened int(1),
1935
    `identifiedBy` varchar(255),
1936
    `growthForm` varchar(255),
1937
    cultivated int(1),
1938
    `cultivatedBasis` varchar(255),
1939
    `recordedBy` varchar(255),
1940
    `recordNumber` varchar(255),
1941
    `coverPercent` double precision,
1942
    `diameterBreastHeight_cm` double precision,
1943
    height_m double precision,
1944
    tag varchar(255),
1945
    `organismX_m` double precision,
1946
    `organismY_m` double precision,
1947
    `taxonOccurrenceID` varchar(255),
1948
    `authorTaxonCode` varchar(255),
1949
    `individualID` varchar(255),
1950
    `authorStemCode` varchar(255)
1951
);
1952

  
1953

  
1954
--
1955
-- Name: project; Type: TABLE; Schema: public; Owner: -; Tablespace: 
1956
--
1957

  
1958
CREATE TABLE project (
1959
    project_id int(11) NOT NULL,
1960
    source_id int(11) NOT NULL,
1961
    sourceaccessioncode varchar(255),
1962
    projectname varchar(255),
1963
    projectdescription varchar(255),
1964
    startdate date,
1965
    stopdate date,
1966
    accessioncode varchar(255)
1967
);
1968

  
1969

  
1970
--
1971
-- Name: sourcename; Type: TABLE; Schema: public; Owner: -; Tablespace: 
1972
--
1973

  
1974
CREATE TABLE sourcename (
1975
    sourcename_id int(11) NOT NULL,
1976
    source_id int(11) NOT NULL,
1977
    system varchar(255),
1978
    name varchar(255) NOT NULL,
1979
    matched_source_id int(11)
1980
);
1981

  
1982

  
1983
--
1984
-- Name: specimenreplicate; Type: TABLE; Schema: public; Owner: -; Tablespace: 
1985
--
1986

  
1987
CREATE TABLE specimenreplicate (
1988
    specimenreplicate_id int(11) NOT NULL,
1989
    source_id int(11) NOT NULL,
1990
    sourceaccessioncode varchar(255),
1991
    plantobservation_id int(11),
1992
    institution_id int(11),
1993
    collectioncode_dwc varchar(255),
1994
    catalognumber_dwc varchar(255),
1995
    description varchar(255),
1996
    specimen_id int(11),
1997
    accessioncode varchar(255)
1998
);
1999

  
2000

  
2001
--
2002
-- Name: TABLE specimenreplicate; Type: COMMENT; Schema: public; Owner: -
2003
--
2004

  
2005

  
2006

  
2007

  
2008
--
2009
-- Name: COLUMN specimenreplicate.institution_id; Type: COMMENT; Schema: public; Owner: -
2010
--
2011

  
2012

  
2013

  
2014

  
2015
--
2016
-- Name: COLUMN specimenreplicate.collectioncode_dwc; Type: COMMENT; Schema: public; Owner: -
2017
--
2018

  
2019

  
2020

  
2021

  
2022
--
2023
-- Name: darwin_core_view; Type: VIEW; Schema: public; Owner: -
2024
--
2025

  
2026

  
2027

  
2028

  
2029
--
1896 2030
-- Name: dba_preassignacccode_dba_requestnumber_seq; Type: SEQUENCE; Schema: public; Owner: -
1897 2031
--
1898 2032

  
......
2524 2658

  
2525 2659

  
2526 2660
--
2527
-- Name: project; Type: TABLE; Schema: public; Owner: -; Tablespace: 
2528
--
2529

  
2530
CREATE TABLE project (
2531
    project_id int(11) NOT NULL,
2532
    source_id int(11) NOT NULL,
2533
    sourceaccessioncode varchar(255),
2534
    projectname varchar(255),
2535
    projectdescription varchar(255),
2536
    startdate date,
2537
    stopdate date,
2538
    accessioncode varchar(255)
2539
);
2540

  
2541

  
2542
--
2543 2661
-- Name: project_project_id_seq; Type: SEQUENCE; Schema: public; Owner: -
2544 2662
--
2545 2663

  
......
2769 2887

  
2770 2888

  
2771 2889
--
2772
-- Name: sourcename; Type: TABLE; Schema: public; Owner: -; Tablespace: 
2773
--
2774

  
2775
CREATE TABLE sourcename (
2776
    sourcename_id int(11) NOT NULL,
2777
    source_id int(11) NOT NULL,
2778
    system varchar(255),
2779
    name varchar(255) NOT NULL,
2780
    matched_source_id int(11)
2781
);
2782

  
2783

  
2784
--
2785 2890
-- Name: sourcename_sourcename_id_seq; Type: SEQUENCE; Schema: public; Owner: -
2786 2891
--
2787 2892

  
......
2838 2943

  
2839 2944

  
2840 2945
--
2841
-- Name: specimenreplicate; Type: TABLE; Schema: public; Owner: -; Tablespace: 
2842
--
2843

  
2844
CREATE TABLE specimenreplicate (
2845
    specimenreplicate_id int(11) NOT NULL,
2846
    source_id int(11) NOT NULL,
2847
    sourceaccessioncode varchar(255),
2848
    plantobservation_id int(11),
2849
    institution_id int(11),
2850
    collectioncode_dwc varchar(255),
2851
    catalognumber_dwc varchar(255),
2852
    description varchar(255),
2853
    specimen_id int(11),
2854
    accessioncode varchar(255)
2855
);
2856

  
2857

  
2858
--
2859
-- Name: TABLE specimenreplicate; Type: COMMENT; Schema: public; Owner: -
2860
--
2861

  
2862

  
2863

  
2864

  
2865
--
2866
-- Name: COLUMN specimenreplicate.institution_id; Type: COMMENT; Schema: public; Owner: -
2867
--
2868

  
2869

  
2870

  
2871

  
2872
--
2873
-- Name: COLUMN specimenreplicate.collectioncode_dwc; Type: COMMENT; Schema: public; Owner: -
2874
--
2875

  
2876

  
2877

  
2878

  
2879
--
2880 2946
-- Name: specimenreplicate_specimenreplicate_id_seq; Type: SEQUENCE; Schema: public; Owner: -
2881 2947
--
2882 2948

  
......
3942 4008

  
3943 4009

  
3944 4010
--
4011
-- Data for Name: darwin_core; Type: TABLE DATA; Schema: public; Owner: -
4012
--
4013

  
4014

  
4015

  
4016
--
3945 4017
-- Data for Name: definedvalue; Type: TABLE DATA; Schema: public; Owner: -
3946 4018
--
3947 4019

  
......
4932 5004

  
4933 5005

  
4934 5006
--
5007
-- Name: darwin_core_institutionCode_catalogNumber_idx; Type: INDEX; Schema: public; Owner: -; Tablespace: 
5008
--
5009

  
5010
CREATE INDEX `darwin_core_institutionCode_catalogNumber_idx` ON darwin_core  (`institutionCode`, `catalogNumber`);
5011

  
5012

  
5013
--
5014
-- Name: darwin_core_institutionCode_occurrenceID_idx; Type: INDEX; Schema: public; Owner: -; Tablespace: 
5015
--
5016

  
5017
CREATE INDEX `darwin_core_institutionCode_occurrenceID_idx` ON darwin_core  (`institutionCode`, `occurrenceID`);
5018

  
5019

  
5020
--
5021
-- Name: darwin_core_institutionCode_projectID_plotName_dateCollecte_idx; Type: INDEX; Schema: public; Owner: -; Tablespace: 
5022
--
5023

  
5024
CREATE INDEX `darwin_core_institutionCode_projectID_plotName_dateCollecte_idx` ON darwin_core  (`institutionCode`, `projectID`, `plotName`, `dateCollected`);
5025

  
5026

  
5027
--
5028
-- Name: darwin_core_institutionCode_subInstitutionCode_collectionCo_idx; Type: INDEX; Schema: public; Owner: -; Tablespace: 
5029
--
5030

  
5031
CREATE INDEX `darwin_core_institutionCode_subInstitutionCode_collectionCo_idx` ON darwin_core  (`institutionCode`, `subInstitutionCode`, `collectionCode`, `catalogNumber`);
5032

  
5033

  
5034
--
4935 5035
-- Name: graphic_accessioncode_index; Type: INDEX; Schema: public; Owner: -; Tablespace: 
4936 5036
--
4937 5037

  
......
6739 6839

  
6740 6840

  
6741 6841
--
6742
-- Name: definedvalue; Type: ACL; Schema: public; Owner: -
6842
-- Name: project; Type: ACL; Schema: public; Owner: -
6743 6843
--
6744 6844

  
6745 6845

  
......
6749 6849

  
6750 6850

  
6751 6851
--
6752
-- Name: disturbanceobs; Type: ACL; Schema: public; Owner: -
6852
-- Name: sourcename; Type: ACL; Schema: public; Owner: -
6753 6853
--
6754 6854

  
6755 6855

  
......
6759 6859

  
6760 6860

  
6761 6861
--
6762
-- Name: geoscrub_input; Type: ACL; Schema: public; Owner: -
6862
-- Name: specimenreplicate; Type: ACL; Schema: public; Owner: -
6763 6863
--
6764 6864

  
6765 6865

  
......
6769 6869

  
6770 6870

  
6771 6871
--
6772
-- Name: geoscrub_input_view; Type: ACL; Schema: public; Owner: -
6872
-- Name: definedvalue; Type: ACL; Schema: public; Owner: -
6773 6873
--
6774 6874

  
6775 6875

  
......
6779 6879

  
6780 6880

  
6781 6881
--
6782
-- Name: graphic; Type: ACL; Schema: public; Owner: -
6882
-- Name: disturbanceobs; Type: ACL; Schema: public; Owner: -
6783 6883
--
6784 6884

  
6785 6885

  
......
6789 6889

  
6790 6890

  
6791 6891
--
6792
-- Name: higher_plant_group_nodes; Type: ACL; Schema: public; Owner: -
6892
-- Name: geoscrub_input; Type: ACL; Schema: public; Owner: -
6793 6893
--
6794 6894

  
6795 6895

  
......
6799 6899

  
6800 6900

  
6801 6901
--
6802
-- Name: locationeventcontributor; Type: ACL; Schema: public; Owner: -
6902
-- Name: geoscrub_input_view; Type: ACL; Schema: public; Owner: -
6803 6903
--
6804 6904

  
6805 6905

  
......
6809 6909

  
6810 6910

  
6811 6911
--
6812
-- Name: locationeventsynonym; Type: ACL; Schema: public; Owner: -
6912
-- Name: graphic; Type: ACL; Schema: public; Owner: -
6813 6913
--
6814 6914

  
6815 6915

  
......
6819 6919

  
6820 6920

  
6821 6921
--
6822
-- Name: methodtaxonclass; Type: ACL; Schema: public; Owner: -
6922
-- Name: higher_plant_group_nodes; Type: ACL; Schema: public; Owner: -
6823 6923
--
6824 6924

  
6825 6925

  
......
6829 6929

  
6830 6930

  
6831 6931
--
6832
-- Name: note; Type: ACL; Schema: public; Owner: -
6932
-- Name: locationeventcontributor; Type: ACL; Schema: public; Owner: -
6833 6933
--
6834 6934

  
6835 6935

  
......
6839 6939

  
6840 6940

  
6841 6941
--
6842
-- Name: notelink; Type: ACL; Schema: public; Owner: -
6942
-- Name: locationeventsynonym; Type: ACL; Schema: public; Owner: -
6843 6943
--
6844 6944

  
6845 6945

  
......
6849 6949

  
6850 6950

  
6851 6951
--
6852
-- Name: partymember; Type: ACL; Schema: public; Owner: -
6952
-- Name: methodtaxonclass; Type: ACL; Schema: public; Owner: -
6853 6953
--
6854 6954

  
6855 6955

  
......
6859 6959

  
6860 6960

  
6861 6961
--
6862
-- Name: placecorrelation; Type: ACL; Schema: public; Owner: -
6962
-- Name: note; Type: ACL; Schema: public; Owner: -
6863 6963
--
6864 6964

  
6865 6965

  
......
6869 6969

  
6870 6970

  
6871 6971
--
6872
-- Name: placename; Type: ACL; Schema: public; Owner: -
6972
-- Name: notelink; Type: ACL; Schema: public; Owner: -
6873 6973
--
6874 6974

  
6875 6975

  
......
6879 6979

  
6880 6980

  
6881 6981
--
6882
-- Name: placename_ancestor; Type: ACL; Schema: public; Owner: -
6982
-- Name: partymember; Type: ACL; Schema: public; Owner: -
6883 6983
--
6884 6984

  
6885 6985

  
......
6889 6989

  
6890 6990

  
6891 6991
--
6892
-- Name: plant; Type: ACL; Schema: public; Owner: -
6992
-- Name: placecorrelation; Type: ACL; Schema: public; Owner: -
6893 6993
--
6894 6994

  
6895 6995

  
......
6899 6999

  
6900 7000

  
6901 7001
--
6902
-- Name: project; Type: ACL; Schema: public; Owner: -
7002
-- Name: placename; Type: ACL; Schema: public; Owner: -
6903 7003
--
6904 7004

  
6905 7005

  
......
6909 7009

  
6910 7010

  
6911 7011
--
6912
-- Name: projectcontributor; Type: ACL; Schema: public; Owner: -
7012
-- Name: placename_ancestor; Type: ACL; Schema: public; Owner: -
6913 7013
--
6914 7014

  
6915 7015

  
......
6919 7019

  
6920 7020

  
6921 7021
--
6922
-- Name: revision; Type: ACL; Schema: public; Owner: -
7022
-- Name: plant; Type: ACL; Schema: public; Owner: -
6923 7023
--
6924 7024

  
6925 7025

  
......
6929 7029

  
6930 7030

  
6931 7031
--
6932
-- Name: soilsample; Type: ACL; Schema: public; Owner: -
7032
-- Name: projectcontributor; Type: ACL; Schema: public; Owner: -
6933 7033
--
6934 7034

  
6935 7035

  
......
6939 7039

  
6940 7040

  
6941 7041
--
6942
-- Name: soiltaxon; Type: ACL; Schema: public; Owner: -
7042
-- Name: revision; Type: ACL; Schema: public; Owner: -
6943 7043
--
6944 7044

  
6945 7045

  
......
6949 7049

  
6950 7050

  
6951 7051
--
6952
-- Name: sourcecontributor; Type: ACL; Schema: public; Owner: -
7052
-- Name: soilsample; Type: ACL; Schema: public; Owner: -
6953 7053
--
6954 7054

  
6955 7055

  
......
6959 7059

  
6960 7060

  
6961 7061
--
6962
-- Name: sourcename; Type: ACL; Schema: public; Owner: -
7062
-- Name: soiltaxon; Type: ACL; Schema: public; Owner: -
6963 7063
--
6964 7064

  
6965 7065

  
......
6969 7069

  
6970 7070

  
6971 7071
--
6972
-- Name: specimen; Type: ACL; Schema: public; Owner: -
7072
-- Name: sourcecontributor; Type: ACL; Schema: public; Owner: -
6973 7073
--
6974 7074

  
6975 7075

  
......
6979 7079

  
6980 7080

  
6981 7081
--
6982
-- Name: specimenreplicate; Type: ACL; Schema: public; Owner: -
7082
-- Name: specimen; Type: ACL; Schema: public; Owner: -
6983 7083
--
6984 7084

  
6985 7085

  

Also available in: Unified diff