CREATE TABLE location ( location_id serial NOT NULL, authorlocationcode character varying(30), reference_id integer, parent_id integer, reallatitude double precision, reallongitude double precision, locationaccuracy double precision, confidentialitystatus integer NOT NULL DEFAULT 0, confidentialityreason character varying(200), publiclatitude double precision, publiclongitude double precision, "... (truncated) ..." integer, accessioncode character varying(255), sublocationxposition double precision, sublocationyposition double precision, namedplace_id integer, ); CREATE TABLE locationevent -- VegBank's observation table. ( locationevent_id serial NOT NULL, previous_id integer, location_id integer, project_id integer, authoreventcode character varying(30), "... (truncated) ..." integer, accessioncode character varying(255), sourceaccessioncode character varying(100), ); CREATE TABLE taxonoccurrence -- VegBank's taxonobservation table. ( taxonoccurrence_id serial NOT NULL, locationevent_id integer, authorplantname character varying(255), reference_id integer, taxoninferencearea double precision, emb_taxonoccurrence integer, "... (truncated) ..." integer, accessioncode character varying(255), ); CREATE TABLE aggregateoccurrence -- VegBank's taxonimportance table. ( aggregateoccurrence_id serial NOT NULL, taxonoccurrence_id integer NOT NULL, cover double precision, basalarea double precision, biomass double precision, inferencearea double precision, stratumbase double precision, stratumheight double precision, emb_aggregateoccurrence integer, covercode character varying(10), count integer, accessioncode character varying(255), sourceaccessioncode character varying(100), plantobservation_id integer, stratum_id integer, sizeclass_id integer, coverindex_id integer, ); CREATE TABLE planttag ( planttag_id serial NOT NULL, plantobservation_id integer NOT NULL, tag character varying(255) NOT NULL, iscurrent boolean NOT NULL DEFAULT true, ); CREATE TABLE plant -- A physical, tagged plant. ( plant_id serial NOT NULL, ); CREATE TABLE plantobservation -- VegBank's stemcount table. ( plantobservation_id serial NOT NULL, overallheight double precision, overallheightaccuracy double precision, emb_plantobservation integer, authorplantcode character varying(20), accessioncode character varying(255), stemcount integer, sourceaccessioncode character varying(100), plant_id integer, ); CREATE TABLE stemobservation -- VegBank's stemlocation table. ( stemobservation_id serial NOT NULL, plantobservation_id integer NOT NULL, authorstemcode character varying(20), xposition double precision, yposition double precision, health character varying(50), emb_stemobservation integer, diameter double precision, height double precision, heightaccuracy double precision, age double precision, accessioncode character varying(255), diameteraccuracy double precision, sourceaccessioncode character varying(100), ); CREATE TABLE specimen -- A physical specimen collected from a plant. Used to link replicates of the same specimen together. ( specimen_id serial NOT NULL, ); CREATE TABLE specimenreplicate -- A herbarium's replicate of a specimen. Contains Darwin Core specimen data. ( specimenreplicate_id serial NOT NULL, reference_id integer NOT NULL, collectioncode_dwc character varying(255), -- The code for the collection that the specimenreplicate is from. catalognumber_dwc character varying(255), collectiondate timestamp with time zone, museum_id integer, sourceaccessioncode character varying(100), accessioncode character varying(255), taxonoccurrence_id integer NOT NULL, verbatimcollectorname character varying(255), collectionnumber character varying(255), -- The number of the specimenreplicate within the collection. specimen_id integer, ); CREATE TABLE voucher ( voucher_id serial NOT NULL, taxonoccurrence_id integer NOT NULL, specimenreplicate_id integer NOT NULL, accessioncode character varying(255), ); CREATE TABLE taxondetermination -- VegBank's taxoninterpretation table. ( taxondetermination_id serial NOT NULL, taxonoccurrence_id integer NOT NULL, plantconcept_id integer NOT NULL, party_id integer, role_id integer NOT NULL, determinationtype character varying(30), reference_id integer, isoriginal boolean NOT NULL DEFAULT false, iscurrent boolean NOT NULL DEFAULT false, taxonfit character varying(50), taxonconfidence character varying(50), grouptype character varying(20), notes text, notespublic boolean, notesmgt boolean, revisions boolean, determinationdate timestamp with time zone, emb_taxondetermination integer, accessioncode character varying(255), ); CREATE TABLE stratum ( stratum_id serial NOT NULL, locationevent_id integer NOT NULL, stratumtype_id integer NOT NULL, stratumheight double precision, stratumbase double precision, stratumcover double precision, area double precision, ); CREATE TABLE sizeclass -- A range of size measurements used to aggregate organisms. ( sizeclass_id serial NOT NULL, mindiameter double precision, minheight double precision, maxdiameter double precision, maxheight double precision, accessioncode character varying(255), );