From 7f4330c35cf9869bc4a563a82cd9efc8dda383b4 Mon Sep 17 00:00:00 2001 From: Dou Mok Date: Tue, 23 Jul 2024 15:29:32 -0700 Subject: [PATCH 01/49] Add new 'sql-transformations' folder, with bash script 'getvegbanksql.sh' and respective files to generate the base 'vegbank.sql' to initialize postgres --- sql-transformations/VegBankModel2SQL.xsl | 168 + sql-transformations/db_model_vegbank.xml | 21537 +++++++++++++++++++++ sql-transformations/getvegbanksql.sh | 29 + 3 files changed, 21734 insertions(+) create mode 100644 sql-transformations/VegBankModel2SQL.xsl create mode 100644 sql-transformations/db_model_vegbank.xml create mode 100755 sql-transformations/getvegbanksql.sh diff --git a/sql-transformations/VegBankModel2SQL.xsl b/sql-transformations/VegBankModel2SQL.xsl new file mode 100644 index 0000000..605c851 --- /dev/null +++ b/sql-transformations/VegBankModel2SQL.xsl @@ -0,0 +1,168 @@ + + + + + + + + + + + -- This is a generated SQL script for postgresql + -- + + + + + + + + + --CREATE ANY NAMED SEQUENCES: + -- + + + + + + + + + + __seq + +---------------------------------------------------------------------------- +-- CREATE +---------------------------------------------------------------------------- + + + + CREATE SEQUENCE ; + +CREATE TABLE +( + + + +); + + + INSERT INTO dba_datamodelversion (versionText) values (''); + + + + + + +---------------------------------------------------------------------------- +-- ALTER +---------------------------------------------------------------------------- + + +ALTER TABLE + ADD CONSTRAINT FOREIGN KEY ( ) + REFERENCES (); + + + + + + + + + + + + integer + NOT NULL PRIMARY KEY default nextval('') + + + + + + NOT NULL PRIMARY KEY + + + + + + + + + + DEFAULT + + + + + + , + + + + + + + + NOT NULL + + + + + + timestamp with time zone + + + + + + CREATE SEQUENCE ; + + + + + + + diff --git a/sql-transformations/db_model_vegbank.xml b/sql-transformations/db_model_vegbank.xml new file mode 100644 index 0000000..2a7d50f --- /dev/null +++ b/sql-transformations/db_model_vegbank.xml @@ -0,0 +1,21537 @@ + + + + + + Vegetation Database Component Description: --all modules-- + 1.0.5 + 1.0.5 contains all dba tables that were previously embedded, plus some new ones. + M. Lee + NCEAS + M. Lee + This file describes the vegbank database structure. + 2006-07-19T21:30:00-07:00 + + commConcept + Community Concept + This table store the concepts (assertions) that are linked to community names through the commUsage table. + + community + 1.0.0 + + 102 + COMMCONCEPT_ID + ID + logical + yes + serial + PK + + n/a + no + + n/a + Database assigned value to each unique record in the commConcept table. + + 1 + + 1.0.0 + + + 105 + COMMNAME_ID + Community Name + logical + no + Integer + FK + + commName.COMMNAME_ID + no + + na + Foreign key into the commName table providing the name used for the community when it was defined by usage in a publication (which could be this database). + + 3 + 4 + 2 + + 1.0.0 + + + 108 + commName + Community Name + denorm + yes + text + n/a + + n/a + no + + n/a + The name the community is based on, denorm of commName_ID + 1.0.3 + + + 111 + reference_ID + Reference + logical + yes + no + Integer + FK + + reference.reference_ID + no + + n/a + Foreign key into the Reference table to identify a reference in which the community was identified by a name. This could be a regular publication, or a self reference created by completing the commDescription field in reference + + 5 + 6 + 3 + + 1.0.0 + + + 114 + commDescription + Community Description + logical + yes + text + n/a + + n/a + no + + n/a + The commDescription is a description of the community concept by the party that contributed the concept. + + 8 + 9 + 4 + + 1.0.0 + + + 117 + accessionCode + Accession Code + logical + yes + varchar (255) + n/a + + n/a + no + + n/a + Code that uniquely references this record, allowing reference to this record for this version of this database. Better than a primary key, which is automatically generated by a database and not globally unique. VegBank Accession codes are only generated by VegBank, and therefore data integrity can be guaranteed, unlike with a primary key (number). + + 19 + 5 + + 1.0.6 + + + 120 + d_obscount + Plot Count + denorm + yes + Integer + n/a + + n/a + no + + n/a + Number of observations associated with this entity. + 1.0.3 + + + 121 + d_currentaccepted + Currently Accepted by Someone + denorm + yes + Boolean + n/a + + n/a + no + + n/a + Currently accepted by at least one party. + 1.0.3 + add_currentaccepted_toconcept.sql + + + + commCorrelation + Community Correlation + This table correlates multiple community concepts as they change through time in the perception of a party + + community + 1.0.0 + + 123 + COMMCORRELATION_ID + ID + logical + yes + serial + PK + + n/a + no + + n/a + Database assigned value to each unique record in the communityCorrelation table. + + 6 + + 1.0.0 + + + 126 + COMMSTATUS_ID + Community Status + logical + no + Integer + FK + + commStatus.COMMSTATUS_ID + no + + n/a + This is the foreign key into the CommStatus table "pointing" to a concept no longer viewed as standard by the party. + + 7 + + 1.0.0 + + + 129 + COMMCONCEPT_ID + Community Concept + logical + no + Integer + FK + + commConcept.COMMCONCEPT_ID + no + + n/a + This is the foreign key into the communityConcept table "pointing" to a concept recognized by the party as a "standard" concept. + + 14 + 15 + 8 + + 1.0.0 + + + 132 + commConvergence + Community Convergence + logical + no + varchar (20) + n/a + + n/a + closed + + + equal + The two concepts are exactly the same. + 1 + + + greater than + The reference concept (referenced in table:Status) fully contains the correlated concept (referenced in table:Concept), but also includes additional entities. + 2 + + + less than + The reference concept is fully included in the correlated concept, but the latter concept contains additional entities. + 3 + + + not equal + The two concepts are not exactly the same. This leaves the possibilities that the reference concept is greater than, less than, overlapping, similar, or disjunct relative to the correlated concept. + 4 + + + overlapping + The two concepts contain at least one common entity, and each concept also contains at least one entity that the other does not contain. Neither concept is fully contained in the other. + 5 + + + similar + The two concepts contain at least one common individual. + 6 + + + disjunct + The two concepts in question contain no common entities. + 7 + + + undetermined + Although some correlation is likely, the party responsible for the this correlation has not made a determination. + 8 + + + n/a + This is the descriptive attribute that is used to relate the congruence between two concepts. + + 16 + 17 + 18 + 9 + + 1.0.0 + + + 135 + correlationStart + Correlation Start + logical + no + Date + n/a + + n/a + no + + n/a + This is the start date for recognition by a party of a correlation between two concepts. + + 19 + 21 + 10 + + 1.0.0 + + + 138 + correlationStop + Correlation Stop + logical + yes + Date + n/a + + n/a + no + + n/a + This is the stop date for recognition by a party of a correlation between two concepts. + + 22 + 24 + 11 + + 1.0.0 + + + + commLineage + Community Lineage + This table stores tracks the lineage of vegetation community concepts. + + community + 1.0.0 + + 141 + COMMLINEAGE_ID + ID + logical + yes + serial + PK + + n/a + no + + n/a + Database assigned value to each unique record in the commLineage table. + + 25 + 26 + 12 + + 1.0.0 + + + 144 + parentCommStatus_ID + Parent Community Status + logical + no + Integer + FK + + commStatus.COMMSTATUS_ID + no + + n/a + This is the foreign key into the commStatus table "pointing" to a parent concept. + + 27 + 28 + 13 + + 1.0.0 + + + 147 + childCommStatus_ID + Child Community Status + logical + no + Integer + FK + + commStatus.COMMSTATUS_ID + no + + n/a + This is the foreign key into the commStatus table "pointing" to a child concept. + + 29 + 30 + 14 + + 1.0.0 + + + + commName + Community Name + This table stores vegetation community names + + community + 1.0.0 + + 150 + COMMNAME_ID + ID + logical + yes + serial + PK + + n/a + no + + n/a + Database assigned value to each unique record in the commName table. + + 15 + + 1.0.0 + + + 153 + commName + Community Name + logical + no + text + n/a + + n/a + no + + n/a + The community name. + + 33 + 34 + 35 + 16 + + 1.0.0 + + + 156 + reference_ID + Reference + logical + yes + Integer + FK + + reference.reference_ID + no + + n/a + Foreign key into reference to identify the source of the name. + + 37 + 17 + + 1.0.0 + + + 159 + dateEntered + Date Entered + logical + yes + Date + now() + n/a + + n/a + no + + n/a + Field stores the date that the name was entered into the database. + + 38 + 40 + 18 + + 1.0.0 + + + + commStatus + Community Status + This table store the status of a community concept as perceived by a party at a time. + + community + 1.0.0 + + 162 + COMMSTATUS_ID + ID + logical + yes + serial + PK + + n/a + no + + n/a + Database assigned value to each unique record in the commStatus table. + + 18 + + 1.0.0 + + + 165 + COMMCONCEPT_ID + Community Concept + logical + no + Integer + FK + + commConcept.COMMCONCEPT_ID + no + + n/a + Foreign key to identify the concept to which a party assigns a status + + 67 + 68 + 19 + + 1.0.0 + + + 168 + reference_ID + Reference + logical + yes + Integer + FK + + reference.reference_ID + no + + n/a + Link to a reference where the status was reported + + 70 + 20 + + 1.0.0 + + + 171 + commConceptStatus + Community Concept Status + logical + no + varchar (20) + n/a + + n/a + closed + + + accepted + + 1 + + + not accepted + + 2 + + + undetermined + + 3 + + + closed list + Status of the concept by the party (accepted, not accepted, undetermined) + + 71 + 72 + 73 + 21 + + 1.0.0 + + + 174 + commParent_ID + Community Parent + logical + yes + Integer + FK + + commConcept.COMMCONCEPT_ID + no + + n/a + The commParent is a recursive key to the concept of the parent level in the classification hierarchy. For example, if this concept were at the association level, the parentClass would be a concept that is the parent alliance type. + + 74 + 75 + 22 + + 1.0.0 + + + 177 + commLevel + Community Level + logical + yes + varchar (80) + n/a + + n/a + closed + + + alliance + A grouping of associations with a characteristic physiognomy and habitat and which share one or more diagnostic species typically found in the uppermost or dominant stratum of the vegetation. (This definition includes both floristic and physiognomic criteria, in keeping with the integrated physiognomic-floristic hierarchy of the NVC. It is similar to the FGDC 1997 definition: a physiognomically uniform group of Associations sharing one or more diagnostic (dominant, differential, indicator, or character) species, which, as a rule, are found in the uppermost stratum of the vegetation.) + 6 + + + association + A recurring plant community with a characteristic range in species composition, specific diagnostic species, and a defined range in habitat conditions and physiognomy or structure. + 7 + + + Physiognomic class + the first physiognomic level in the NVC hierarchy; based on the structure of the vegetation and determined by the relative percentage of cover and the height of the dominant, life forms (Grossman et al. 1998). + 1 + + + formation + a level in the NVC based on physiognomic grouping of vegetation units with broadly defined environmental and additional physiognomic factors in common. (FGDC 1997). Grossman et al. (1998) clarified this definition as a level in the classification hierarchy below subgroup which represents vegetation types that share a definite physiognomy or structure within broadly defined environmental factors, relative landscape positions, or hydrologic regimes. Both of these definitions derive from Whittaker 1962: a "community type defined by dominance of a given growth form in the uppermost stratum of the community, or by a combination of dominant growth forms." + 5 + + + Physiognomic group + the level in the classification hierarchy below subclass based on leaf characters and identified and named in conjunction with broadly defined macroclimatic types to provide a structural-geographic orientation (Grossman et al. 1998). + 3 + + + other + + 11 + + + phase + + 9 + + + Physiognomic subclass + + 2 + + + subassociation + + 8 + + + subgroup + + 4 + + + order + + 10 + + + closed list + The commLevel attribute specifies a level in the taxonomic hierarchy to which a class belongs. Field commLevel is an open list with the possible values defined by the classification system employed. If the party responsible for the record in the commStatus table is using the U.S. National Vegetation Classification, the acceptable levels are defined in the Vegetation Classification Standard of the Federal Geographic Data Committee as adopted June 1997. The standard is available at http://biology.usgs.gov/fgdc.veg/standards/vegstd.htm and the allowable entries for each of the physiognomic levels are listed in the appendix (see http://www.fgdc.gov/standards/documents/standards/vegetation/tables19-41.pdf). If the Braun-Blanquet classification system is employed, the acceptable values are defined in the International Code of Phytosociological Nomenclature (Weber, H.E., Moravec, J. Theurillat, J.-P. 2000. Journal of Vegetation Science. 11: 739-769). + + 76 + 77 + 78 + 23 + + 1.0.0 + + + 180 + startDate + Start Date + logical + no + Date + n/a + + n/a + no + + n/a + This is the date for which the status assignment by the party started. + + 79 + 81 + 24 + + 1.0.0 + + + 183 + stopDate + Stop Date + logical + yes + Date + n/a + + n/a + no + + n/a + This is the date for which the status assignment by the party ended. + + 82 + 84 + 25 + + 1.0.0 + + + 186 + commPartyComments + Community Party Comments + logical + yes + text + n/a + + n/a + no + + n/a + Comments by party providing rationale for status assignment + + 85 + 86 + 87 + 26 + + 1.0.0 + + + 189 + PARTY_ID + Party + logical + no + Integer + FK + + party.PARTY_ID + no + + n/a + Foreign key that identifies the party that made the status assignment + + 88 + 89 + 27 + + 1.0.2 + + + 190 + accessionCode + Accession Code + logical + yes + varchar (255) + n/a + + n/a + no + + n/a + Code that uniquely references this record, allowing reference to this record for this version of this database. Better than a primary key, which is automatically generated by a database and not globally unique. VegBank Accession codes are only generated by VegBank, and therefore data integrity can be guaranteed, unlike with a primary key (number). + + 1306 + 429 + + 1.0.6 + + + + commUsage + Community Usage + This table links a community name with a concept. + + community + 1.0.0 + + 192 + COMMUSAGE_ID + ID + logical + yes + serial + PK + + n/a + no + + n/a + Database assigned value to each unique record in the communityUsage table. + + 28 + + 1.0.0 + + + 195 + COMMNAME_ID + Community Name + logical + no + Integer + FK + + commName.COMMNAME_ID + no + + n/a + This field is the foreign key into the commName table. + + 92 + 93 + 29 + + 1.0.0 + + + 198 + commName + Community Name + denorm + yes + text + n/a + + n/a + no + + n/a + This is the community Name that the party uses for this community, of the type indicated in classSystem. + + 1.0.0 + + + 201 + COMMCONCEPT_ID + Community Concept + denorm + yes + Integer + FK + + commConcept.COMMCONCEPT_ID + no + + n/a + This field is the foreign key into the commConcept table. + + 30 + + 1.0.0 + + + 204 + usageStart + Usage Start + logical + yes + Date + n/a + + n/a + no + + n/a + This is the date on which the party applied the name to the concept. + + 99 + 101 + 31 + + 1.0.0 + + + 207 + usageStop + Usage Stop + logical + yes + Date + n/a + + n/a + no + + n/a + This is the date on which the party ceased to apply the name to the concept. + + 102 + 104 + 32 + + 1.0.0 + + + 210 + commNameStatus + Community Name Status + logical + yes + varchar (20) + n/a + + n/a + closed + + + not standard + + 2 + + + standard + + 1 + + + undetermined + + 3 + + + closed list + This field shows the status of the application of the name to the concept by the party (standard, not standard, undetermined). + + 105 + 107 + 33 + + 1.0.0 + + + 213 + classSystem + Class System + logical + yes + varchar (50) + n/a + + n/a + open + + + Code + Ecological Society of American Vegetation Classification Panel. 2003. Guidelines ver. 2 + 3 + + + Common + Ecological Society of American Vegetation Classification Panel. 2003. Guidelines ver. 2 + 4 + + + Other + + 6 + + + Scientific + Ecological Society of American Vegetation Classification Panel. 2003. Guidelines ver. 2 + 1 + + + Translated + Ecological Society of American Vegetation Classification Panel. 2003. Guidelines ver. 2 + 2 + + + + Like FGDC of Forest Cover Class. + This is the name of the classification system wherein the name is applied (e.g., Scientific, Spanish common). + + 110 + 111 + 112 + 34 + + 1.0.0 + + + 216 + PARTY_ID + Party + denorm + yes + Integer + FK + + party.PARTY_ID + no + + n/a + Foreign key that identifies the party that used the class concept with the name. + + 108 + 109 + 35 + + 1.0.2 + + + 219 + COMMSTATUS_ID + Comm Status + logical + yes + Integer + FK + + commStatus.COMMSTATUS_ID + no + + n/a + Comm Status which applies to this commUsage. + + 110 + 36 + + 1.0.2 + + + + plantConcept + Plant Concept + This table store the concepts that are linked to plant names through the plantUsage table. + + plant + 1.0.0 + + 222 + PLANTCONCEPT_ID + ID + logical + yes + serial + PK + + n/a + no + + n/a + Database assigned value to each unique record in the commConcept table. + + 19 + + 1.0.0 + + + 225 + PLANTNAME_ID + Plant Name + logical + no + Integer + FK + + plantName.PLANTNAME_ID + no + + n/a + This is a foreign key into the plant name list, the entry in which when combined with a reference constitutes a concept. + + 6 + 115 + 116 + 37 + + 1.0.0 + + + 228 + reference_ID + Reference + logical + no + Integer + FK + + reference.reference_ID + no + + n/a + This is a foreign key to the reference in which the name was used, thereby defining a concept. + + 7 + 117 + 118 + 38 + + 1.0.0 + + + 231 + plantname + Plant Name + denorm + yes + varchar (200) + n/a + + n/a + no + + n/a + This is the name of the plant upon which the concept is based. + + 1.0.0 + + + 234 + plantCode + Plant Code + implementation + yes + varchar (23) + n/a + + n/a + no + + + + + 1.0.0 + + + 237 + plantDescription + Plant Description + logical + yes + text + n/a + + n/a + no + + n/a + The plantDescription is a description of the plantConcept by the party contributing the plantConcept. + + 125 + 126 + 127 + 39 + + 1.0.0 + + + 240 + accessionCode + Accession Code + logical + yes + varchar (255) + n/a + + n/a + no + + n/a + Code that uniquely references this record, allowing reference to this record for this version of this database. Better than a primary key, which is automatically generated by a database and not globally unique. VegBank Accession codes are only generated by VegBank, and therefore data integrity can be guaranteed, unlike with a primary key (number). + + 126 + 127 + 128 + 40 + + 1.0.6 + + + 243 + d_obscount + Plot Count + denorm + yes + Integer + n/a + + n/a + no + + n/a + Number of observations associated with this entity. + 1.0.3 + + + 244 + d_currentaccepted + Currently Accepted by Someone + denorm + yes + Boolean + n/a + + n/a + no + + n/a + Currently accepted by at least one party. + 1.0.3 + add_currentaccepted_toconcept.sql + + + + plantCorrelation + Plant Correlation + This table correlates multiple plant concepts as they change through time. + + plant + 1.0.0 + + 246 + PLANTCORRELATION_ID + ID + logical + yes + serial + PK + + n/a + no + + n/a + Database assigned value to each unique record in the plantCorrelation table. + + 19 + + 1.0.0 + + + 249 + PLANTSTATUS_ID + Plant Status + logical + no + Integer + FK + + plantStatus.PLANTSTATUS_ID + no + + n/a + This is the foreign key into the plantStatus table "pointing" to a concept no longer viewed as standard by the party. + + 20 + + 1.0.0 + + + 252 + PLANTCONCEPT_ID + Plant Concept + logical + no + Integer + FK + + plantConcept.PLANTCONCEPT_ID + no + + n/a + This is the foreign key into the plantConcept table "pointing" to a concept recognized by the party as a "standard" concept. + + 6 + 132 + 133 + 41 + + 1.0.0 + + + 255 + plantConvergence + Plant Convergence + logical + no + varchar (20) + n/a + + n/a + closed + + + equal + The two concepts are exactly the same. + 1 + + + greater than + The reference concept (referenced in table:Status) fully contains the correlated concept (referenced in table:Concept), but also includes additional entities. + 2 + + + less than + The reference concept is fully included in the correlated concept, but the latter concept contains additional entities. + 3 + + + not equal + The two concepts, are not exactly the same. This leaves the possibilities that the reference concept is greater than, less than, overlapping, similar, or disjunct relative to the correlated concept. + 4 + + + overlapping + The two concepts contain at least one common individual, and each concept also contains at least one individual that the other does not contain. Neither concept is fully contained in the other. + 5 + + + similar + The two concepts contain at least one common individual. + 6 + + + disjunct + The two concepts in question contain no common individuals. + 7 + + + undetermined + Although some correlation is likely, the party responsible for the this correlation has not made a determination. + 8 + + + closed list + This is the descriptive attribute that is used to relate the congruence between two concepts. The concept that is represented in the party perspective, via the Status_ID field is [this field, i.e. <,>,=] the concept represented in Concept_ID field. As normally used, (no Longer Valid Concept) [convergence] (Valid Concept). For example, if a concept is split, the convergence would be 'greater than' (The old concept is 'greater than' the new concept). + + 134 + 135 + 136 + 42 + + 1.0.0 + + + 258 + correlationStart + Correlation Start + logical + no + Date + n/a + + n/a + no + + n/a + This is the start date for recognition by a party of a correlation between two concepts. + + 137 + 139 + 43 + + 1.0.0 + + + 261 + correlationStop + Correlation Stop + logical + yes + Date + n/a + + n/a + no + + n/a + This is the stop date for recognition by a party of a correlation between two concepts. + + 140 + 142 + 44 + + 1.0.0 + + + + plantLineage + Plant Lineage + This table stores tracks the lineage of plant taxon concepts. + + plant + 1.0.0 + + 264 + PLANTLINEAGE_ID + ID + logical + yes + serial + PK + + n/a + no + + n/a + Database assigned value to each unique record in the plantLineage table. + + 143 + 144 + 45 + + 1.0.0 + + + 267 + childPlantStatus_ID + Child Plant Status + logical + no + Integer + FK + + plantStatus.PLANTSTATUS_ID + no + + n/a + This is the foreign key into the plantStatus table "pointing" to a child concept. + + 145 + 146 + 46 + + 1.0.0 + + + 270 + parentPlantStatus_ID + Parent Plant Status + logical + no + Integer + FK + + plantStatus.PLANTSTATUS_ID + no + + n/a + This is the foreign key into the plantStatus table "pointing" to a parent concept. + + 147 + 148 + 47 + + 1.0.0 + + + + plantName + Plant Name + This table stores plant names + + plant + 1.0.0 + + 273 + PLANTNAME_ID + ID + logical + yes + serial + PK + + n/a + no + + n/a + Database assigned value to each unique record in the plantName table. + + 19 + + 1.0.0 + + + 276 + plantName + Plant Name + logical + no + varchar (255) + n/a + + n/a + no + + n/a + The plant name. + + 5 + 151 + 152 + 153 + 48 + + 1.0.0 + + + 279 + reference_ID + Reference + logical + yes + Integer + FK + + reference.reference_ID + (select shortName from reference where reference.reference_ID=plantname.reference_ID) + no + + n/a + Foreign key into the reference table to identify the original source of the name (usually the type description). + + 155 + 49 + + 1.0.0 + + + 282 + dateEntered + Date Entered + logical + yes + Date + now() + n/a + + n/a + no + + n/a + Field stores the date that the name was entered into the database. + + 156 + 158 + 50 + + 1.0.0 + + + + plantStatus + Plant Status + This table store the status of a community concept as perceived by a party at a time. + + plant + 1.0.0 + + 285 + PLANTSTATUS_ID + ID + logical + yes + serial + PK + + n/a + no + + n/a + Database assigned value to each unique record in the plantStatus table. + + 19 + + 1.0.0 + + + 288 + PLANTCONCEPT_ID + Plant Concept + logical + no + Integer + FK + + plantConcept.PLANTCONCEPT_ID + no + + n/a + Foreign key to identify the concept to which a party assigns a status + + 188 + 189 + 51 + + 1.0.0 + + + 291 + reference_ID + Reference + logical + yes + Integer + FK + + reference.reference_ID + no + + n/a + Link to a reference where the status was reported + + 250 + 191 + 52 + + 1.0.0 + + + 294 + plantConceptStatus + Plant Concept Status + logical + no + varchar (20) + n/a + + n/a + closed + + + accepted + + 1 + + + not accepted + + 2 + + + undetermined + + 3 + + + closed list + Status of the concept by the party (accepted, not accepted, undetermined) + + 192 + 193 + 194 + 53 + + 1.0.0 + + + 297 + startDate + Start Date + logical + no + Date + n/a + + n/a + no + + n/a + This is the date for which the status assignment by the party started. + + 197 + 54 + + 1.0.0 + + + 300 + stopDate + Stop Date + logical + yes + Date + n/a + + n/a + no + + n/a + This is the date for which the status assignment by the party ended. + + 200 + 55 + + 1.0.0 + + + 303 + plantPartyComments + Plant Party Comments + logical + yes + text + n/a + + n/a + no + + n/a + Comments by party providing rationale for status assignment + + 201 + 202 + 203 + 56 + + 1.0.0 + + + 306 + plantParentName + Plant Parent Name + implementation + yes + varchar (200) + n/a + + n/a + no + + + + + 1.0.0 + + + 309 + plantParentConcept_id + Plant Parent Concept_id + implementation + yes + Integer + n/a + + n/a + no + + + + + 1.0.0 + + + 312 + plantParent_ID + Plant Parent + logical + yes + Integer + FK + + plantConcept.PLANTCONCEPT_ID + no + + n/a + The plantParent is a recursive key to the concept of the parent level in the classification hierarchy. For example if this plantConcept were at the genus level the plantParent would be the plantConcept that is the family level (or subfamily level). + + 212 + 212 + 213 + 57 + + 1.0.0 + + + 315 + plantLevel + Plant Level + logical + yes + varchar (80) + n/a + + n/a + closed + + + Class + + 5 + + + Cultivar/Forma + + 20 + + + Division + + 4 + + + Family + + 9 + + + Genus + + 13 + + + Kingdom + + 1 + + + Order + + 7 + + + Section + + 15 + + + Species + + 17 + + + Species Aggregate + + 16 + + + Subclass + + 6 + + + Subfamily + + 10 + + + Subgenus + + 14 + + + Subkingdom + + 2 + + + Suborder + + 8 + + + Subspecies + + 18 + + + Subtribe + + 12 + + + Superdivision + + 3 + + + Tribe + + 11 + + + Variety + + 19 + + + n/a + The classLevel attribute specifies a level in the taxonomic hierarchy that a class belongs. + + 214 + 215 + 216 + 58 + + 1.0.0 + + + 318 + PARTY_ID + Party + logical + no + Integer + FK + + party.PARTY_ID + no + + n/a + Foreign key that identifies the party that made the status assignment + + 210 + 204 + 205 + 59 + + 1.0.2 + + + 319 + accessionCode + Accession Code + logical + yes + varchar (255) + n/a + + n/a + no + + n/a + Code that uniquely references this record, allowing reference to this record for this version of this database. Better than a primary key, which is automatically generated by a database and not globally unique. VegBank Accession codes are only generated by VegBank, and therefore data integrity can be guaranteed, unlike with a primary key (number). + + 1306 + 429 + + 1.0.6 + + + + plantUsage + Plant Usage + This table links a plant name with a concept. + + plant + 1.0.0 + + 321 + PLANTUSAGE_ID + ID + logical + yes + serial + PK + + n/a + no + + n/a + Database assigned value to each unique record in the plantUsage table. + + 19 + + 1.0.0 + + + 324 + PLANTNAME_ID + Plant Name + logical + no + Integer + FK + + plantName.PLANTNAME_ID + no + + n/a + This field is the foreign key into the plantName table. + + 5 + 219 + 220 + 60 + + 1.0.0 + + + 327 + PLANTCONCEPT_ID + Plant Concept + denorm + yes + Integer + FK + + plantConcept.PLANTCONCEPT_ID + no + + n/a + This field is the foreign key into the plantConcept table. + + 221 + 222 + 61 + + 1.0.0 + + + 330 + usageStart + Usage Start + logical + yes + Date + n/a + + n/a + no + + n/a + This is the date on which the party applied the name to the concept. + + 225 + 62 + + 1.0.0 + + + 333 + usageStop + Usage Stop + logical + yes + Date + n/a + + n/a + no + + n/a + This is the date on which the party ceased to apply the name to the concept. + + 228 + 63 + + 1.0.0 + + + 336 + plantNameStatus + Plant Name Status + logical + yes + varchar (20) + n/a + + n/a + closed + + + not standard + + 2 + + + standard + + 1 + + + undetermined + + 3 + + + n/a + This field shows the status of the application of the name to the concept by the party (standard, not standard, undetermined). + + 231 + 64 + + 1.0.0 + + + 339 + plantName + Plant Name + denorm + yes + varchar (220) + n/a + + n/a + no + + n/a + This is the plant name that the party uses for this plant concept, in the name system indicated in classSystem. + + 1.0.0 + + + 342 + classSystem + Class System + logical + yes + varchar (50) + n/a + + n/a + open + + + Code + + 3 + + + English Common + + 4 + + + Other + + 6 + + + Scientific + + 1 + + + Scientific without authors + + 2 + + + Spanish Common + + 5 + + + French Common + + 7 + + + closed list + This is the name of the classification system wherein the name is applied (e.g., EnglishCommon or Scientific). + + 6 + 238 + 239 + 65 + + 1.0.0 + + + 345 + acceptedSynonym + Accepted Synonym + implementation + yes + varchar (220) + n/a + + n/a + no + + + + + 1.0.0 + + + 348 + PARTY_ID + Party + denorm + yes + Integer + FK + + party.PARTY_ID + no + + n/a + Foreign key that identifies the party that uses the concept with the name. + + 230 + 235 + 236 + 66 + + 1.0.2 + + + 351 + PLANTSTATUS_ID + Plant Status + logical + yes + Integer + FK + + plantStatus.PLANTSTATUS_ID + no + + n/a + Plant Status which applies to this plantUsage. + + 108 + 109 + 67 + + 1.0.2 + + + + address + Address + This table contains the postal address, email address and/or organizational affiliation for a parties at the time of a plot event. + + plot + 1.0.0 + + 354 + ADDRESS_ID + ID + logical + yes + serial + PK + + n/a + no + + Primary key for the address table. + Database generated identifier assigned to each unique party address (note that a single party may have multiple addresses but that only one may be 'current'). + + 19 + + 1.0.0 + + + 357 + party_ID + Party + logical + no + Integer + FK + + party.PARTY_ID + no + + Foreign key into the party table. + Link to the party to which this address applies + + 20 + + 1.0.0 + + + 360 + organization_ID + Organization + logical + yes + Integer + FK + + party.PARTY_ID + no + + Foreign key into the party table + Link to an organization with which a party is affiliated + + 248 + 68 + + 1.0.0 + + + 363 + orgPosition + Organization Position + logical + yes + varchar (50) + n/a + + n/a + no + + n/a + Position of party within organization. + + 249 + 251 + 69 + + 1.0.0 + + + 366 + email + Email + logical + yes + varchar (100) + n/a + + n/a + no + + n/a + email address + + 252 + 253 + 254 + 70 + + 1.0.0 + + + 369 + deliveryPoint + Delivery Point + logical + yes + varchar (200) + n/a + + n/a + no + + n/a + Address line for the location (Street name, box number, suite). + + 255 + 256 + 257 + 71 + + 1.0.0 + + + 372 + city + City + logical + yes + varchar (50) + n/a + + n/a + no + + n/a + City of the location. + + 258 + 259 + 260 + 72 + + 1.0.0 + + + 375 + administrativeArea + Administrative Area + logical + yes + varchar (50) + n/a + + n/a + no + + n/a + State, province of the location. + + 261 + 262 + 263 + 73 + + 1.0.0 + + + 378 + postalCode + Postal Code + logical + yes + varchar (10) + n/a + + n/a + no + + n/a + Zip code or other postal code. + + 264 + 265 + 266 + 74 + + 1.0.0 + + + 381 + country + Country + logical + yes + varchar (50) + n/a + + n/a + no + + n/a + Country of the physical address. + + 267 + 268 + 269 + 75 + + 1.0.0 + + + 384 + currentFlag + Address is Current? + logical + yes + Boolean + n/a + + n/a + no + + n/a + This flag signifies whether the address is the current address of the party. + + 270 + 272 + 76 + + 1.0.0 + + + 387 + addressStartDate + Address Start Date + logical + yes + Date + n/a + + n/a + no + + n/a + The first database date on which the address/organization information applied (have a discrete date on which address is known to applied - not necessarily the first date on which the address applied). + + 273 + 275 + 77 + + 1.0.0 + + + + aux_Role + Role + This table stores valid role codes for use in contributor tables + + plot + Never Add + 1.0.0 + true + + 390 + ROLE_ID + ID + logical + yes + serial + PK + + n/a + no + + Primary key for the aux_Role table. + Database assigned value for a unique role code + + 19 + + 1.0.0 + + + 393 + roleCode + Role Code + logical + no + varchar (30) + n/a + + n/a + no + + n/a + constraining list of role codes for *Contributor tables + + 278 + 279 + 280 + 78 + + 1.0.0 + + + 396 + roleDescription + Role Description + logical + yes + varchar (200) + n/a + + n/a + no + + n/a + Description of the role + + 281 + 282 + 283 + 79 + + 1.0.0 + + + 399 + accessionCode + Accession Code + logical + yes + varchar (255) + n/a + + n/a + no + + n/a + Code that uniquely references this record, allowing reference to this record for this version of this database. Better than a primary key, which is automatically generated by a database and not globally unique. VegBank Accession codes are only generated by VegBank, and therefore data integrity can be guaranteed, unlike with a primary key (number). + + 282 + 283 + 284 + 80 + + 1.0.6 + + + 402 + roleProject + Role Allowed for Project Contributor + implementation + yes + Integer + n/a + + n/a + no + + n/a + 1=required, 2=allowed + + 284 + 286 + 81 + + 1.0.0 + + + 405 + roleObservation + Role Allowed for Observation Contributor + implementation + yes + Integer + n/a + + n/a + no + + n/a + 1=required, 2=allowed + + 287 + 289 + 82 + + 1.0.0 + + + 408 + roleTaxonInt + Role Allowed for Taxon Interpretation + implementation + yes + Integer + n/a + + n/a + no + + n/a + 1=required, 2=allowed + + 290 + 292 + 83 + + 1.0.0 + + + 411 + roleClassInt + Role Allowed for Community Interpretation + implementation + yes + Integer + n/a + + n/a + no + + n/a + 1=required, 2=allowed + + 293 + 295 + 84 + + 1.0.0 + + + + reference + Reference + This table stores information about references cited within the database + + plot + 1.0.0 + + 414 + reference_ID + ID + logical + no + serial + PK + + n/a + no + + n/a + Primary key for the reference table. + + 19 + + 1.0.0 + + + 417 + shortName + Short Name + logical + yes + varchar (250) + n/a + + n/a + no + + n/a + The 'shortName' field provides a concise or abbreviated name that describes the resource that is being documented. + + 298 + 299 + 300 + 85 + + 1.0.0 + + + 420 + fulltext + Full Text + logical + yes + text + n/a + + n/a + no + + n/a + Full Text of the reference citation. + + 298.5 + 400 + 300.5 + 86 + + 1.0.1 + + + 423 + referenceType + Reference Type + logical + yes + varchar (250) + n/a + + n/a + closed + + + Article + + 10 + + + Book + + 20 + + + Chapter + + 30 + + + EditedBook + + 40 + + + Manuscript + + 50 + + + Report + + 60 + + + Thesis + + 70 + + + ConferenceProceedings + + 80 + + + PersonalCommunication + + 90 + + + Presentation + + 100 + + + Website + + 110 + + + Generic + + 120 + + + n/a + Describes the type of reference this generic type is being used to represent. Examples: book, journal article, web page. + + 303 + 87 + + 1.0.0 + + + 426 + title + Title + logical + yes + varchar (250) + n/a + + n/a + no + + n/a + The formal title given to the work by its author or publisher. The 'title' field provides a description of the resource that is being documented that is long enough to differentiate it from other similar resources. + + 304 + 305 + 306 + 88 + + 1.0.0 + + + 429 + titleSuperior + Title Superior + logical + yes + varchar (250) + n/a + + n/a + no + + n/a + A second, higher order title where appropriate, which in the case of a reference to a chapter is the Book title, and in the case of a Conference Presentation is the Name of the Conference. + + 307 + 309 + 89 + + 1.0.0 + + + 432 + pubDate + Publication Date + logical + yes + Date + n/a + + n/a + no + + n/a + The 'pubDate' field represents the date that the resource was published. The format should be represented as: CCYY, which represents a 4 digit year, or as CCYY-MM-DD, which denotes the full year, month, and day. Note that month and day are optional components. Formats must conform to ISO 8601. For example: 1999-10-26 + + 310 + 312 + 90 + + 1.0.0 + + + 435 + accessDate + Access Date + logical + yes + Date + n/a + + n/a + no + + n/a + The date the resource being referenced was accessed. This is useful if the resource is could be changed after formal publication, such as web sites or databases. + + 313 + 315 + 91 + + 1.0.0 + + + 438 + conferenceDate + Conference Date + logical + yes + Date + n/a + + n/a + no + + n/a + The date the conference was held. + + 316 + 318 + 92 + + 1.0.0 + + + 441 + referenceJournal_ID + Reference Journal + logical + yes + Integer + FK + + referenceJournal.referenceJournal_ID + (select journal from referenceJournal where referenceJournal.referenceJournal_ID=reference.referenceJournal_ID) + no + + n/a + Foreign key into the journal table to identify the journal of this reference. + + 320 + 93 + + 1.0.0 + + + 444 + volume + Volume + logical + yes + varchar (250) + n/a + + n/a + no + + n/a + The volume field is used to describe the volume of the journal in which the article appears. + + 321 + 323 + 94 + + 1.0.0 + + + 447 + issue + Issue + logical + yes + varchar (250) + n/a + + n/a + no + + n/a + The issue field is used to describe the issue of the journal in which the article appears. + + 324 + 326 + 95 + + 1.0.0 + + + 450 + pageRange + Page Range + logical + yes + varchar (250) + n/a + + n/a + no + + n/a + The page range field is used for the beginning and ending pages of the journal article that is being documented. + + 327 + 329 + 96 + + 1.0.0 + + + 453 + totalPages + Total Pages + logical + yes + Integer + n/a + + n/a + no + + n/a + The total pages field is used to describe the total number of pages in the book that is being described. + page(s) + + 330 + 332 + 97 + + 1.0.0 + + + 456 + publisher + Publisher + logical + yes + varchar (250) + n/a + + n/a + no + + n/a + The organization that physically put together the report and publishes it. + + 333 + 335 + 98 + + 1.0.0 + + + 459 + publicationPlace + Publication Place + logical + yes + varchar (250) + n/a + + n/a + no + + n/a + The location at which the work was published. This is usually the name of the city in which the publishing house produced the work. + + 336 + 338 + 99 + + 1.0.0 + + + 462 + isbn + ISBN + logical + yes + varchar (250) + n/a + + n/a + no + + n/a + The ISBN, or International Standard Book Number that has been assigned to this literature resource. + + 339 + 341 + 100 + + 1.0.0 + + + 465 + edition + Edition + logical + yes + varchar (250) + n/a + + n/a + no + + n/a + The edition field is to document the edition of the generic reference type that is being described. + + 342 + 344 + 101 + + 1.0.0 + + + 468 + numberOfVolumes + Number Of Volumes + logical + yes + Integer + n/a + + n/a + no + + n/a + Number of volumes in a collection + volume(s) + + 345 + 347 + 102 + + 1.0.0 + + + 471 + chapterNumber + Chapter Number + logical + yes + Integer + n/a + + n/a + no + + n/a + The chapter number of the chapter of a book that is being described. + chapter + + 348 + 350 + 103 + + 1.0.0 + + + 474 + reportNumber + Report Number + logical + yes + Integer + n/a + + n/a + no + + n/a + The report number field is used to describe the unique identification number that has been issued by the report institution for the report being described. + report + + 351 + 353 + 104 + + 1.0.0 + + + 477 + communicationType + Communication Type + logical + yes + varchar (250) + n/a + + n/a + no + + n/a + The type of personal communication. Could be an email, letter, memo, transcript of conversation either hardcopy or online. + + 354 + 356 + 105 + + 1.0.0 + + + 480 + degree + Degree + logical + yes + varchar (250) + n/a + + n/a + no + + n/a + The degree field is used to describe the name or degree level for which the thesis was completed. + + 357 + 359 + 106 + + 1.0.0 + + + 483 + url + URL + logical + yes + text + n/a + + n/a + no + + n/a + A URL (Uniform Resource Locator) from which this resource can be downloaded or additional information can be obtained. + + 360 + 362 + 107 + + 1.0.0 + + + 486 + doi + DOI + logical + yes + text + n/a + + n/a + no + + n/a + A Digital Object Identifier - a digital identifier for any object of intellectual property. A DOI provides a means of persistently identifying a piece of intellectual property on a digital network and associating it with related current data. (www.doi.org) + + 363 + 365 + 108 + + 1.0.0 + + + 489 + additionalInfo + Additional Information + logical + yes + text + n/a + + n/a + no + + n/a + This field provides any information that is not characterized by the other resource metadata fields. Example: Copyright 2001, Robert Warner + + 366 + 368 + 109 + + 1.0.0 + + + 492 + accessionCode + Accession Code + logical + yes + varchar (255) + n/a + + n/a + no + + n/a + Code that uniquely references this record, allowing reference to this record for this version of this database. Better than a primary key, which is automatically generated by a database and not globally unique. VegBank Accession codes are only generated by VegBank, and therefore data integrity can be guaranteed, unlike with a primary key (number). + + 366 + 368.5 + 110 + + 1.0.6 + + + + referenceAltIdent + Reference Alternate Identifier + This table stores information about identifiers that can be used to indicate a particular reference. + + plot + 1.0.0 + + 495 + referenceAltIdent_ID + ID + logical + no + serial + PK + + n/a + no + + n/a + Primary key for the referenceAltIdent table. + + 19 + + 1.0.0 + + + 498 + reference_ID + Reference + logical + no + Integer + FK + + reference.reference_ID + no + + n/a + Foreign key into the reference table to indicate which reference is referenced by this alternate identifier. + + 371 + 372 + 111 + + 1.0.0 + + + 501 + system + System + logical + yes + varchar (250) + n/a + + n/a + no + + n/a + The data management system within which an identifier is in scope and therefore unique. This is typically a URL (Uniform Resource Locator) that indicates a data management system. All identifiers that share a system must be unique. In other words, if the same identifier is used in two locations with identical systems, then by definition the objects at which they point are in fact the same object. Example(s): http://metacat.somewhere.org/svc/mc/ + + 373 + 374 + 375 + 112 + + 1.0.0 + + + 504 + identifier + Identifier + logical + no + varchar (250) + n/a + + n/a + no + + n/a + An additional, secondary identifier for this entity. The primary identifier belongs in the reference table, but additional identifiers that are used to label this entity, possibly from different data management systems, can be listed here. Example: VCR3465 + + 376 + 377 + 378 + 113 + + 1.0.0 + + + + referenceContributor + Reference Contributor + This table links reference parties with references and shows how a contribution was made by the party. + + plot + 1.0.0 + + 507 + referenceContributor_ID + ID + logical + no + serial + PK + + n/a + no + + n/a + Primary key for the referenceContributor table. + + 19 + + 1.0.0 + + + 510 + reference_ID + Reference + logical + no + Integer + FK + + reference.reference_ID + no + + n/a + Foreign key into the reference table to indicate which reference is referenced by this alternate identifier. + + 382 + 114 + + 1.0.0 + + + 513 + referenceParty_ID + Reference Party + logical + no + Integer + FK + + referenceParty.referenceParty_ID + (SELECT CASE WHEN surname is null THEN 'org:' || organizationname ELSE surname || ', ' || givenname END FROM referenceparty WHERE referenceparty.referenceparty_id=referencecontributor.referenceparty_id) + no + + n/a + Foreign key into the referenceParty table to indicate which person contributed. + + 383 + 384 + 115 + + 1.0.0 + + + 516 + roleType + Role Type + logical + yes + varchar (250) + n/a + + n/a + closed + + + Author + + + Editor + + + Originator + + + Performer + + + Recipient + + + CustodianSteward + + + n/a + Use this field to describe the role the party played with respect to the resource. Some potential roles include technician, reviewer, principal investigator, and many others. + + 385 + 386 + 387 + 116 + + 1.0.0 + + + 519 + position + Position + logical + yes + Integer + n/a + + n/a + no + + n/a + Numerical order in which this contributor's name should be in the order of contributors, if applicable. Examples: 1 [for the first author], 2, [for the second author], etc. + + 388 + 389 + 390 + 117 + + 1.0.0 + + + + referenceParty + Reference Party + This table stores information about parties that contributed to a reference. + + plot + 1.0.0 + + 522 + referenceParty_ID + ID + logical + no + serial + PK + + n/a + no + + n/a + Primary key for the referenceParty table. + + 19 + + 1.0.0 + + + 525 + type + Reference Party Type + logical + yes + varchar (250) + n/a + + n/a + no + + n/a + Type of Party this record refers to: usually person or institution. Type determines rules for which fields must be completed. + + 393 + 395 + 118 + + 1.0.0 + + + 528 + positionName + Position Name + logical + yes + varchar (250) + n/a + + n/a + no + + n/a + This field is intended to be used instead of a particular person or full organization name. If the associated person that holds the role changes frequently, then Position Name would be used for consistency. Note that this field, used in conjunction with 'organizationName' and 'individualName' make up a single logical originator. Because of this, an originator with only the individualName of 'Joe Smith' is NOT the same as an originator with the name of 'Joe Smith' and the organizationName of 'NSF'. Also, the positionName should not be used in conjunction with individualName unless only that individual at that position would be considered an originator for the data package. If a positionName is used in conjunction with an organizationName, then that implies that any person who currently occupies said positionName at organizationName is the originator of the data package. Example(s): Niwot Ridge Data Manager + + 396 + 398 + 119 + + 1.0.0 + + + 531 + salutation + Salutation + logical + yes + varchar (250) + n/a + + n/a + no + + n/a + The salutation field is used in addressing an individual with a particular title, such as Dr., Ms., Mrs., Mr., etc. + + 399 + 400 + 120 + + 1.0.0 + + + 534 + givenName + Given Name + logical + yes + varchar (250) + n/a + + n/a + no + + All names except surname + The given name field is used for the all names, except the surname, of the individual associated with the resource. Possible usages include: first name and middle name, first name and middle initials, first name, etc. Example(s): Jo, Jo R., Jo R.W., John Robert Peter + + 402 + 403 + 121 + + 1.0.0 + + + 537 + surname + Surname + logical + yes + varchar (250) + n/a + + n/a + no + + n/a + The surname field is used for the last name of the individual associated with the resource. + + 405 + 406 + 122 + + 1.0.0 + + + 540 + suffix + Suffix + logical + yes + varchar (250) + n/a + + n/a + no + + n/a + A suffix or suffix abbreviation that follows a name. Examples: Jr., Senior, III, etc. + + 408 + 409 + 123 + + 1.0.0 + + + 543 + organizationName + Organization Name + logical + yes + varchar (250) + n/a + + n/a + no + + n/a + The responsible party field contains the full name of the organization that is associated with the resource. This field is intended to describe which institution or overall organization is associated with the resource being described. Note that this field, used in conjunction with 'individualName' and 'positionName' make up a single logical originator. Because of this, an originator with only the individualName of 'Joe Smith' is NOT the same as an originator with the name of 'Joe Smith' and the organizationName of 'NSF'. Also, the positionName should not be used in conjunction with individualName unless only that individual at that position would be considered an originator for the data package. If a positionName is used in conjunction with an organizationName, then that implies that any person who currently occupies said positionName at organizationName is the originator of the data package. Example(s): National Center for Ecological Analysis and Synthesis + + 411 + 412 + 413 + 124 + + 1.0.0 + + + 546 + currentParty_ID + Current Name + logical + yes + Integer + FK + + referenceParty.referenceParty_ID + no + + recursive FK + Recursive Foreign key into the referenceParty table to indicate the current name of the party. + + 415 + 125 + + 1.0.0 + + + 549 + accessionCode + Accession Code + logical + yes + varchar (255) + n/a + + n/a + no + + n/a + Code that uniquely references this record, allowing reference to this record for this version of this database. Better than a primary key, which is automatically generated by a database and not globally unique. VegBank Accession codes are only generated by VegBank, and therefore data integrity can be guaranteed, unlike with a primary key (number). + + 416 + 126 + + 1.0.6 + + + + referenceJournal + Reference Journal + This table stores information about journals used as part of a reference. + + plot + 1.0.0 + + 552 + referenceJournal_ID + ID + logical + no + serial + PK + + n/a + no + + n/a + Primary key for the referenceJournal table. + + 19 + + 1.0.0 + + + 555 + journal + Journal + logical + no + varchar (250) + n/a + + n/a + no + + n/a + The name of the journal, magazine, newspaper, zine, etc... in which the article was published. Example(s): Ecology, New York Times, Harper's, Canadian Journal of Botany/Revue Canadienne de Botanique ,The Journal of the American Medical Association + + 418 + 419 + 420 + 127 + + 1.0.0 + + + 558 + issn + ISSN + logical + yes + varchar (250) + n/a + + n/a + no + + n/a + The ISSN, or International Standard Serial Number that has been assigned to this literature resource. Example(s): ISSN 1234-5679 + + 421 + 422 + 423 + 128 + + 1.0.0 + + + 561 + abbreviation + Abbreviation + logical + yes + varchar (250) + n/a + + n/a + no + + n/a + Standard abbreviation or shorter name of the journal. Example(s): Can. J. Bot./Rev. Can. Bot., JAMA + + 424 + 425 + 426 + 129 + + 1.0.0 + + + 564 + accessionCode + Accession Code + logical + yes + varchar (255) + n/a + + n/a + no + + n/a + Code that uniquely references this record, allowing reference to this record for this version of this database. Better than a primary key, which is automatically generated by a database and not globally unique. VegBank Accession codes are only generated by VegBank, and therefore data integrity can be guaranteed, unlike with a primary key (number). + + 427 + 427 + 130 + + 1.0.6 + + + + classContributor + Classification Contributor + This table stores information about who participated in a classification event + This table serves as an intersection entity used to link a party with a specific plot classification event. + plot + 1.0.0 + + 567 + CLASSCONTRIBUTOR_ID + ID + logical + yes + serial + PK + + n/a + no + + Primary key for the classContributor table. + Database generated identifier assigned to each unique contribution to the classification of a plot observation. + + 19 + + 1.0.0 + + + 570 + COMMCLASS_ID + Community Classification + logical + no + Integer + FK + + commClass.COMMCLASS_ID + no + + Foreign key into the commClass table. + Observation classification event to which the contributor is associated. + + 20 + + 1.0.0 + + + 573 + PARTY_ID + Party + logical + no + Integer + FK + + party.PARTY_ID + (SELECT CASE WHEN surname is null THEN 'org:' || organizationname ELSE surname || ', ' || givenname END FROM party WHERE party.party_id=classcontributor.party_id) + no + + Foreign key into the party table. + Link to the party that contributed to the classification event. + + 431 + 432 + 131 + + 1.0.0 + + + 576 + ROLE_ID + Role + logical + yes + Integer + FK + + aux_Role.ROLE_ID + (SELECT rolecode from aux_role where aux_role.role_id=classcontributor.role_id) + no + + Foreign key into the aux_Role table + Foreign key that identifies the role that the party had in the classification event (e.g., classifier, consultant, research advisor). + + 434 + 132 + + 1.0.0 + + + 579 + emb_classContributor + this row embargoed. + denorm + yes + Integer + n/a + + n/a + no + + n/a + This value mimics the default embargo value for the plot that this record belongs to. + 1.0.2 + + + + commClass + Community Classification + This table stores general information about classification events where one or more community concepts were applied to a specific Observation by one or more parties. + + plot + 1.0.0 + + 582 + COMMCLASS_ID + ID + logical + yes + serial + PK + + n/a + no + + Primary Key for the commClass table. + Database generated identifier assigned to each unique observation classification event. + + 19 + + 1.0.0 + + + 585 + OBSERVATION_ID + Observation + logical + no + Integer + FK + + observation.OBSERVATION_ID + (select authorObsCode from observation where observation.OBSERVATION_ID=commclass.observation_id) + no + + Foreign key into the observation table + Link to the observation table identifying which observation is being classified. + + 440 + 133 + + 1.0.0 + + + 588 + classStartDate + Classification Start Date + logical + yes + Date + n/a + + n/a + no + + n/a + Start date for the application of a vegetation class to a plot observation by one or more parties. + + 439 + 440 + 441 + 134 + + 1.0.0 + + + 591 + classStopDate + Classification Stop Date + logical + yes + Date + n/a + + n/a + no + + n/a + Stop date for the application of a vegetation class to a plot observation by one or more parties. + + 442 + 444 + 135 + + 1.0.0 + + + 594 + inspection + Inspection + logical + yes + Boolean + n/a + + n/a + (CASE WHEN inspection THEN 'Yes' ELSE 'No' END) + no + + n/a + Classification informed by simple inspection of data. + + 445 + 447 + 136 + + 1.0.0 + + + 597 + tableAnalysis + Table Analysis + logical + yes + Boolean + n/a + + n/a + (CASE WHEN tableAnalysis THEN 'Yes' ELSE 'No' END) + no + + n/a + Classification informed by inspection of floristic composition tables. + + 448 + 450 + 137 + + 1.0.0 + + + 600 + multivariateAnalysis + Multivariate Analysis + logical + yes + Boolean + n/a + + n/a + (CASE WHEN multivariateAnalysis THEN 'Yes' ELSE 'No' END) + no + + n/a + Classification informed by use of multivariate numerical tools. + + 451 + 453 + 138 + + 1.0.0 + + + 603 + expertSystem + Expert System + logical + yes + text + n/a + + n/a + + no + + n/a + Description of any automated expert system used in classification. + + 454 + 456 + 139 + + 1.0.5 + This was changed from a boolean field to a text field in ver. 1.0.5 + + + 606 + classPublication_ID + Classification Publication + logical + yes + Integer + FK + + reference.reference_ID + (select shortName from reference where reference.reference_ID=commclass.classpublication_id) + no + + Foreign key into the reference table + Link to a publication wherein the observation was classified. + + 458 + 140 + + 1.0.0 + + + 609 + classNotes + Classification Notes + logical + yes + text + n/a + + n/a + no + + n/a + Notes about the classification event by the parties participating in the event. This might include the purpose or rationale for the classification. + + 459 + 461 + 141 + + 1.0.0 + + + 612 + commName + Community Name + implementation + yes + varchar (200) + n/a + + n/a + no + + + + + 1.0.0 + + + 615 + commCode + Community Code + implementation + yes + varchar (200) + n/a + + n/a + no + + + + + 1.0.0 + + + 618 + commFramework + Community Framework + implementation + yes + varchar (200) + n/a + + n/a + no + + + + + 1.0.0 + + + 621 + commLevel + Community Level + implementation + yes + varchar (200) + n/a + + n/a + no + + + + + 1.0.0 + + + 624 + accessionCode + Accession Code + logical + yes + varchar (255) + n/a + + n/a + no + + n/a + Code that uniquely references this record, allowing reference to this record for this version of this database. Better than a primary key, which is automatically generated by a database and not globally unique. VegBank Accession codes are only generated by VegBank, and therefore data integrity can be guaranteed, unlike with a primary key (number). + + 473 + 142 + + 1.0.6 + + + 627 + emb_commClass + this row embargoed. + denorm + yes + Integer + n/a + + n/a + no + + n/a + This value mimics the default embargo value for the plot that this record belongs to. + 1.0.2 + + + + commInterpretation + Community Interpretation + This table tracks the assignment of specific community concepts to plot observations + + plot + 1.0.0 + + 630 + COMMINTERPRETATION_ID + ID + logical + yes + serial + PK + + n/a + no + + Primary Key for the communityInterpretation table. + Database generated identifier assigned to each unique assignment of a community concept to a plot observation. + + 19 + + 1.0.0 + + + 633 + COMMCLASS_ID + Community Classification + logical + no + Integer + FK + + commClass.COMMCLASS_ID + no + + Foreign key into the commClassification table. + Link to the commClassification table identifying the specific classification event. + + 20 + + 1.0.0 + + + 636 + COMMCONCEPT_ID + Community Concept + logical + yes + no + Integer + FK + + commConcept.COMMCONCEPT_ID + (SELECT commname.commname from commConcept, commname WHERE commname.commname_id=commconcept.commname_id and commconcept.commconcept_id=comminterpretation.commconcept_id) + no + + Foreign key into the commConcept table. + Link to the communityConcept table identifying the specific community concept being applied. + + 478 + 479 + 480 + 143 + + 1.0.0 + + + 639 + commcode + Community Code + implementation + yes + varchar (34) + n/a + + n/a + no + + + + + 1.0.0 + + + 642 + commname + Community Name + denorm + yes + varchar (200) + n/a + + n/a + no + + n/a + Name of the community indicated in commConcept_ID. + + 1.0.0 + + + 645 + classFit + Class Fit + logical + yes + varchar (50) + n/a + + n/a + closed + + + Absolutely correct + (Fits well) No doubt about the match. Perfect fit. + 5 + + + Absolutely wrong + (Absolutely doesn't fit) This answer is absolutely unacceptable. Unambiguously incorrect. + 1 + + + Good answer + (Fits reasonably well) Good match with the concept. Unambiguously correct. + 4 + + + Reasonable or acceptable answer + (Possibly fits) Maybe not the best possible answer but it is acceptable; this answer does not pose a problem to the user. Correct. + 3 + + + Understandable but wrong + (Doesn't fit but is close) Not a good answer. There is something about the plot that makes the answer understandable, but there is clearly a better answer. This answer would pose a problem for users. Incorrect. + 2 + + + closed list + Indicates the degree of fit with the community concept being assigned. Values derive from Gopal, S., and Woodcock, C. (1994), Theory and methods for accuracy assessment of thematic maps using fuzzy sets. Photogrammetric Engineering and Remote Sensing 60(2):181-188. + + 486 + 487 + 488 + 144 + + 1.0.0 + + + 648 + classConfidence + Class Confidence + logical + yes + varchar (15) + n/a + + n/a + closed + + + High + The party making the community interpretation has a high confidence in the accuracy of this interpretation. A party can have high confidence that a plot has a fit of "absolutely wrong" for a particular community. + 1 + + + Low + The party making the community interpretation has a low confidence in the accuracy of this interpretation. + 3 + + + Medium + The party making the community interpretation has a medium amount of confidence in the accuracy of this interpretation. + 2 + + + closed list + Indicates the degree of confidence of the interpreter(s) in the interpretation made. This can reflect the level of familiarity with the classification or the sufficiency of information about the plot (e.g., High, Moderate, Low). + + 489 + 490 + 491 + 145 + + 1.0.0 + + + 651 + commAuthority_ID + Community Authority Reference + logical + yes + Integer + FK + + reference.reference_ID + (select shortName from reference where reference.reference_ID=comminterpretation.commAuthority_ID) + no + + Foreign key into the reference table + Link to the reference from which information on the community concept was obtained during the classification event. (A case could be made for this being moved to reference.) + + 493 + 490.5 + 146 + + 1.0.0 + + + 654 + notes + Notes + logical + yes + text + n/a + + n/a + no + + n/a + Notes pertaining to the classification analysis and decision. + + 494 + 496 + 147 + + 1.0.0 + + + 657 + type + Typal + logical + yes + Boolean + n/a + + n/a + (CASE WHEN type THEN 'Yes' ELSE 'No' END) + no + + n/a + This assignment is the type description for the community concept, as indicated in the publication referenced in commClass.classPublication_ID (NOT the commAuthority_ID of this commInterpretation table). + + 497 + 498 + 499 + 148 + + 1.0.0 + + + 660 + nomenclaturalType + Nomenclatural Type + logical + yes + Boolean + n/a + + n/a + (CASE WHEN nomenclaturalType THEN 'Yes' ELSE 'No' END) + no + + n/a + Typal plot for the Braun-Blanquet community name. + + 500 + 502 + 149 + + 1.0.0 + + + 663 + emb_commInterpretation + this row embargoed. + denorm + yes + Integer + n/a + + n/a + no + + n/a + This value mimics the default embargo value for the plot that this record belongs to. + 1.0.2 + + + + coverIndex + Cover Index + This table stores the definitions of each coverclass unit associated with each coverclass method. + + plot + 1.0.0 + + 666 + COVERINDEX_ID + ID + logical + yes + serial + PK + + n/a + no + + Primary key for the coverIndex table + Database generated identifier assigned to each unique coverclass associated index value. + + 19 + + 1.0.0 + + + 669 + COVERMETHOD_ID + Cover Method + logical + no + Integer + FK + + coverMethod.COVERMETHOD_ID + no + + Foreign key into the coverMethod table. + Links to a specific cover scale. + + 20 + + 1.0.0 + + + 672 + coverCode + Cover Code + logical + no + varchar (10) + n/a + + n/a + no + + n/a + The name or label used in the coverclass scale for this specific coverclass. + + 5 + 508 + 509 + 150 + + 1.0.0 + + + 675 + upperLimit + Upper Limit + logical + yes + Float + n/a + + n/a + no + + n/a + Upper limit, in percent, associated with the specific coverCode. + % + + 510 + 511 + 512 + 151 + + 1.0.0 + + + 678 + lowerLimit + Lower Limit + logical + yes + Float + n/a + + n/a + no + + n/a + This is the lower limit, in percent, associated with a specific coverCode. Where a cover scale has a non-quantitative lower or upper value, as in the "+" of the Braun-Blanquet scale, it is necessary to provide an approximation with "0" being the lower limit of the bottom most class. + % + + 6 + 510 + 510 + 150 + + 1.0.0 + + + 681 + coverPercent + Cover Percent + logical + no + Float + n/a + + n/a + no + + n/a + A middle value (usually mean or geometric mean) between the upperLimit and lowerLimt stored by the database for each taxon observation and used for all coverclass conversions and interpretations. This is assigned by the author of the cover class schema. + % + + 516 + 517 + 518 + 153 + + 1.0.0 + + + 684 + indexDescription + Index Description + logical + yes + text + n/a + + n/a + no + + n/a + Description of the specific coverclass. This is particularly helpful in the case that there is no numeric value that can be applied. + + 519 + 520 + 521 + 154 + + 1.0.0 + + + + coverMethod + Cover Method + This table associates a cover scale recognized by the plot data collectors with a set of coverclasses specified in the coverIndex table. This table, together with the coverIndex table, defines a coverclass method. + + plot + 1.0.0 + + 687 + COVERMETHOD_ID + ID + logical + yes + serial + PK + + n/a + no + + Primary key for the coverMethod table. + Database generated identifier assigned to each unique coverclass methodology. + + 19 + + 1.0.0 + + + 690 + reference_ID + Reference + logical + yes + Integer + FK + + reference.reference_ID + (select shortName from reference where reference.reference_ID=covermethod.reference_ID) + no + + Foreign key into the reference table. + Foreign Key into the reference table, linking the defining reference to a cover method. + + 528 + 528 + 155 + + 1.0.0 + + + 693 + coverType + Cover Type + logical + no + varchar (30) + n/a + + n/a + no + + n/a + Name of the coverclass method (e.g., Braun-Blanquet, Barkman, Domin, Daubenmire, Carolina Vegetation Survey, etc.). + + 527 + 527 + 156 + + 1.0.0 + + + 696 + coverEstimationMethod + Cover Estimation Method + logical + yes + varchar (80) + n/a + + n/a + closed + + + canopy cover + Cover estimated as the percentage of ground covered by a vertical outermost perimeter of the natural spread of foliage of plants. (SRM 1989) + 1 + + + foliar cover + Cover estimated as the percentage of ground covered by the vertical portion of plants. Small openings in the canopy and intraspecific overlap are excluded (SRM 1989). Foliar cover is the vertical projection of shoots; i.e., stems and leaves. + 2 + + + n/a + The way that cover is estimated on the observation. + + 529 + 157 + + 1.0.2 + + + 699 + accessionCode + Accession Code + logical + yes + varchar (255) + n/a + + n/a + no + + n/a + Code that uniquely references this record, allowing reference to this record for this version of this database. Better than a primary key, which is automatically generated by a database and not globally unique. VegBank Accession codes are only generated by VegBank, and therefore data integrity can be guaranteed, unlike with a primary key (number). + + 529 + 530 + 158 + + 1.0.6 + + + + definedValue + Defined Value + This table stores the values of user-defined variables. + This table stores values associated with specific user-defined variables identified in the userDefined table. + plot + 1.0.0 + + 702 + DEFINEDVALUE_ID + ID + logical + yes + serial + PK + + n/a + no + + Primary key for the definedValue table + Database generated identifier assigned to each unique defined value. + + 529 + 530 + 159 + + 1.0.0 + + + 705 + USERDEFINED_ID + User Defined + logical + no + Integer + FK + + userDefined.USERDEFINED_ID + (SELECT userdefined.userdefinedname from userdefined where userdefined.userdefined_ID=definedvalue.userdefined_ID) + no + + n/a + Link to a specific user-defined variable defined in the userDefined table. + + 531 + 532 + 160 + + 1.0.0 + + + 708 + tableRecord_ID + Table Record + logical + no + Integer + n/a + + n/a + no + + Pseudokey for the table with which this value should be associated + The numeric value of the record number (primary key) that this user-defined value would have if it were in the table identified by USERDEFINED_ID. + + 536 + 537 + 538 + 161 + + 1.0.0 + + + 711 + definedValue + Defined Value + logical + no + text + n/a + + n/a + no + + n/a + The value of the user-defined variable. + + 533 + 534 + 535 + 162 + + 1.0.2 + + + + disturbanceObs + Disturbance Observation + This table stores plot observation information pertaining to observer estimation of the disturbance history of the plot. + disturbanceObs is a child of observation; a plot might experience many types of disturbance unique to different observation events. + plot + 1.0.0 + + 714 + disturbanceObs_ID + ID + logical + yes + serial + PK + + n/a + no + + Primary key for disturbanceObs + Database generated identifier assigned to each unique disturbance observation.. + + 19 + + 1.0.0 + + + 717 + OBSERVATION_ID + Observation + logical + no + Integer + FK + + observation.OBSERVATION_ID + no + + Foreign key that points to the parent observation for this disturbance record + Link to the observation event with which this report of a disturbance event is associated. + + 20 + + 1.0.0 + + + 720 + disturbanceType + Disturbance Type + logical + no + varchar (30) + n/a + + n/a + closed + + + Animal, general + 1 + + + Grazing, domestic stock + + 2 + + + Grazing, native ungulates + + 3 + + + Herbivory, invertebrate + + 4 + + + Herbivory, vertebrates + + 5 + + + Human, general + 6 + + + Cultivation + + 7 + + + Fire suppression + + 8 + + + Herbicide or chemical + + 9 + + + Mowing + + 10 + + + Roads and vehicular traffic + + 11 + + + Timber harvest, general + + 12 + + + Timber harvest, clearcut + + 13 + + + Timber harvest, selective + + 14 + + + Trampling and trails + + 15 + + + Natural, general + 16 + + + Avalanche and snow + + 17 + + + Cryoturbation + + 18 + + + Erosion + + 19 + + + Floods + + 23 + + + Hydrologic alteration + + 24 + + + Ice + + 25 + + + Mass movements (landslides) + + 26 + + + Plant disease + + 27 + + + Salt spray + + 28 + + + Tides + + 29 + + + Wind, chronic + + 30 + + + Wind event + + 31 + + + Fire, general + + 35 + + + Fire, canopy + + 36 + + + Fire, ground + + 37 + + + Other disturbances + + 40 + + + unknown + 50 + + + closed list + The type of disturbance being reported + + 543 + 544 + 545 + 163 + + 1.0.0 + + + 723 + disturbanceIntensity + Disturbance Intensity + logical + yes + varchar (30) + n/a + + n/a + closed + + + High + + 1 + + + None + No disturbance of this type was observed on the plot. This may be a useful observation where certain types of disturbance are expected, but no signs of such disturbance were found. + 4 + + + Low + + 3 + + + Medium + + 2 + + + closed list + Intensity or degree of the disturbance. + + 546 + 547 + 548 + 164 + + 1.0.0 + + + 726 + disturbanceAge + Disturbance Age + logical + yes + Float + n/a + + n/a + no + + n/a + Estimated time in years since the disturbance event. + year(s) + + 549 + 551 + 165 + + 1.0.0 + + + 729 + disturbanceExtent + Disturbance Extent + logical + yes + Float + n/a + + n/a + no + + n/a + Percent of the plot that experienced the event. + % of plot + + 552 + 554 + 166 + + 1.0.0 + + + 732 + disturbanceComment + Disturbance Comment + logical + yes + text + n/a + + n/a + no + + n/a + Text description of details of the disturbance and its impact on the vegetation. + + 555 + 556 + 557 + 167 + + 1.0.0 + + + 735 + emb_disturbanceObs + this row embargoed. + denorm + yes + Integer + n/a + + n/a + no + + n/a + This value mimics the default embargo value for the plot that this record belongs to. + 1.0.2 + + + + graphic + Graphic + This table stores information about graphical files related to vegetation plot observations + Graphical files can include, among other formats: gif, jpeg, and tif file formats. Because many graphical files, especially remote sensing digital photographs, may be too large to be stored within the database, a graphicLocation may be given as an alternative. Current Business rules cap graphic size at 5M per plot. Graphics of modest size should be included rather than referenced by external address. + plot + 1.0.0 + + 738 + GRAPHIC_ID + ID + logical + yes + serial + PK + + n/a + no + + Primary key the graphic table + Database generated identifier assigned to each unique graphic idem. + + 19 + + 1.0.0 + + + 741 + OBSERVATION_ID + Observation + logical + no + Integer + FK + + observation.OBSERVATION_ID + no + + Foreign key into the observation table. + Link from a graphic file to a specific plot observation. + + 560 + 561 + 168 + + 1.0.0 + + + 744 + graphicName + Graphic Name + logical + yes + varchar (30) + n/a + + n/a + no + + n/a + Name of the graphic file. + + 562 + 563 + 564 + 169 + + 1.0.0 + + + 747 + graphicLocation + Graphic Location + logical + yes + text + n/a + + n/a + no + + n/a + Where the graphic is located, if not in the database + + 565 + 566 + 567 + 170 + + 1.0.0 + + + 750 + graphicDescription + Graphic Description + logical + yes + text + n/a + + n/a + no + + n/a + Description of the graphical file and associated metadata such as contributor, author, sensor, etc. + + 568 + 569 + 570 + 171 + + 1.0.0 + + + 753 + graphicType + Graphic Type + logical + yes + varchar (20) + n/a + + n/a + no + + may become a closed list + The type of the graphical file format (e.g. gif, tif, ,jpeg). + + 571 + 572 + 573 + 172 + + 1.0.0 + + + 756 + graphicDate + Graphic Date + logical + yes + Date + n/a + + n/a + no + + n/a + Date that the graphic was produced. + + 574 + 575 + 576 + 173 + + 1.0.0 + + + 759 + graphicData + Graphic Data + logical + yes + oid + n/a + + n/a + no + + may be constrained by a maximum size + The graphical file data. - Max = 5 M total per plot + + 577 + 578 + 579 + 174 + + 1.0.0 + + + 760 + accessionCode + Accession Code + logical + yes + varchar (255) + n/a + + n/a + no + + n/a + Code that uniquely references this record, allowing reference to this record for this version of this database. Better than a primary key, which is automatically generated by a database and not globally unique. VegBank Accession codes are only generated by VegBank, and therefore data integrity can be guaranteed, unlike with a primary key (number). + + 1306 + 429 + + 1.0.6 + + + + namedPlace + Named Place + This tables stores information about the various 'named places' that a plot may have been located within. Such places could include geographic regions, study sites, ownership units, managed units, any placename in the USGS glossary (http://www-nmd.usgs.gov/www/gnis/), or equivalent glossary. + + plot + 1.0.0 + + 762 + NAMEDPLACE_ID + ID + logical + yes + serial + PK + + n/a + no + + Primary for the namedPlace table + Database generated identifier assigned to each unique named place. + + 19 + + 1.0.0 + + + 765 + placeSystem + Place System + logical + yes + varchar (50) + n/a + + n/a + closed + + + area|country|territory + area, country, or territory + 3 + + + continent + + 4 + + + county + county, canton, or parish + 2 + + + Geographic Name + User named places + 11 + + + HUC Code + + 6 + + + TNC Conservation Region + + 7 + + + quadrangle + + 5 + + + region|state|province + region or state or province + 1 + + + EPA-Omernik Ecoregion + + 8 + + + USFS-Bailey Ecoregion + + 9 + + + Ecoregion + A non-standard or generic ecoregion that is not specifically mentioned in this list. + 10 + + + closed list + Name of the system of names. These can be treated as points as with place names, or as a coverage or set of polygons (e.g., geographic area names, HUC codes, Ecoregions, Quadrangles). + + 582 + 583 + 584 + 175 + + 1.0.0 + + + 768 + placeName + Place Name + logical + no + varchar (100) + n/a + + n/a + no + + n/a + The name of a place in or at which a plot is located. The system "Geographic Name" is an open list defined within this table. The other systems are generally closed lists constrained by aux_tables. These include at least USGSQuad, Continent, Country, State, County, HUC, and Ecoregion. + + 585 + 586 + 587 + 176 + + 1.0.0 + + + 771 + placeDescription + Place Description + logical + yes + text + n/a + + n/a + no + + n/a + This is the description of a named place. + + 588 + 590 + 177 + + 1.0.0 + + + 774 + placeCode + Place Code + logical + yes + varchar (15) + n/a + + n/a + no + + n/a + Optional code for location identification + + 591 + 592 + 593 + 178 + + 1.0.0 + + + 777 + owner + Owner + logical + yes + varchar (100) + n/a + + n/a + no + + n/a + Although somewhat redundant with the owner information contained in observationContributor with roleCode of owner, this allows the program to provide ownership information automatically. The ownership field supercedes this field in priority. + + 594 + 596 + 179 + + 1.0.0 + + + 780 + reference_ID + Reference + logical + yes + Integer + FK + + reference.reference_ID + (select shortName from reference where reference.reference_ID=namedplace.reference_ID) + no + + Foreign key into the reference table + Link to a reference that contains further information on the named place. + + 598 + 180 + + 1.0.0 + + + 783 + accessionCode + Accession Code + logical + yes + varchar (255) + n/a + + n/a + no + + n/a + Code that uniquely references this record, allowing reference to this record for this version of this database. Better than a primary key, which is automatically generated by a database and not globally unique. VegBank Accession codes are only generated by VegBank, and therefore data integrity can be guaranteed, unlike with a primary key (number). + + 599 + 181 + + 1.0.6 + + + 786 + d_obscount + Plot Count + denorm + yes + Integer + n/a + + n/a + no + + n/a + Number of observations associated with this entity. + 1.0.3 + + + + namedPlaceCorrelation + Named Place Correlation + Stores information about how different named places related to one another. + + plot + 1.0.0 + + 789 + NAMEDPLACECORRELATION_ID + logical + no + serial + PK + + n/a + no + + n/a + Primary Key. + 1.0.3 + + + 792 + PARENTPLACE_ID + Parent Place + logical + no + Integer + FK + + namedPlace.NAMEDPLACE_ID + (select placeSystem || ': ' || placeName from namedPlace where namedPlace.NAMEDPLACE_ID=place.namedplace_id) + no + + Foreign key into the namedPlace table + Link to a parent geographical region. + + 897 + 898 + 289 + + 1.0.3 + + + 795 + CHILDPLACE_ID + Child Place + logical + no + Integer + FK + + namedPlace.NAMEDPLACE_ID + (select placeSystem || ': ' || placeName from namedPlace where namedPlace.NAMEDPLACE_ID=place.namedplace_id) + no + + Foreign key into the namedPlace table + Link to a child geographical region. + + 898 + 899 + 290 + + 1.0.3 + + + 798 + placeConvergence + Place Convergence + logical + no + varchar (20) + n/a + + n/a + closed + + + equal + The two places are exactly the same. + 1 + + + greater than + The parent place fully contains the child place, and also includes additional space. + 2 + + + less than + The parent place is fully included in the child place, but the child place contains additional space. + 3 + + + not equal + The two places are not exactly the same. This leaves the possibilities that the parent place is greater than, less than, overlapping, similar, or disjunct relative to the child place. + 4 + + + overlapping + The two places contain at least some common area, and each place also contains at least some area that the other does not contain. Neither place is fully contained in the other. + 5 + + + similar + The two places contain at least some common area. + 6 + + + disjunct + The two places in question contain no common area. + 7 + + + undetermined + Although some correlation is likely, the correlation has not been determined. + 8 + + + n/a + This is the descriptive attribute that is used to relate the congruence between two places, Parent [convergence value] child (generally greater than). + + 1016 + 1017 + 1018 + 1009 + + 1.0.3 + + + + note + Note + This table is where notations associated with table records are stored + All notes associated with plots and plot observations are stored in this table. These notes can be linked to any table, record and attribute via the noteLink table. + plot + 1.0.0 + + 801 + NOTE_ID + ID + logical + yes + serial + PK + + n/a + no + + Primary key for the note table + Database generated identifier assigned to each unique note. + + 599 + 600 + 182 + + 1.0.0 + + + 804 + NOTELINK_ID + Note Link + logical + no + Integer + FK + + noteLink.NOTELINK_ID + no + + Foreign key into the notelink table + Link to the noteLink table via which a note is associated with a table, record and attribute. + + 601 + 602 + 183 + + 1.0.0 + + + 807 + PARTY_ID + Party + logical + no + Integer + FK + + party.PARTY_ID + no + + Foreign key into the party table + Link to the party table to identify the party that contributed the note. + + 603 + 604 + 184 + + 1.0.0 + + + 810 + ROLE_ID + Role + logical + no + Integer + FK + + aux_Role.ROLE_ID + no + + Foreign key into the aux_role table + What role was the party playing when the note was applied? + + 605 + 606 + 185 + + 1.0.0 + + + 813 + noteDate + Note Date + logical + yes + Date + n/a + + n/a + no + + n/a + The date on which the note was stored in the database. + + 607 + 608 + 609 + 186 + + 1.0.0 + + + 816 + noteType + Note Type + logical + no + varchar (20) + n/a + + n/a + closed + + + Clarification + + 0 + + + Correction + + 0 + + + Internal + + 0 + + + Warning + + 0 + + + closed list + The type of note: Database Management, Observation Author, Database User and Internal. "Database Management" notes are those added by the management team and may be queried and viewed by the public. "Database Use" notes are those entered by the users of the database and are publicly viewable. "Internal" notes are for management to use internally and will not be broadcast. + + 610 + 611 + 612 + 187 + + 1.0.0 + + + 819 + noteText + Note Text + logical + no + text + n/a + + n/a + no + + actual note text + The text of the note. + + 613 + 614 + 615 + 188 + + 1.0.0 + + + 820 + accessionCode + Accession Code + logical + yes + varchar (255) + n/a + + n/a + no + + n/a + Code that uniquely references this record, allowing reference to this record for this version of this database. Better than a primary key, which is automatically generated by a database and not globally unique. VegBank Accession codes are only generated by VegBank, and therefore data integrity can be guaranteed, unlike with a primary key (number). + + 1306 + 429 + + 1.0.6 + + + + noteLink + Note Link + This table links a note made by a database user or manager to a specific table, record and attribute in the database. + This table was developed with the goal of keeping all the notes associated with the plots in a single table rather than distributed in many tables across the database. + plot + 1.0.0 + + 822 + NOTELINK_ID + ID + logical + yes + serial + PK + + n/a + no + + Primary key for the noteLink table + Database generated identifier assigned to each unique noteLink. + + 616 + 617 + 189 + + 1.0.0 + + + 825 + tableName + Table Name + logical + no + varchar (50) + n/a + + n/a + no + + n/a + Name of the table that the note is associated with. + + 618 + 619 + 620 + 190 + + 1.0.0 + + + 828 + attributeName + Attribute Name + logical + yes + varchar (50) + n/a + + n/a + no + + n/a + Name of the attribute in the table (stored in tableName) that the note is associated with. + + 621 + 622 + 623 + 191 + + 1.0.2 + + + 831 + tableRecord + Table Record + logical + no + Integer + n/a + + n/a + no + + n/a + The record number (row) containing the value with which the note is associated (which translates to the primary key value for the table wherein the record is stored). + + 624 + 625 + 626 + 192 + + 1.0.0 + + + + observation + Observation + This table stores plot observation results that might vary between official observation events. + Observation is a child of plot in recognition of the fact that a plot may be re-sampled and that some of the environmental +conditions may change between resampling events. + + plot + 1.0.0 + + 834 + OBSERVATION_ID + OBSERVATION ID + logical + yes + serial + PK + + n/a + no + + Primary key for the observation table + Database generated identifier assigned to each unique plot observation. + + 193 + 193 + + 1.0.0 + + + 837 + PREVIOUSOBS_ID + Previous Observation + logical + yes + Integer + FK + + observation.OBSERVATION_ID + (SELECT authorObsCode from observation as oPrev where oPrev.observation_ID=observation.previousObs_ID) + no + + Recursive foreign key + Link to data from the previous observation of this plot. + + 630 + 194 + + 1.0.0 + + + 840 + PLOT_ID + Plot + logical + no + Integer + FK + + plot.PLOT_ID + no + + Foreign key into the plot table. + Link to data and metadata that do not change between observations and which are stored in the plot table. + + 195 + + 1.0.0 + + + 843 + PROJECT_ID + Project + logical + yes + no + Integer + FK + + project.PROJECT_ID + (SELECT projectName from project where project.projecT_ID = observation.project_ID) + no + + Foreign key into the project table. + Link between an observation and the project within which the observation was made + + 633 + 634 + 13 + 196 + 196 + + 1.0.0 + + + 846 + authorObsCode + Author Observation Code + logical + yes + varchar (30) + n/a + + n/a + no + + n/a + This is the code or name that the author uses to identify this plot observation event. Where a plot has only one observation, this will often equal plot.authorPlotCode. + + 1 + 1 + 1 + 1 + 197 + 197 + + 1.0.0 + + + 849 + obsStartDate + Observation Start Date + logical + yes + Date + n/a + + n/a + no + + default = current year + The date of the observation, or the first day if the observation spanned more than one day. + + 642 + + 198 + 198 + + 1.0.0 + + + 852 + obsEndDate + Observation End Date + logical + yes + Date + n/a + + n/a + no + + n/a + If the observation event spanned more than a single day, this is the last day on which observations were made. + + + 199 + + 1.0.0 + + + 855 + dateAccuracy + Date Accuracy + logical + yes + varchar (30) + n/a + + n/a + closed + + + Exact + The exact date of the observation - within one day. + 1 + + + One week + + 2 + + + One month + Within one month of the observation. + 3 + + + Three months + + 4 + + + One year + + 5 + + + Three years + + 6 + + + Ten years + + 7 + + + Greater than ten years + + 8 + + + closed list + Estimated accuracy of the observation date. + + + 200 + + 1.0.0 + + + 858 + dateEntered + Date Entered into VegBank + logical + yes + Date + now() + n/a + + n/a + no + + n/a + Date that the observation was added to VegBank + + 935.5 + 201 + + 1.0.1 + + + 861 + COVERMETHOD_ID + Cover Method + logical + yes + no + Integer + FK + + coverMethod.COVERMETHOD_ID + (SELECT coverType from CoverMethod where observation.coverMethod_ID=coverMethod.coverMethod_ID) + no + + Foreign key into the coverMethod table. + Link to the scale used to estimate taxon cover. The database stores estimated cover to the nearest percent, but the conversion details are recovered by reference to the specific scale employed. + + 650 + 651 + 10 + 202 + 202 + + 1.0.0 + + + 864 + coverDispersion + Cover Dispersion + logical + yes + varchar (30) + n/a + + n/a + closed + + + Entire + Cover based on observation of an entire plot consisting of a single contiguous area of land. + 1 + + + subplot-random + Cover based on observation of multiple randomly dispersed subplots within the overall plot. + 4 + + + subplot-regular + Cover based on observation of multiple subplots arranged in a regular pattern within the overall plot. + 3 + + + subplot-haphazard + Cover based on observation of multiple subplots haphazardly arranged within the overall plot. + 5 + + + subplot-contiguous + Cover based on observation of a single contiguous area of land of less spatial extent than the entire plot. + 2 + + + line-intercept + Cover based on length of line touching each species present. + 6 + + + point-intercept + Cover based on number of points for each species present. + 7 + + + closed list; default = Entire + Were cover values for the total taxon list collected from one contiguous area or dispersed subplots? + + 664 + 665 + 203 + 203 + + 1.0.0 + + + 867 + autoTaxonCover + Overall Taxon Cover Values are Automatically Calculated? + logical + yes + Boolean + n/a + + n/a + (CASE WHEN autoTaxonCover=true THEN 'true' ELSE 'false' END) + no + + default = FALSE + TRUE indicates that taxonObservation.taxonCover was automatically calculated from the values of all stratumObservation.taxonStratumCover + + 667 + 668 + 204 + 204 + + 1.0.0 + + + 870 + STRATUMMETHOD_ID + Stratum Method + logical + yes + no + Integer + FK + + stratumMethod.STRATUMMETHOD_ID + (SELECT stratumMethodName from stratumMethod where observation.stratumMethod_ID=stratumMethod.stratumMethod_ID) + no + + Foreign key into the stratumMethod table + Link to the definitions of strata used in recording taxon-specific values of cover. + + 652 + 653 + 11 + 205 + 205 + + 1.0.0 + + + 873 + methodNarrative + Method Narrative + logical + yes + text + n/a + + n/a + no + + n/a + Additional metadata helpful for understanding how the data were collected during the observation event. + + 658 + 659 + 206 + + 1.0.0 + + + 876 + taxonObservationArea + Taxon Observation Area + logical + yes + Float + n/a + + n/a + no + + default = plot.area + the total surface area (in m^2) used for cover estimates and for which a complete species list is provided. If subplots were used, this would be the total area of the subplots without interstitial space. RESERVED VALUE: -1 is used to indicate the complete list of species had no known boundaries. + m² + + 660 + 661 + 207 + 207 + + 1.0.0 + + + 879 + stemSizeLimit + Stem Size Limit + logical + yes + Float + n/a + + n/a + no + + n/a + Lower diameter limit in centimeters for inclusion of a tree in the stem count (stemCount). + cm + + 655 + 208 + 208 + + 1.0.0 + + + 882 + stemObservationArea + Stem Observation Area + logical + yes + Float + n/a + + n/a + no + + default = plot.area + the total surface area (in m^2) observed for recording woody stem data. RESERVED VALUE: -1 means no known area. + m² + + 670 + 671 + 209 + 209 + + 1.0.0 + + + 885 + stemSampleMethod + Stem Sample Method + logical + yes + varchar (30) + n/a + + n/a + closed + + + Bitterlich + + 4 + + + Full census + + 1 + + + Other + + 5 + + + Point quarter + + 2 + + + Random pairs + + 3 + + + Subsample census + + 6 + + + closed list; default = full census + The method used to obtain basal area or tree stem data (e.g., full census, point quarter, random pairs, Bitterlich, other). + + 672 + 210 + 210 + + 1.0.0 + + + 888 + originalData + Original Data Location + logical + yes + text + n/a + + n/a + no + + n/a + Location where the hard data reside and any access instructions. + + 675 + 211 + + 1.0.0 + + + 891 + effortLevel + Effort Level + logical + yes + varchar (30) + n/a + + n/a + closed + + + Accurate + + 2 + + + Hurried or incomplete + + 3 + + + Very thorough + + 1 + + + closed list + This is the effort spent making the observations as estimated by the party that submitted the data (e.g., Very thorough, Average, Hurried description). + + 679 + 212 + + 1.0.0 + + + 894 + plotValidationLevel + Plot Validation Level + logical + yes + Integer + n/a + + n/a + (CASE WHEN plotvalidationlevel = 1 THEN '(1) Occurrence Plot: Sufficient for determining type occurrence' + WHEN plotvalidationlevel = 2 THEN '(2) Classification Plot: Sufficient for inclusion in a classification revision' + WHEN plotvalidationlevel = 3 THEN '(3) Classification Plot: Fully compliant with recommendations' + ELSE 'Unknown' END) + closed + + + -1 + observation has not yet been fully rectified by user and is not complete. + -1 + + + 1 + sufficient for determining type occurrence + 1 + + + 2 + sufficient for inclusion in a classification revision + 2 + + + 3 + sufficient for classification and meets best practices + 3 + + + closed list + Quality of plot as determined by an automated filter system, including values such as (1) sufficient for determining type occurrence, (2) sufficient for inclusion in a classification revision, and (3) fully compliant with recommendations. + + 681 + 682 + 213 + + 1.0.0 + + + 897 + floristicQuality + Floristic Quality + logical + yes + varchar (30) + n/a + + n/a + closed + + + High + between 85% and 95% of all taxa were identified to species level; search was thorough. + 2 + + + High but incomplete + at least 85% of all taxa were identified to species level; search was not so thorough. + 3 + + + Highest + at least 95% of all taxa were identified to species level; search was thorough. + 1 + + + Low + less than 70% of all taxa were identified to species level. + 6 + + + Moderate + between 70% and 85% of all taxa were identified to species level; search was thorough. + 4 + + + Moderate but incomplete + between 70% and 85% of all taxa were identified to species level; search was not so thorough. + 5 + + + closed list + Subjective assessment of floristic quality by the party that submitted the plot (e.g., Highest, High, High but incomplete, Moderate, Moderate and incomplete, Low). + + 684 + 214 + + 1.0.0 + + + 900 + bryophyteQuality + Bryophyte Quality + logical + yes + varchar (30) + n/a + + n/a + closed + + + High + + 2 + + + High but incomplete + + 3 + + + Highest + + 1 + + + Low + + 6 + + + Moderate + + 4 + + + Moderate but incomplete + + 5 + + + Not examined + + 8 + + + Very incomplete + + 7 + + + closed list + Subjective assessment of the taxonomic quality of the bryophyte data by the party that submitted the plot (e.g., Highest, High, High but incomplete, Moderate, Moderate and incomplete, Low, Very incomplete, absent). + + 687 + 215 + + 1.0.0 + + + 903 + lichenQuality + Lichen Quality + logical + yes + varchar (30) + n/a + + n/a + closed + + + High + + 2 + + + High but incomplete + + 3 + + + Highest + + 1 + + + Low + + 6 + + + Moderate + + 4 + + + Moderate but incomplete + + 5 + + + Not examined + + 8 + + + Very incomplete + + 7 + + + closed list + Subjective assessment of the taxonomic quality of the lichen data by the party that submitted the plot (e.g., Highest, High, High but incomplete, Moderate, Moderate and incomplete, Low, Very incomplete, absent). + + 690 + 216 + + 1.0.0 + + + 906 + observationNarrative + Observation Narrative + logical + yes + text + n/a + + n/a + no + + n/a + Additional unstructured observations useful for understanding the ecological attributes and significance of the plot observations. + + 693 + 693 + 217 + + 1.0.0 + + + 909 + landscapeNarrative + Landscape Narrative + logical + yes + text + n/a + + n/a + no + + n/a + Unstructured observations on the landscape context of the observed plot. + + 696 + 697 + 218 + + 1.0.0 + + + 912 + homogeneity + Homogeneity + logical + yes + varchar (50) + n/a + + n/a + closed + + + compositional trend across plot + + 2 + + + conspicuous inclusions + + 3 + + + homogeneous + + 1 + + + irregular or pattern mosaic + + 4 + + + closed list + How homogeneous was the community (e.g., homogeneous, compositional trend across plot, conspicuous inclusions, irregular mosaic or pattern). + + 699 + 219 + + 1.0.0 + + + 915 + phenologicAspect + Phenologic Aspect + logical + yes + varchar (30) + n/a + + n/a + closed + + + aestival + + 4 + + + autumnal + + 6 + + + dry season + + 9 + + + early wet season + + 3 + + + irregular ephemeral phase + + 10 + + + late wet season + + 7 + + + typical growing season + + 1 + + + vernal + + 2 + + + wet season + + 5 + + + winter + + 8 + + + closed list + Season expression of the community (e.g., typical growing season, vernal, aestival, wet, autumnal, winter, dry, irregular ephemerals present). + + 702 + 220 + + 1.0.0 + + + 918 + representativeness + Representativeness + logical + yes + varchar (255) + n/a + + n/a + no + + n/a + How representative was the plot of the stand? + + 705 + 221 + + 1.0.0 + + + 921 + standMaturity + Stand Maturity + logical + yes + varchar (50) + n/a + + n/a + closed + + + Even-age, aggrading + + 2 + + + Mature, even-age + + 3 + + + Oldgrowth, all-age + + 5 + + + Transition, breakup + + 4 + + + Young, regenerative + + 1 + + + Uneven-age + Ages of individuals are uneven so that this community does not fit neatly into the succession model. + 6 + + + closed list + How mature is the stand. Could be young, mature but even-aged, old-growth, etc. + + 759 + 222 + + 1.0.0 + + + 924 + successionalStatus + Successional Status + logical + yes + text + n/a + + n/a + no + + n/a + Description of the assumed successional status of the plot. This description is of necessity highly subjective. + + 762 + 764 + 223 + + 1.0.0 + + + 877 + numberOfTaxa + Number of Taxa + logical + yes + Integer + n/a + + n/a + no + + default could be count of taxonObservations + The number of taxa found on the plot, within the taxonObservationArea. Any species known to be found only outside of the taxonObservationArea would not be included in this number. Use 0 for this field to indicate that no taxa were found within the plot bounds. + + 708 + 709 + 223 + 223 + + 1.0.5 + + + 927 + basalArea + Basal Area + logical + yes + Float + n/a + + n/a + no + + n/a + Total basal area of woody stems (in m²/ha). 0 should be used to indicate that plots have no stems. + m²/ha + + 709 + 710 + 224 + 224 + + 1.0.0 + + + 930 + hydrologicRegime + Hydrologic Regime + logical + yes + varchar (30) + n/a + + n/a + closed + + + Intermittently flooded + Substrate is usually exposed, but surface water can be present for variable periods without detectable seasonal periodicity. Inundation is not predictable to a given season and is dependent upon highly localized rain storms. This modifier was developed for use in the arid West for water regimes of Playa lakes, intermittent streams, and dry washes but can be used in other parts of the U.S. where appropriate. This modifier can be applied to both wetland and non-wetland situations. Equivalent to Cowardin's Intermittently Flooded modifier. + 6 + + + Permanently flooded + Water covers the land surface at all times of the year in all years. Equivalent to Cowardin's "permanently flooded". + 7 + + + Permanently flooded - tidal + Salt water covers the land surface at all times of the year in all years. This modifier applies only to permanently flooded area irregularly flooded by fresh tidal water. Equivalent to Cowardin's "permanently flooded/tidal". + 8 + + + Saturated + Surface water is seldom present, but substrate is saturated to surface for extended periods during the growing season. Equivalent to Cowardin's Saturated modifier. + 3 + + + Seasonally flooded + Surface water is present for extended periods during the growing season, but is absent by the end of the growing season in most years. The water table after flooding ceases is very variable, extending from saturated to a water table well below the ground surface. Includes Cowardin's Seasonal, Seasonal-Saturated, and Seasonal-Well Drained modifiers. + 2 + + + Seasonally saturated + + 4 + + + Semipermanently flooded + Surface water persists throughout the growing season in most years. Land surface is normally saturated when water level drops below soil surface. Includes Cowardin's Intermittently Exposed and Semipermanently Flooded modifiers. + 1 + + + Temporarily flooded + Surface water present for brief periods during growing season, but water table usually lies well below soil surface. Often characterizes flood-plain wetlands. Equivalent to Cowardin's Temporary modifier. + 5 + + + Tidally flooded + Flooded by the alternate rise and fall of the surface of oceans, seas, and the bays, rivers, etc. connected to them, caused by the attraction of the moon and sun. + 9 + + + Unknown + + 14 + + + Upland + Not a wetland. Very rarely flooded. + 13 + + + Irregularly flooded + Tidal water floods land surface less often than daily; the area must be flooded by tides at least once yearly as a result of extreme high spring tide plus wind plus flow. + 11 + + + Irregularly exposed + Land surface is exposed by tides less often than daily; the area from mean low tide to extreme low spring tide. + 12 + + + Wind-tidally flooded + Flooded by the alternate rise and fall of the surface of oceans, seas, and the bays, rivers, etc. connected to them, caused by the back-up of water caused by unfavorable winds. + 10 + + + closed list + What is the hydrologic regime, which is a reflection of frequency and duration of flooding? List is taken from Cowardin et al. 1979, 1985. + + 711 + 712 + 225 + 225 + + 1.0.0 + + + 933 + soilMoistureRegime + Soil Moisture Regime + logical + yes + varchar (30) + n/a + + n/a + closed + + + Hydric + + 9 + + + Hygric + + 7 + + + Mesic + + 5 + + + Subhydric + + 8 + + + Subhygric + + 6 + + + Submesic + + 4 + + + Subxeric + + 3 + + + Very xeric + + 1 + + + Xeric + + 2 + + + closed list + How moist was the soil at the sampling event? + + 714 + 716 + 226 + 226 + + 1.0.0 + + + 936 + soilDrainage + Soil Drainage + logical + yes + varchar (30) + n/a + + n/a + closed + + + excessively drained + Soils are free from any evidence of gleying throughout the profile. These soils are commonly very coarse textured (e.g., >35% volume of particles > 2 mm in size) or soils on very steep slopes. Sometimes described as "very rapidly drained." + 1 + + + somewhat excessively drained + The soil moisture content seldom exceeds field capacity in any horizon except immediately after water addition. Soils are free from any evidence of gleying throughout the profile. Rapidly drained soils are commonly coarse textured or soils on steep slopes. Sometimes described as "rapidly drained." + 2 + + + well drained + The soil moisture content does not normally exceed field capacity in any horizon (except possibly the C) for a significant part of the year. Soils are usually free from mottling in the upper 3 feet (1 m), but may be mottled below this depth. B horizons, if present, are reddish, brownish, or yellowish. + 3 + + + moderately well drained + The soil moisture in excess of field capacity remains for a small but significant period of the year. Soils are commonly mottled (chroma < 2) in the lower B and C horizons or below a depth of 2 feet (0.6 m). The Ae horizon, if present, may be faintly mottled in fine-textured soils and in medium-textured soils that have a slowly permeable layer below the solum. In grassland soils the B and C horizons may be only faintly mottled and the A horizon may be relatively thick and dark. + 4 + + + somewhat poorly drained + The soil moisture in excess of field capacity remains in subsurface horizons for moderately long periods during the year. Soils are commonly mottled in the B and C horizons; the Ae horizon, if present, may be mottled. The matrix generally has a lower chroma than in the well-drained soil on similar parent material. Sometimes described as "imperfectly drained." + 5 + + + poorly drained + The soil moisture in excess of field capacity remains in all horizons for a large part of the year. The soils are usually very strongly gleyed (low chroma colors, such as gray, bluish, or gray-green). Except in high-chroma parent materials the B, if present, and upper C horizons usually have matrix colors of low chroma. Faint mottling may occur throughout. + 6 + + + very poorly drained + Free water remains at or within 12 inches of the surface most of the year. The soils are usually very strongly gleyed. Subsurface horizons usually are of low chroma and yellowish to bluish hues. Mottling may be present but at the depth in the profile. Very poorly drained soils usually have a mucky or peaty surface horizon. + 7 + + + closed list + Identifies the natural drainage conditions of the soil and refers to the frequency and duration of wet periods. The soil drainage classes are defined in terms of (1) actual moisture content (in excess of field moisture capacity) and (2) the extent of the period during which excess water is present in the plant-root zone. Soil drainage class categories conform to the FGDC Soil Geographic Data Standards, September 1997. (http://www.fgdc.gov/standards/documents/standards/soils/soil997.PDF.) Definitions are derived from Grossman et al. (1998) and Sims et al. (1997). + + 717 + 719 + 227 + 227 + + 1.0.0 + + + 939 + waterSalinity + Water Salinity + logical + yes + varchar (30) + n/a + + n/a + closed + + + Brackish + 0.5 to 30 ppt + 2 + + + Freshwater + less than 0.5 ppt + 3 + + + Saltwater + greater than 30 ppt + 1 + + + closed list + How saline is the water, if a flooded community? + + 720 + 228 + + 1.0.0 + + + 942 + waterDepth + Water Depth + logical + yes + Float + n/a + + n/a + no + + n/a + For aquatic or marine vegetation, what was the water depth in m. + m + + 723 + 229 + + 1.0.0 + + + 945 + shoreDistance + Shore Distance + logical + yes + Float + n/a + + n/a + no + + n/a + For aquatic or marine vegetation, what was the closest distance to shore in m. + m + + 726 + 230 + + 1.0.0 + + + 948 + soilDepth + Soil Depth + logical + yes + Float + n/a + + n/a + no + + n/a + Median depth to bedrock or permafrost in m (usually from averaging multiple probe readings). + m + + 729 + 730 + 231 + + 1.0.0 + + + 951 + organicDepth + Organic Depth + logical + yes + Float + n/a + + n/a + no + + n/a + Depth of the surficial organic layer, where present, in centimeters. + cm + + 732 + 232 + + 1.0.0 + + + 954 + SOILTAXON_ID + Soil Taxon + logical + yes + Integer + FK + + soilTaxon.SOILTAXON_ID + (SELECT soilName from soilTaxon where observation.soilTaxon_ID=soilTaxon.soilTaxon_ID) + no + + hierarchy + Foreign key into table of soil taxa within the USDA classification hierarchy, including Order, Suborder, Greatgroup, Subgroup, Family and Series. + + 820 + 233 + + 1.0.0 + + + 957 + soilTaxonSrc + Soil Taxon Source + logical + yes + varchar (200) + n/a + + n/a + closed + + + Field observation + + 1 + + + Other soil map + + 3 + + + USDA county soil survey + + 2 + + + closed list + How was the soil taxon determined (e.g., field observation, map, other sources)? + + 821 + 234 + + 1.0.0 + + + 960 + percentBedRock + Percent Bedrock + logical + yes + Float + n/a + + n/a + no + + n/a + Percent of surface that is exposed bedrock. + % + + 735 + 737 + 235 + 235 + + 1.0.0 + + + 963 + percentRockGravel + Percent Rock / Gravel + logical + yes + Float + n/a + + n/a + no + + n/a + Percent of surface that is exposed rock and gravel. + % + + 738 + 740 + 236 + 236 + + 1.0.0 + + + 966 + percentWood + Percent Wood + logical + yes + Float + n/a + + n/a + no + + n/a + Percent of surface that is wood. + % + + 741 + 743 + 237 + 237 + + 1.0.0 + + + 969 + percentLitter + Percent Litter + logical + yes + Float + n/a + + n/a + no + + n/a + Percent of surface that is litter. + % + + 744 + 746 + 238 + 238 + + 1.0.0 + + + 972 + percentBareSoil + Percent Bare Soil + logical + yes + Float + n/a + + n/a + no + + n/a + Percent of surface that is bare soil. + % + + 747 + 749 + 239 + 239 + + 1.0.0 + + + 975 + percentWater + Percent Water + logical + yes + Float + n/a + + n/a + no + + n/a + Percent of surface that is water. + % + + 750 + 752 + 240 + 240 + + 1.0.0 + + + 978 + percentOther + Percent Other + logical + yes + Float + n/a + + n/a + no + + n/a + Percent of surface that belong to an additional itemized category + % + + 753 + 755 + 241 + 241 + + 1.0.0 + + + 981 + nameOther + Name Other + logical + yes + varchar (30) + n/a + + n/a + no + + n/a + Name of additional itemized ground cover category (e.g., beer cans). + + 756 + 758 + 242 + 242 + + 1.0.0 + + + 984 + treeHt + Tree Height + logical + yes + Float + n/a + + n/a + no + + n/a + Height of the tree layer in m. + m + + 765 + 243 + + 1.0.0 + + + 987 + shrubHt + Shrub Height + logical + yes + Float + n/a + + n/a + no + + n/a + Height of the shrub layer in m. + m + + 768 + 244 + + 1.0.0 + + + 990 + fieldHt + Field Height + logical + yes + Float + n/a + + n/a + no + + n/a + Height of the field layer in m. + m + + 771 + 245 + + 1.0.0 + + + 993 + nonvascularHt + Nonvascular Height + logical + yes + Float + n/a + + n/a + no + + n/a + Height of the nonvascular layer in m. + m + + 774 + 246 + + 1.0.0 + + + 996 + submergedHt + Submerged Height + logical + yes + Float + n/a + + n/a + no + + n/a + Height of the submerged layer in m. + m + + 777 + 247 + + 1.0.0 + + + 999 + treeCover + Tree Cover + logical + yes + Float + n/a + + n/a + no + + n/a + Total cover of the tree layer in percent. Includes tall trees (single-stemmed woody plants, generally more than 5 m in height or greater at maturity under optimal growing conditions). Very tall shrubs with tree-like form may also be included here, as may other life forms, such as lianas and epiphytes. + % + + 780 + 248 + + 1.0.0 + + + 1002 + shrubCover + Shrub Cover + logical + yes + Float + n/a + + n/a + no + + n/a + Total cover of the shrub layer in percent. Includes shrubs (multiple-stemmed woody plants, generally less than 5 m in height at maturity under optimal growing conditions) and shorter trees (saplings). As with the tree stratum, other life forms present in this stratum may also be included (however, herbaceous life forms should be excluded, as their stems often die back annually and do not have as consistent a height as woody life forms). Where dwarf-shrubs (i.e. shrubs shorter than 0.5 m) form a distinct stratum (either as part of a series of strata, as in a forest, or as the top stratum of more open vegetation, such as tundra or xeric shrublands), they should be treated as a low version of the shrub stratum (or short shrub substratum). In many vegetation types, dwarf-shrubs may simply occur as one life form component of the herb stratum. + % + + 783 + 249 + + 1.0.0 + + + 1005 + fieldCover + Field Cover + logical + yes + Float + n/a + + n/a + no + + n/a + Total cover of the field layer in percent. Also referred to as Herb stratum. Includes herbs (plants without woody stems and often dying back annually), often in association with low creeping semi-shrubs, dwarf-shrubs, vines, and non-woody brambles (such as raspberries), as well as tree or shrub seedlings. + % + + 786 + 250 + + 1.0.0 + + + 1008 + nonvascularCover + Nonvascular Cover + logical + yes + Float + n/a + + n/a + no + + n/a + Total cover of the nonvascular layer in percent. Also referred to as moss, bryoid, or ground stratum. Defined entirely by mosses, lichens, liverworts, and alga. Ground-creeping vines, prostrate shrubs and herbs should be treated in the herb stratum. Where herbs are entirely absent, it is still possible to recognize this stratum if other very low woody or semi-woody life forms are present. + % + + 789 + 251 + + 1.0.0 + + + 1011 + floatingCover + Floating Cover + logical + yes + Float + n/a + + n/a + no + + n/a + Total cover of the floating layer in percent. Includes rooted or drifting plants that float on the water surface (e.g., duckweed, water-lily). + % + + 792 + 252 + + 1.0.0 + + + 1014 + submergedCover + Submerged Cover + logical + yes + Float + n/a + + n/a + no + + n/a + Total cover of the submerged layer in percent. Includes rooted or drifting plants that by-and-large remain submerged in the water column or on the aquatic bottom (e.g., pondweed). The focus is on the overall strata arrangement of these aquatic plants. Note that emergent plants life forms in a wetland should be placed in above water strata (e.g., cattail or sedges would be placed in the herb stratum, whereas the duckweed would be in the floating aquatic stratum). + % + + 795 + 253 + + 1.0.0 + + + 1017 + dominantStratum + Dominant Stratum + logical + yes + varchar (40) + n/a + + n/a + closed + + + Floating + + 5 + + + Herb + + 3 + + + Nonvascular + + 4 + + + Shrub + + 2 + + + Submerged + + 6 + + + Tree + + 1 + + + closed list + Which of the six standard strata is dominant? + + 798 + 800 + 254 + + 1.0.0 + + + 1020 + growthform1Type + Growthform1 Type + logical + yes + varchar (40) + n/a + + n/a + closed + + + Trees + larger woody plants, mostly well above 5 m tall + 10 + + + Needle-leaved tree + mainly conifers - pine, spruce, larch, redwood, etc. + 20 + + + Broad-leaved deciduous tree + leaves shed in the temperate zone winter, or in the tropical dry season + 30 + + + Broad-leaved evergreen tree + many tropical and subtropical trees, mostly with medium-sized leaves + 40 + + + Thorn tree + armed with spines, in many cases with compound, deciduous leaves, often reduced in size + 50 + + + Evergreen sclerophyllous tree + with smaller, tough, evergreen leaves + 60 + + + Succulent tree + primarily cacti and succulent euphorbs + 70 + + + Palm tree + rosette trees, unbranched with a crown of large leaves + 80 + + + Tree fern + rosette trees, unbranched with a crown of large leaves + 90 + + + Bamboo + arborescent grasses with woody-like stems + 100 + + + Other tree + other type of tree not on the list + 110 + + + Shrubs + smaller woody plants, mostly below 5 m tall + 120 + + + Needle-leaved shrub + mainly conifers - juniper, yew, etc. + 130 + + + Broad-leaved deciduous shrub + leaves shed in the temperate zone winter, or in the tropical dry season + 140 + + + Broad-leaved evergreen shrub + many tropical and temperate shrubs, mostly with medium to small-sized leaves + 150 + + + Thorn shrub + armed with spines, in many cases with compound, deciduous leaves, often reduced in size + 160 + + + Evergreen sclerophyllous shrub + with smaller, tough, evergreen leaves + 170 + + + Palm shrub + rosette shrubs, unbranched with a short crown of leaves + 180 + + + Dwarf-shrub + low shrubs spreading near the ground surface, less than 50 cm high + 190 + + + Semi-shrub + suffrutescent, i.e., with the upper parts of the stems and branches dying back in unfavorable seasons + 200 + + + Succulent shrub + cacti, certain euphorbias, etc. + 210 + + + Other shrub + other type of shrub not on the list + 220 + + + Herbs + plants without perennial aboveground woody stems + 230 + + + Forb + herbs other than ferns and graminoids + 240 + + + Graminoid + grasses, sedges, and other grass like plants + 250 + + + Fern and fern allies + pteridophytes -ferns, clubmosses, horsetails, etc + 260 + + + Succulent forb + + 270 + + + Aquatic herb + floating and submergent + 280 + + + Other herbaceous + other type of herbaceous species not on the list + 290 + + + Moss + + 300 + + + Liverwort/hornwort + + 310 + + + Lichen + + 320 + + + Alga + + 330 + + + Epiphyte + plants growing wholly above the ground surface on other plants + 340 + + + Vine/liana + woody climbers or vines + 350 + + + Other/unknown + other type of species not on the list + 360 + + + Not assessed + + 370 + + + closed list + The predominant growth form? + + 801 + 803 + 255 + + 1.0.0 + + + 1023 + growthform2Type + Growthform2 Type + logical + yes + varchar (40) + n/a + + n/a + closed + + + Trees + larger woody plants, mostly well above 5 m tall + 10 + + + Needle-leaved tree + mainly conifers - pine, spruce, larch, redwood, etc. + 20 + + + Broad-leaved deciduous tree + leaves shed in the temperate zone winter, or in the tropical dry season + 30 + + + Broad-leaved evergreen tree + many tropical and subtropical trees, mostly with medium-sized leaves + 40 + + + Thorn tree + armed with spines, in many cases with compound, deciduous leaves, often reduced in size + 50 + + + Evergreen sclerophyllous tree + with smaller, tough, evergreen leaves + 60 + + + Succulent tree + primarily cacti and succulent euphorbs + 70 + + + Palm tree + rosette trees, unbranched with a crown of large leaves + 80 + + + Tree fern + rosette trees, unbranched with a crown of large leaves + 90 + + + Bamboo + arborescent grasses with woody-like stems + 100 + + + Other tree + other type of tree not on the list + 110 + + + Shrubs + smaller woody plants, mostly below 5 m tall + 120 + + + Needle-leaved shrub + mainly conifers - juniper, yew, etc. + 130 + + + Broad-leaved deciduous shrub + leaves shed in the temperate zone winter, or in the tropical dry season + 140 + + + Broad-leaved evergreen shrub + many tropical and temperate shrubs, mostly with medium to small-sized leaves + 150 + + + Thorn shrub + armed with spines, in many cases with compound, deciduous leaves, often reduced in size + 160 + + + Evergreen sclerophyllous shrub + with smaller, tough, evergreen leaves + 170 + + + Palm shrub + rosette shrubs, unbranched with a short crown of leaves + 180 + + + Dwarf-shrub + low shrubs spreading near the ground surface, less than 50 cm high + 190 + + + Semi-shrub + suffrutescent, i.e., with the upper parts of the stems and branches dying back in unfavorable seasons + 200 + + + Succulent shrub + cacti, certain euphorbias, etc. + 210 + + + Other shrub + other type of shrub not on the list + 220 + + + Herbs + plants without perennial aboveground woody stems + 230 + + + Forb + herbs other than ferns and graminoids + 240 + + + Graminoid + grasses, sedges, and other grass like plants + 250 + + + Fern and fern allies + pteridophytes -ferns, clubmosses, horsetails, etc + 260 + + + Succulent forb + + 270 + + + Aquatic herb + floating and submergent + 280 + + + Other herbaceous + other type of herbaceous species not on the list + 290 + + + Moss + + 300 + + + Liverwort/hornwort + + 310 + + + Lichen + + 320 + + + Alga + + 330 + + + Epiphyte + plants growing wholly above the ground surface on other plants + 340 + + + Vine/liana + woody climbers or vines + 350 + + + Other/unknown + other type of species not on the list + 360 + + + Not assessed + + 370 + + + closed list + The second-most predominant growthform? + + 804 + 256 + + 1.0.0 + + + 1026 + growthform3Type + Growthform3 Type + logical + yes + varchar (40) + n/a + + n/a + closed + + + Trees + larger woody plants, mostly well above 5 m tall + 10 + + + Needle-leaved tree + mainly conifers - pine, spruce, larch, redwood, etc. + 20 + + + Broad-leaved deciduous tree + leaves shed in the temperate zone winter, or in the tropical dry season + 30 + + + Broad-leaved evergreen tree + many tropical and subtropical trees, mostly with medium-sized leaves + 40 + + + Thorn tree + armed with spines, in many cases with compound, deciduous leaves, often reduced in size + 50 + + + Evergreen sclerophyllous tree + with smaller, tough, evergreen leaves + 60 + + + Succulent tree + primarily cacti and succulent euphorbs + 70 + + + Palm tree + rosette trees, unbranched with a crown of large leaves + 80 + + + Tree fern + rosette trees, unbranched with a crown of large leaves + 90 + + + Bamboo + arborescent grasses with woody-like stems + 100 + + + Other tree + other type of tree not on the list + 110 + + + Shrubs + smaller woody plants, mostly below 5 m tall + 120 + + + Needle-leaved shrub + mainly conifers - juniper, yew, etc. + 130 + + + Broad-leaved deciduous shrub + leaves shed in the temperate zone winter, or in the tropical dry season + 140 + + + Broad-leaved evergreen shrub + many tropical and temperate shrubs, mostly with medium to small-sized leaves + 150 + + + Thorn shrub + armed with spines, in many cases with compound, deciduous leaves, often reduced in size + 160 + + + Evergreen sclerophyllous shrub + with smaller, tough, evergreen leaves + 170 + + + Palm shrub + rosette shrubs, unbranched with a short crown of leaves + 180 + + + Dwarf-shrub + low shrubs spreading near the ground surface, less than 50 cm high + 190 + + + Semi-shrub + suffrutescent, i.e., with the upper parts of the stems and branches dying back in unfavorable seasons + 200 + + + Succulent shrub + cacti, certain euphorbias, etc. + 210 + + + Other shrub + other type of shrub not on the list + 220 + + + Herbs + plants without perennial aboveground woody stems + 230 + + + Forb + herbs other than ferns and graminoids + 240 + + + Graminoid + grasses, sedges, and other grass like plants + 250 + + + Fern and fern allies + pteridophytes -ferns, clubmosses, horsetails, etc + 260 + + + Succulent forb + + 270 + + + Aquatic herb + floating and submergent + 280 + + + Other herbaceous + other type of herbaceous species not on the list + 290 + + + Moss + + 300 + + + Liverwort/hornwort + + 310 + + + Lichen + + 320 + + + Alga + + 330 + + + Epiphyte + plants growing wholly above the ground surface on other plants + 340 + + + Vine/liana + woody climbers or vines + 350 + + + Other/unknown + other type of species not on the list + 360 + + + Not assessed + + 370 + + + closed list + The third-most predominant growthform + + 807 + 257 + + 1.0.0 + + + 1029 + growthform1Cover + Growthform1 Cover + logical + yes + Float + n/a + + n/a + no + + n/a + Total cover of the predominant growthform? + % + + 810 + 812 + 258 + + 1.0.0 + + + 1032 + growthform2Cover + Growthform2 Cover + logical + yes + Float + n/a + + n/a + no + + n/a + Total cover of the second-most predominant growthform? + % + + 813 + 259 + + 1.0.0 + + + 1035 + growthform3Cover + Growthform3 Cover + logical + yes + Float + n/a + + n/a + no + + n/a + Total cover of the third-most predominant growthform? + % + + 816 + 260 + + 1.0.0 + + + 1038 + totalCover + Total Cover + logical + yes + Float + n/a + + n/a + no + + n/a + The total cover, in percent, of all vegetation on the plot. + % + + 817 + 819 + 261 + + 1.0.2 + + + 1041 + accessionCode + Observation Accession Code + logical + yes + varchar (255) + n/a + + n/a + no + + n/a + Code that uniquely references this record, allowing reference to this record for this version of this database. Better than a primary key, which is automatically generated by a database and not globally unique. VegBank Accession codes are only generated by VegBank, and therefore data integrity can be guaranteed, unlike with a primary key (number). + + 819 + 820 + 262 + 262 + + 1.0.6 + + + 1044 + notesPublic + Notes Public + logical + yes + Boolean + n/a + + n/a + no + + n/a + TRUE indicates that public notes pertaining to this plot exist in "vegPlot.note" + + 824 + 263 + + 1.0.0 + + + 1047 + notesMgt + Notes Mgt + logical + yes + Boolean + n/a + + n/a + no + + n/a + TRUE indicates that nonpublic management notes pertaining to this plot exist in "vegPlot.note" + + 827 + 264 + + 1.0.0 + + + 1050 + revisions + Revisions + logical + yes + Boolean + n/a + + n/a + no + + n/a + TRUE indicates that revisions exist in vegPlot.Revision + + 830 + 265 + + 1.0.0 + + + 1053 + emb_observation + this row embargoed. + denorm + yes + Integer + n/a + + n/a + no + + n/a + This value mimics the default embargo value for the plot that this record belongs to. + 1.0.2 + + + 1056 + interp_orig_ci_ID + Original commInterpret ID + denorm + yes + Integer + n/a + + n/a + no + + n/a + The first community interpretation ID where the plot was assigned to a community. + 1.0.3 + addInterpFldsToObs.sql + + + 1059 + interp_orig_cc_ID + CommConcept_ID + denorm + yes + Integer + n/a + + n/a + no + + n/a + the Comm Concept_ID for this Interpretation. + 1.0.3 + addInterpFldsToObs.sql + + + 1062 + interp_orig_sciname + Scientific Name of Community. + denorm + yes + text + n/a + + n/a + no + + n/a + The Scientific Name for this Comm Concept + 1.0.3 + addInterpFldsToObs.sql + + + 1065 + interp_orig_code + CEGL-type code of Community. + denorm + yes + text + n/a + + n/a + no + + n/a + The CEGL type code for this Comm Concept. + 1.0.3 + addInterpFldsToObs.sql + + + 1068 + interp_orig_party_id + Party_ID of classifier. + denorm + yes + Integer + n/a + + n/a + no + + n/a + The Party_ID of the classifier. + 1.0.3 + addInterpFldsToObs.sql + + + 1071 + interp_orig_partyname + Classifier. + denorm + yes + text + n/a + + n/a + no + + n/a + The Name of the classifier. + 1.0.3 + addInterpFldsToObs.sql + + + 1074 + interp_current_ci_ID + Most Recent Classification commInterp ID + denorm + yes + Integer + n/a + + n/a + no + + n/a + The most recent community interpretation of the plot. + 1.0.3 + addInterpFldsToObs.sql + + + 1077 + interp_current_cc_ID + CommConcept_ID + denorm + yes + Integer + n/a + + n/a + no + + n/a + the Comm Concept_ID for this Interpretation. + 1.0.3 + addInterpFldsToObs.sql + + + 1080 + interp_current_sciname + Scientific Name of Community. + denorm + yes + text + n/a + + n/a + no + + n/a + The Scientific Name for this Comm Concept + 1.0.3 + addInterpFldsToObs.sql + + + 1083 + interp_current_code + CEGL-type code of Community. + denorm + yes + text + n/a + + n/a + no + + n/a + The CEGL type code for this Comm Concept. + 1.0.3 + addInterpFldsToObs.sql + + + 1086 + interp_current_party_id + Party_ID of classifier. + denorm + yes + Integer + n/a + + n/a + no + + n/a + The Party_ID of the classifier. + 1.0.3 + addInterpFldsToObs.sql + + + 1089 + interp_current_partyname + Classifier. + denorm + yes + text + n/a + + n/a + no + + n/a + The Name of the classifier. + 1.0.3 + addInterpFldsToObs.sql + + + 1092 + interp_bestfit_ci_ID + Best Fit commInterp ID + denorm + yes + Integer + n/a + + n/a + no + + n/a + The best fit, confidence pattern community interpretation ID. + 1.0.3 + addInterpFldsToObs.sql + + + 1095 + interp_bestfit_cc_ID + CommConcept_ID + denorm + yes + Integer + n/a + + n/a + no + + n/a + the Comm Concept_ID for this Interpretation. + 1.0.3 + addInterpFldsToObs.sql + + + 1098 + interp_bestfit_sciname + Scientific Name of Community. + denorm + yes + text + n/a + + n/a + no + + n/a + The Scientific Name for this Comm Concept + 1.0.3 + addInterpFldsToObs.sql + + + 1101 + interp_bestfit_code + CEGL-type code of Community. + denorm + yes + text + n/a + + n/a + no + + n/a + The CEGL type code for this Comm Concept. + 1.0.3 + addInterpFldsToObs.sql + + + 1104 + interp_bestfit_party_id + Party_ID of classifier. + denorm + yes + Integer + n/a + + n/a + no + + n/a + The Party_ID of the classifier. + 1.0.3 + addInterpFldsToObs.sql + + + 1107 + interp_bestfit_partyname + Classifier. + denorm + yes + text + n/a + + n/a + no + + n/a + The Name of the classifier. + 1.0.3 + addInterpFldsToObs.sql + + + 2300 + topTaxon1Name + Top Taxon #1 + denorm + yes + varchar (255) + n/a + + n/a + no + + n/a + Name of the highest cover taxon on the plot, ignoring strata. + 1.0.2 + addTop5SppToObs_denormFlds.sql + + + 2301 + topTaxon2Name + Top Taxon #2 + denorm + yes + varchar (255) + n/a + + n/a + no + + n/a + Name of the 2nd highest cover taxon on the plot, ignoring strata. + 1.0.2 + addTop5SppToObs_denormFlds.sql + + + 2302 + topTaxon3Name + Top Taxon #3 + denorm + yes + varchar (255) + n/a + + n/a + no + + n/a + Name of the 3rd highest cover taxon on the plot, ignoring strata. + 1.0.2 + addTop5SppToObs_denormFlds.sql + + + 2303 + topTaxon4Name + Top Taxon #4 + denorm + yes + varchar (255) + n/a + + n/a + no + + n/a + Name of the 4th highest cover taxon on the plot, ignoring strata. + 1.0.2 + addTop5SppToObs_denormFlds.sql + + + 2304 + topTaxon5Name + Top Taxon #5 + denorm + yes + varchar (255) + n/a + + n/a + no + + n/a + Name of the 5th highest cover taxon on the plot, ignoring strata. + 1.0.2 + addTop5SppToObs_denormFlds.sql + + + 2309 + hasObservationSynonym + Has Synonym Observation + denorm + yes + Boolean + n/a + + n/a + no + + n/a + Denormalized field to show if there is an observation synonym in the observationSynonym table for this observation. + 1.0.7 + addObsSynDenorm.sql + + + + observationContributor + Observation Contributor + This table stores information about which parties contributed to specific plot observation events. + This table serves as an intersection that links a party with a specific plot observation event. Note that there is no plotContributor table because all contributions take place at a particular observation, such as the first observation. + plot + 1.0.0 + + 1110 + OBSERVATIONCONTRIBUTOR_ID + ID + logical + yes + serial + PK + + n/a + no + + n/a + Database generated identifier assigned to each unique contribution to an observation event. + + 19 + + 1.0.0 + + + 1113 + OBSERVATION_ID + Observation + logical + no + Integer + FK + + observation.OBSERVATION_ID + no + + This is the foreign key into the Observation table. + Foreign key pointing to a given plot observation event to which the contribution was made. + + 20 + + 1.0.0 + + + 1116 + PARTY_ID + Party + logical + no + Integer + FK + + party.PARTY_ID + (SELECT CASE WHEN surname is null THEN 'org:' || organizationname ELSE surname || ', ' || givenname END FROM party WHERE party.party_id=observationContributor.party_id) + no + + This is the foreign key into the party table. + Foreign key pointing to the specific party that made the contribution. + + 837 + 838 + 266 + + 1.0.0 + + + 1119 + ROLE_ID + Role + logical + no + Integer + FK + + aux_Role.ROLE_ID + (select roleCode from aux_role where aux_role.role_id=observationContributor.role_id) + no + + This is the foreign key into the aux_Role table + Foreign key that identifies the role that the party had in the plot observation (e.g., PI, contact, research advisor, field assistant, taxonomist, owner, guide, etc.). + + 839 + 840 + 267 + + 1.0.0 + + + 1122 + contributionDate + Contribution Date + logical + yes + Date + n/a + + n/a + no + + n/a + The date of the specific contribution, which will generally be within the time span of the plot observation event defined by the obsStartDate and obsStopDate + + 841 + 843 + 268 + + 1.0.0 + + + + observationSynonym + Observation Synonym + This table stores opinions as to whether one observation record is a synonym of another owing to double entry into the database. + + plot + 1.0.0 + + 1125 + OBSERVATIONSYNONYM_ID + ID + logical + yes + serial + PK + + n/a + no + + Primary Key for the observationSynonym table. + Database generated identifier assigned to each unique interpretation of an observation as a synonym. + + 844 + 845 + 269 + + 1.0.0 + + + 1128 + synonymObservation_ID + Synonym Observation + logical + no + Integer + FK + + observation.OBSERVATION_ID + no + + Foreign key into the observation table + Link to the observation table identifying which observation is being reduced to synonymy. + + 846 + 847 + 270 + + 1.0.0 + + + 1131 + primaryObservation_ID + Primary Observation + logical + no + Integer + FK + + observation.OBSERVATION_ID + no + + Foreign key into the observation table + Link to the observation table identifying which observation is the preferred synonym for the observation being reduced to synonym. + + 848 + 849 + 271 + + 1.0.0 + + + 1134 + PARTY_ID + Party + logical + no + Integer + FK + + party.PARTY_ID + no + + This is the foreign key into the party table. + Foreign key pointing to the specific party that made the reduction to synonym. + + 850 + 851 + 272 + + 1.0.0 + + + 1137 + ROLE_ID + Role + logical + no + Integer + FK + + aux_Role.ROLE_ID + no + + This is the foreign key into the aux_Role table + Foreign key that identifies the role that the party had in the plot synonomization (e.g., plot author, data manager, publication author, researcher, generic user, etc.). + + 852 + 853 + 273 + + 1.0.0 + + + 1140 + classStartDate + Start Date + logical + no + Date + now() + n/a + + n/a + no + + n/a + Start date for the synonymization event. + + 854 + 855 + 856 + 274 + + 1.0.0 + + + 1143 + classStopDate + Stop Date + logical + yes + Date + n/a + + n/a + no + + n/a + Stop date for the synonymization event. + + 857 + 858 + 859 + 275 + + 1.0.0 + + + 1146 + synonymComment + Synonym Comment + logical + yes + text + n/a + + n/a + no + + n/a + Notes about the reason for the synonymization. + + 860 + 861 + 862 + 276 + + 1.0.0 + + + 1147 + accessionCode + Accession Code + logical + yes + varchar (255) + n/a + + n/a + no + + n/a + Code that uniquely references this record, allowing reference to this record for this version of this database. Better than a primary key, which is automatically generated by a database and not globally unique. VegBank Accession codes are only generated by VegBank, and therefore data integrity can be guaranteed, unlike with a primary key (number). + + 1306 + 429 + + 1.0.6 + + + + party + Party + Party contributing to collection or interpretation of a plot; may be either an individual or an organization. + + plot + true + 1.0.0 + + 1149 + PARTY_ID + ID + logical + yes + serial + PK + + n/a + no + + Primary key for the party table. + Database generated identifier assigned to each unique party. + true + + 19 + + 1.0.0 + + + 1152 + salutation + Salutation + logical + yes + varchar (20) + n/a + + n/a + no + + n/a + Salutation preceding one's given name. + + 865 + 277 + + 1.0.0 + + + 1155 + givenName + Given Name + logical + yes + varchar (50) + n/a + + n/a + no + + n/a + One's first name. + true + + 868 + 869 + 278 + + 1.0.0 + + + 1158 + middleName + Middle Name + logical + yes + varchar (50) + n/a + + n/a + no + + n/a + One's middle name or initial, if any. + true + + 871 + 279 + + 1.0.0 + + + 1161 + surName + Surname + logical + yes + varchar (50) + n/a + + n/a + no + + n/a + Name shared in common to identify the members of a family, as distinguished from each member's given name. + true + + 874 + 875 + 280 + + 1.0.0 + + + 1164 + organizationName + Organization Name + logical + yes + varchar (100) + n/a + + n/a + no + + n/a + Name of an organization. + true + + 877 + 878 + 879 + 281 + + 1.0.0 + + + 1167 + currentName_ID + Current Name + logical + yes + Integer + FK + + party.PARTY_ID + (SELECT CASE WHEN surname is null THEN 'org:' || organizationname ELSE surname || ', ' || givenname END FROM party2 WHERE party.currentname_id=party2.party_id) + no + + n/a + Recursive foreign key to current name of this party. + + 881 + 282 + + 1.0.0 + + + 1170 + contactInstructions + Contact Instructions + logical + yes + text + n/a + + n/a + no + + n/a + Instructions for contacting a party. + true + + 882 + 884 + 283 + + 1.0.0 + + + 1173 + email + Email + implementation + yes + varchar (120) + n/a + + n/a + no + + + + true + + 887 + 888 + 889 + 284 + + 1.0.0 + + + 1176 + accessionCode + Accession Code + logical + yes + varchar (255) + n/a + + n/a + no + + n/a + Code that uniquely references this record, allowing reference to this record for this version of this database. Better than a primary key, which is automatically generated by a database and not globally unique. VegBank Accession codes are only generated by VegBank, and therefore data integrity can be guaranteed, unlike with a primary key (number). + + 890 + 285 + + 1.0.6 + + + 1179 + partyType + Party Type + logical + yes + varchar (40) + n/a + + n/a + closed + + + user + a private user of vegbank- party info not to be exported or displayed + 1 + + + person + a person + 2 + + + team + a group of persons, but not a whole organization + 3 + + + organization + an entire organization + 4 + + + consortium + a group of organizations + 5 + + + n/a + The type of party this is. + + 868 + 870 + 286 + + 1.0.2 + + + 1182 + partyPublic + Party is public? + denorm + yes + Boolean + true + n/a + + n/a + no + + n/a + This party may be displayed on the website. Not used for parties that are not contributing anywhere and have only signed up as users. + + 1.0.5 + Added default of true in 1.0.5 + + + 1185 + d_obscount + Plot Count + denorm + yes + Integer + n/a + + n/a + no + + n/a + Number of observations associated with this entity. + 1.0.3 + + + + partyMember + Party Member + Allows parties to contain other parties within them, so that the children parties can have permissions of the parent parties. + not implemented + plot + 1.0.0 + + 1188 + partyMember_ID + Party Member ID + logical + no + serial + PK + + n/a + no + + n/a + Database generated number to uniquely identify this record of this table. + + 19 + + 1.0.2 + + + 1191 + parentParty_ID + Main Party + logical + no + Integer + FK + + party.PARTY_ID + no + + n/a + Link to the parent party to whom the child party here belongs. + + 20 + + 1.0.2 + + + 1194 + childParty_ID + Sub-Party + logical + no + Integer + FK + + party.PARTY_ID + no + + n/a + Link to the child party who belongs to the parent listed in parentParty_ID. + + 21 + + 1.0.2 + + + 1197 + role_ID + Role + logical + yes + Integer + FK + + aux_Role.ROLE_ID + no + + n/a + Link to the role which defines the child's role in the parent party. + + 22 + + 1.0.2 + + + 1200 + memberStart + Member Start + logical + no + Date + now() + n/a + + n/a + no + + n/a + Start date for the child's membership in the parent party. + + 23 + + 1.0.2 + + + 1203 + memberStop + Member Stop + logical + yes + Date + n/a + + n/a + no + + n/a + Stop date for the child's membership in the parent party. + + 24 + + 1.0.2 + + + + place + Place + This table is the intersection between the plot table and the namedPlace table and is used for querying for plots located in a named place or named region in which a plot or group of plots is located. + + plot + 1.0.0 + + 1206 + PLOTPLACE_ID + ID + logical + yes + serial + PK + + n/a + no + + Primary key for the place table + Database generated identifier assigned to each unique plot occurrence at a place. + + 19 + + 1.0.0 + + + 1209 + PLOT_ID + Plot + logical + no + Integer + FK + + plot.PLOT_ID + no + + Foreign key into the plot table. + Link to a specific plot. + + 893 + 287 + + 1.0.0 + + + 1212 + calculated + Calculated? + logical + yes + Boolean + n/a + + n/a + (CASE WHEN calculated THEN 'Yes' ELSE 'No' END) + no + + n/a + TRUE If occurrence is calculated based on geo-coordinates, FALSE if assigned by the author (If, both methods used, the author assigned value takes priority). + + 894 + 896 + 288 + + 1.0.0 + + + 1215 + NAMEDPLACE_ID + Place Name + logical + no + Integer + FK + + namedPlace.NAMEDPLACE_ID + (select placeSystem || ': ' || placeName from namedPlace where namedPlace.NAMEDPLACE_ID=place.namedplace_id) + no + + Foreign key into the namedPlace table + Link to a specific named place or region + + 897 + 898 + 289 + + 1.0.0 + + + + plot + Plot + This table stores general, constant information about the a given plot + plot contains Plot location, dimension, and similarly constant site data, plus metadata that need be stored only once. Transient observational information (procured during the first or subsequent observation events) are stored separately in observation or its children. + plot + 1.0.0 + + 1218 + PLOT_ID + ID + logical + yes + serial + PK + + n/a + no + + Primary key for plot + Database generated identifier assigned to each unique plot. + + 290 + + 1.0.0 + + + 1221 + authorPlotCode + Author Plot Code + logical + no + varchar (30) + n/a + + n/a + no + + n/a + Author's Plot number/code, or the original plot number if taken from literature. + + 901 + 902 + 291 + 291 + + 1.0.0 + + + 1224 + reference_ID + Reference + logical + yes + Integer + FK + + reference.reference_ID + (SELECT reference.shortName from reference where reference.reference_ID = plot.reference_ID) + no + + Foreign key into the reference table + Link to the source reference from which this plot record was taken + + 905 + 292 + + 1.0.0 + + + 1227 + PARENT_ID + Parent + logical + yes + Integer + FK + + plot.PLOT_ID + (SELECT authorPlotCode from plot as plParent where plParent.plot_ID = plot.parent_ID) + no + + Recursive foreign key + Link to the parent plot when plot is nested within another plot. + + 907 + 293 + + 1.0.0 + + + 1230 + realLatitude + Real Latitude + logical + yes + Float + n/a + + n/a + no + + n/a + Latitude of the plot origin in degrees and decimals, datum =WGS84 + º + + 1.0.0 + + + 1233 + realLongitude + Real Longitude + logical + yes + Float + n/a + + n/a + no + + n/a + Longitude of the plot origin in degrees and decimals, datum = WGS84 + º + + 1.0.0 + + + 1236 + locationAccuracy + Location Accuracy + logical + yes + Float + n/a + + n/a + no + + n/a + Estimated accuracy of the location of the plot. Plot origin has a 95% or greater probability of being within this many meters of the reported location. + m + + 914 + 916 + 296 + 296 + + 1.0.0 + + + 1239 + confidentialityStatus + Confidentiality Status + logical + no + Integer + n/a + + n/a + (SELECT confidentialityText FROM dba_confidentialitystatus where plot.confidentialitystatus=dba_confidentialitystatus.confidentialitystatus) + closed + + + 0 + Public + 1 + + + 1 + 1 km radius (nearest 0.01 degree) + 2 + + + 2 + 10 km radius (nearest 0.1 degree) + 3 + + + 3 + 100 km radius (nearest degree) + 4 + + + 4 + Location embargo + 5 + + + 5 + Public embargo on data + 6 + + + 6 + Full embargo on data + 7 + + + closed list, default=0 + Are the data to be considered confidential? 0=no, 1= 1km radius, 2=10km radius, 3=100km radius, 4=location embargo, 5=public embargo on all plot data, 6=full embargo on all plot data. This applies also to region. + + 918 + 919 + 297 + 297 + + 1.0.0 + + + 1242 + confidentialityReason + Confidentiality Reason + logical + yes + varchar (200) + n/a + + n/a + no + + n/a + The reason for confidentiality. This field should not be open to public view. Reasons might include specific rare species, ownership, prepublication embargo, or many other reason + + 1.0.0 + + + 1245 + latitude + Latitude + logical + yes + Float + n/a + + n/a + no + + n/a + Latitude of the plot origin in degrees and decimals, datum =WGS84, fuzzing applied + º + + 924 + 925 + 2 + 298 + 298 + + 1.0.0 + + + 1248 + longitude + Longitude + logical + yes + Float + n/a + + n/a + no + + n/a + Longitude of the plot origin in degrees and decimals, datum = WGS84, fuzzing applied + º + + 927 + 928 + 3 + 299 + 299 + + 1.0.0 + + + 1251 + authorE + Author E + logical + yes + varchar (20) + n/a + + n/a + no + + n/a + Original E-W coordinate as recorded by the author + + 1.0.0 + + + 1254 + authorN + Author N + logical + yes + varchar (20) + n/a + + n/a + no + + n/a + Original N-S coordinate as recorded by the author + + 1.0.0 + + + 1257 + authorZone + Author Zone + logical + yes + varchar (20) + n/a + + n/a + no + + n/a + Original UTM zone reported by the author + + 1.0.0 + + + 1260 + authorDatum + Author Datum + logical + yes + varchar (20) + n/a + + n/a + no + + n/a + Original datum reported by the author + + 1.0.0 + + + 1263 + authorLocation + Author Location + logical + yes + varchar (200) + n/a + + n/a + no + + n/a + Original location as described by author (e.g. Town-Range-Section) + + 941 + 941 + 304 + 304 + + 1.0.0 + + + 1266 + locationNarrative + Location Narrative + logical + yes + text + n/a + + n/a + no + + n/a + Text description that provides information useful for plot relocation. + + 944 + 305 + + 1.0.0 + + + 1267 + plotRationaleNarrative + Plot Rationale Narrative + logical + yes + text + n/a + + n/a + no + + n/a + Text description about why the plot was placed where it was. + + 945 + 306 + + 1.0.5 + + + 1269 + azimuth + Azimuth + logical + yes + Float + n/a + + n/a + no + + n/a + This element stores the azimuth of the x-axis used to describe the relative coordinate system for plot shape (dsgpoly) and other spatial information about the plot. Typically the azimuth is parallel to the long axis of the plot (in the case of a rectangle). + º + + 947 + 306 + 306 + + 1.0.0 + + + 1272 + dsgpoly + DSG Polygon + logical + yes + text + n/a + + n/a + no + + n/a + This field is a text string containing the points circumscribing a plot area. These points are anticipated to have been collected using tapes, GPS, or calculated from the plot shape and area. Points are X-Y coordinates in m relative to plot origin. + + 950 + 307 + 307 + + 1.0.0 + + + 1275 + shape + Shape + logical + yes + varchar (50) + n/a + + n/a + open + + + Circle + + 3 + + + Diffuse + + 6 + + + Plotless + + 5 + + + Rectangular + + 1 + + + Square + + 2 + + + Transect/Strip + + 4 + + + Other + + 7 + + + open list + Shape of the plot area. + + 953 + 954 + 308 + 308 + + 1.0.0 + + + 1278 + area + Area + logical + yes + Float + n/a + + n/a + no + + n/a + Total area of the plot in m2. If many subplots, this area includes the subplots and the interstitial space. RESERVED VALUE: -1 is used to indicate that the plot had no boundaries. + m² + + 956 + 957 + 4 + 309 + 309 + + 1.0.0 + + + 1281 + standSize + Stand Size + logical + yes + varchar (50) + n/a + + n/a + closed + + + Extensive + greater than 100x plot size + 2 + + + Large + 10-100x plot size + 3 + + + Small + 3-10x plot size + 4 + + + Very Extensive + greater than 1000x plot size + 1 + + + Very small + 1-3x plot size + 5 + + + Inclusion + less than 1x plot size + 6 + + + closed list + The extent of this community occurrence in relation to the plot size: very extensive (>1000x plot), extensive (>100x plot), large (10-100x plot), small (3-10x plot), very small (1-3x plot). + + 959 + 310 + 310 + + 1.0.0 + + + 1284 + placementMethod + Placement Method + logical + yes + varchar (50) + n/a + + n/a + closed + + + Capture specific feature + + 6 + + + Random + + 2 + + + Regular + + 1 + + + Representative + + 5 + + + Stratified random + + 3 + + + Transect component + + 4 + + + closed list + Brief description of strategy for determining plot placement within the stand. + + 962 + 311 + + 1.0.0 + + + 1287 + permanence + Permanence + logical + yes + Boolean + n/a + + n/a + (CASE WHEN permanence THEN 'permanent plot' ELSE 'not permanent' END) + no + + n/a + Is the plot monumented so as to assure permanence? If so, this should be described in the layoutNarrative + + 965 + 967 + 312 + 312 + + 1.0.0 + + + 1290 + layoutNarrative + Layout Narrative + logical + yes + text + n/a + + n/a + no + + n/a + Text description of and the rationale for the layout of the plot. + + 968 + 313 + + 1.0.2 + + + 1293 + elevation + Elevation + logical + yes + Float + n/a + + n/a + no + + n/a + The elevation of the plot origin in meters above sea level. + m + + 971 + 972 + 6 + 314 + 314 + + 1.0.0 + + + 1296 + elevationAccuracy + Elevation Accuracy + logical + yes + Float + n/a + + n/a + no + + n/a + The accuracy of the elevation in meters. + m + + 974 + 315 + + 1.0.5 + This was changed from percent of the total elevation to meters error. Percent fails for plots at elevation 0. No plots had been loaded at this time that had this field loaded as percent. + + + 1299 + elevationRange + Elevation Range + logical + yes + Float + n/a + + n/a + no + + n/a + Meters of difference in elevations of the high and low points in the plot. + m + + 977 + 316 + + 1.0.0 + + + 1302 + slopeAspect + Slope Aspect + logical + yes + Float + n/a + + n/a + (CASE WHEN slopeaspect = -1 THEN '(n/a, flat)' WHEN slopeaspect = -2 THEN '(n/a, too irregular to determine)' ELSE slopeaspect::text END) + no + + optional list that converts + Representative azimuth of slope gradient (0-360 degrees); if too flat to determine = -1; if too irregular to determine = -2. + º + + 980 + 981 + 317 + 317 + + 1.0.0 + + + 1305 + minSlopeAspect + Min Slope Aspect + logical + yes + Float + n/a + + n/a + no + + optional list that converts + Minimum azimuth of slope gradient (0-360 degrees), counterclockwise from representative azimuth. + º + + 983 + 318 + + 1.0.0 + + + 1308 + maxSlopeAspect + Max Slope Aspect + logical + yes + Float + n/a + + n/a + no + + optional list that converts + Maximum azimuth of slope gradient (0-360 degrees), clockwise from representative azimuth + º + + 986 + 319 + + 1.0.0 + + + 1311 + slopeGradient + Slope Gradient + logical + yes + Float + n/a + + n/a + (CASE WHEN slopegradient = -1 THEN '(n/a, too irregular to determine)' ELSE slopegradient::text END) + no + + optional list that converts + Representative inclination of slope in degrees; if too irregular to determine, = -1. + º + + 989 + 990 + 320 + 320 + + 1.0.0 + + + 1314 + minSlopeGradient + Min Slope Gradient + logical + yes + Float + n/a + + n/a + no + + optional list that converts + Minimum inclination of slope in degrees. + º + + 992 + 321 + + 1.0.0 + + + 1317 + maxSlopeGradient + Max Slope Gradient + logical + yes + Float + n/a + + n/a + no + + optional list that converts + Maximum inclination of slope in degrees. + º + + 995 + 322 + + 1.0.0 + + + 1320 + topoPosition + Topographic Position + logical + yes + varchar (90) + n/a + + n/a + closed + + + Interfluve + (crest, summit, ridge): linear top of ridge, hill, or mountain; the elevated area between two fluves (drainageways) that sheds water to the drainageways. + 1 + + + High slope + (shoulder slope, upper slope, convex creep slope): geomorphic component that forms the uppermost inclined surface at the top of a slope. Comprises the transition zone from backslope to summit. Surface is dominantly convex in profile and erosional in origin. + 2 + + + High level + (mesa, high flat): level top of plateau + 3 + + + Midslope + (transportational midslope, middle slope): intermediate slope position + 4 + + + Backslope + (dipslope): subset of midslopes which are steep, linear, and may include cliff segments (fall faces). + 5 + + + Step in slope + (ledge, terracette): nearly level shelf interrupting a steep slope, rock wall, or cliff face. + 6 + + + Lowslope + (lower slope, foot slope, colluvial footslope): inner gently inclined surface at the base of a slope. Surface profile is generally concave and a transition between midslope or backslope, and toe slope. + 7 + + + Toeslope + (alluvial toeslope): outermost gently inclined surface at base of a slope. In profile, commonly gentle and linear and characterized by alluvial deposition. + 8 + + + Low level + (terrace, low flat): valley floor or shoreline representing the former position of an alluvial plain, lake, or shore. + 9 + + + Channel wall + (bank): sloping side of a channel. + 10 + + + Channel bed + (narrow valley bottom, gully arroyo): bed of single or braided watercourse commonly barren of vegetation and formed of modern alluvium. + 11 + + + Basin floor + (depression): nearly level to gently sloping, bottom surface of a basin. + 12 + + + n/a + Position of the plot on land surface (e.g., Summit, shoulder, upper slope, middle slope, lower slope, toeslope, no slope, channel bed, dune swale, pond). + + 998 + 999 + 323 + 323 + + 1.0.0 + + + 1323 + landform + Landform + logical + yes + varchar (50) + n/a + + n/a + open + + + active slope + (metastable slope) A mountain or hill slope that is responding to valley incision, and has detritus accumulated behind obstructions, indicating contemporary transport of slope alluvium. Slope gradients commonly exceed 45 percent. + 2 + + + alluvial cone + The material washed down mountain and hill slopes by ephemeral streams and deposited at the mouth of gorges in the form of a moderately steep, conical mass descending equally in all directions from the point of issue. + 6 + + + alluvial fan + A body of alluvium, with or without debris flow deposits, whose surface forms a segment of a cone that radiates downslope from the point where the stream emerges from a narrow valley onto a less sloping surface. Common longitudinal profiles are gently sloping and nearly linear. Source uplands range in relief and aerial extent from mountains and plateaus to gullied terrains on hill and piedmont slopes. + 10 + + + alluvial flat + A nearly level, graded, alluvial surface. + 15 + + + alluvial plain + A flood plain or a low-gradient delta. It may be modern or relict. + 17 + + + alluvial terrace + + 20 + + + arroyo + (wash) The flat-floored channel or an ephemeral stream, commonly with very steep to vertical banks cut in alluvium. + 22 + + + backshore terrace + + 25 + + + backswamp + (valley flat) Extensive marshy, depressed areas of flood plains between the natural levee borders of channel belts and valley sides or terraces. + 27 + + + backwater + + 30 + + + badlands + + 35 + + + bajada + + 40 + + + bald + + 45 + + + bank + + 50 + + + bar + An elongated landform generated by waves and currents and usually running parallel to the shore, composed predominantly of unconsolidated sand, gravel, cobbles, or stones with water on two sides. + 55 + + + barrier beach + + 60 + + + barrier flat + + 65 + + + barrier island(s) + + 70 + + + barrier reef + + 75 + + + basin + A depressed area with no or limited surface outlet. Examples are closed depressions in a glacial till plain, lake basin, river basin, or fault-bordered intermontane structure such as the Bighorn Basin of Wyoming. + 80 + + + basin floor + + 85 + + + bay + + 90 + + + bayou + + 95 + + + beach + The unconsolidated material that covers a gently sloping zone, typically with a concave profile, extending landward from the low-water line to the place where there is a definite change in material or physiographic form (such as a cliff) or to the line of permanent vegetation; the relatively thick and temporary accumulation of loose water-borne material (usually well-sorted sand and pebbles, accompanied by mud, cobbles, boulders, and smoothed rock and shell fragment) that is in active transit along, or deposited on the shore zone between the limits of low water and high water. + 100 + + + beach ridge + + 105 + + + bench + + 110 + + + blowout + + 115 + + + bluff + (a) A high bank or bold headland, with a broad, precipitous, sometimes rounded cliff face overlooking a plain or body of water, especially on the outside of a stream meander; (b) any cliff with a steep, broad face. + 117 + + + bottomlands + + 120 + + + braided channel or stream + (flood-plain landforms) A channel or stream with multiple channels that interweave as a result of repeated bifurcation and convergence of flow around interchannel bars, resembling in plan the strands of a complex braid. Braiding is generally confined to broad, shallow streams of low sinuosity, high bedload, non-cohesive bank material, and step gradient. At a given bank-full discharge, braided streams have steeper slopes and shallower, broader, and less stable channel cross sections than meandering streams. + 122 + + + butte + + 125 + + + caldera + + 130 + + + canyon + A long, deep, narrow, very steep-sided valley with high and precipitous walls in an area of high local relief. + 135 + + + carolina bay + + 140 + + + channel + + 145 + + + chenier + + 150 + + + chenier plain + + 155 + + + cirque + Semicircular, concave, bowl-like area with steep face primarily resulting from erosive activity of a mountain glacier. + 160 + + + cirque floor + + 165 + + + cirque headwall + + 170 + + + cliff + Any high, very steep to perpendicular or overhanging face of rock or earth; a precipice. + 175 + + + coast + + 180 + + + coastal plain + + 185 + + + col + + 190 + + + collapse sinkhole + + 195 + + + colluvial shoulder + + 200 + + + colluvial slope + + 205 + + + cove + + 210 + + + crest + (summit) The commonly linear top of a ridge, hill or mountain. + 212 + + + cuesta + + 215 + + + debris slide + + 220 + + + delta + A body of alluvium, nearly flat and fan-shaped, deposited at or near the mouth of a river or stream where it enters a body of relatively quiet water, usually a sea or lake. + 225 + + + delta plain + + 230 + + + depositional levee + + 235 + + + depositional stream terrace + + 240 + + + depression + + 245 + + + desert pavement + + 250 + + + dike + + 255 + + + doline + + 260 + + + dome + A roughly symmetrical upfold, with bed dipping in all directions, more or less equally, from a point. A smoothly rounded landform or rock mass such as a rock-capped mountain summit, roughly resembling the dome of a building. + 265 + + + drainage + + 270 + + + drainage channel (undifferentiated) + + 275 + + + draw + + 280 + + + drumlin + A low, smooth, elongated oval hill, mound, or ridge of compact glacial till that may or may not have a core of bedrock or stratified glacial drift. The longer axis is parallel to the general direction of glacier flow. Drumlins are products of streamline (laminar) flow of glaciers, which molded the subglacial floor through a combination of erosion and deposition. + 285 + + + dune (undifferentiated) + A mound, ridge, or hill of loose, windblown granular material (generally sand), either bare or covered with vegetation. + 290 + + + dune field + + 295 + + + earth flow + + 300 + + + earth hummock + + 305 + + + eroded bench + + 310 + + + eroding stream channel system + + 315 + + + erosional stream terrace + + 320 + + + escarpment + (scarp) A relatively continuous and steep slope or cliff breaking the general continuity of more gently sloping land surfaces and produced by erosion or faulting. The term is more often applied to cliffs produced by differential erosion. + 325 + + + esker + A long, narrow sinuous, steep-sided ridge composed of irregularly stratified sand and gravel that was deposited by a subsurface stream flowing between ice walls, or in an ice tunnel of a retreating glacier, and was left behind when the ice melted. + 330 + + + estuary + + 335 + + + exogenous dome + + 340 + + + fan piedmont + + 345 + + + fault scarp + + 350 + + + fault terrace + + 355 + + + fissure + + 360 + + + fissure vent + + 365 + + + flat + A general term for a level or nearly level surface or small area of land marked by little or no relief, eg. mud flat or valley flat. + 367 + + + flood plain + (bottomland) The nearly level alluvial plain that borders a stream and is subject to inundation under flood-stage conditions unless protected artificially. It is usually a constructional landform built of sediment deposited during overflow and lateral migration of the stream. + 370 + + + fluvial + + 375 + + + foothills + + 380 + + + foredune + + 385 + + + frost creep slope + + 390 + + + frost mound + + 395 + + + frost scar + + 400 + + + gap + + 405 + + + glaciated uplands + + 410 + + + glacier + + 415 + + + gorge + (a) A narrow, deep valley with nearly vertical rocky walls, enclosed by mountains, smaller than a canyon, and more steep-sided than a ravine; especially a restricted, steep-walled part of a canyon. (b) A narrow defile or passage between hills or mountains. + 420 + + + graben + + 425 + + + ground moraine + + 430 + + + gulch + + 435 + + + hanging valley + + 440 + + + headland + + 445 + + + highland + + 450 + + + hills + (foothills) A natural elevation of the land surface, rising as much as 300 m above the surrounding lowlands, usually of restricted summit area (relative to a tableland) and having a well-defined outline; hill slopes generally exceed 15%. The distinction between a hill and a mountain is often dependent on local usage. + 455 + + + hillslope bedrock outcrop + + 460 + + + hogback + + 465 + + + hoodoo + + 470 + + + hummock + A rounded or conical mound of knoll, hillock, or other small elevation. Also, a slight rise of ground above a level surface. + 475 + + + inlet + + 480 + + + inselberg + + 485 + + + interdune flat + + 490 + + + interfluve + + 495 + + + island + + 500 + + + kame + A moundlike hill of ice-contact glacial drift, composed chiefly of stratified sand and gravel. + 505 + + + kame moraine + + 510 + + + kame terrace + + 515 + + + karst + + 520 + + + karst tower + + 525 + + + karst window + + 530 + + + kegel karst + + 535 + + + kettle + A steep-sided bowl-shaped depression without surface drainage. It is in glacial drift deposits and believed to have formed by the melting of a large, detached block of stagnant ice buried in the glacial drift. + 540 + + + kettled outwash plain + + 545 + + + knob + (a) A rounded eminence, as a knoll, hillock, or small hill or mountain; especially a prominent or isolated hill with steep sides, commonly found in the southern United States. (b) A peak or other projection from the top of a hill or mountain. Also a boulder or group of boulders or an area of resistant rocks protruding from the side of a hill or mountain. + 550 + + + knoll + + 555 + + + lagoon + + 560 + + + lake + + 565 + + + lake bed + + 570 + + + lake plain + + 575 + + + lake terrace + + 580 + + + lateral moraine + + 585 + + + lateral scarp (undifferentiated) + + 590 + + + lava flow (undifferentiated) + + 595 + + + ledge + + 600 + + + levee + (floodwall, earth dike) An artificial or natural embankment built along the margin of a watercourse or an arm of the sea, to protect land from inundation or to confine streamflow to its channel. + 605 + + + loess deposit (undifferentiated) + + 610 + + + longshore bar + + 615 + + + lowland + + 620 + + + marine terrace (undifferentiated) + + 625 + + + meander belt + + 630 + + + meander scar + + 635 + + + mesa + + 640 + + + mid slope + + 645 + + + mima mound + + 650 + + + monadnock + + 655 + + + moraine (undifferentiated) + A drift topography characterized by chaotic mounds and pits, generally randomly oriented, developed in superglacial drift by collapse and flow as the underlying stagnant ice melted. Slopes may be steep and unstable and there will be used and unused stream coursed and lake depressions interspersed with the morainic ridges. Consequently, there will be rapid or abrupt changes between materials of differing lithology. + 660 + + + mound + + 665 + + + mountain valley + + 670 + + + mountain(s) + (hill) A natural elevation of the land surface, rising more than 300 m above surrounding lowlands, usually of restricted summit area (relative to a plateau), and generally having steep sides (greater than 25 percent slope) with or without considerable bare-rock surface. A mountain can occur as a single, isolated mass or in a group forming a chain or range. Mountains are primarily formed by deep-seated earth movements and/or volcanic action and secondarily by differential erosion. + 675 + + + mountain-valley fan + + 680 + + + mud flat + + 685 + + + noseslope + + 690 + + + outwash fan + + 695 + + + outwash plain + (glacial outwash, kettles) An extensive lowland area of coarse textured, glaciofluvial material. An outwash plain is commonly smooth; where pitted, due to melt-out of incorporated ice masses, it is generally low in relief. + 700 + + + outwash terrace + + 705 + + + oxbow + (meander belt, oxbow lake) A closely looping stream meander having an extreme curvature such that only a neck of land is left between the two parts of the stream. A term used in New England for the land enclosed, or partly enclosed, within an oxbow. + 710 + + + patterned ground (undifferentiated) + + 715 + + + peat dome + + 720 + + + periglacial boulderfield + + 725 + + + piedmont + + 730 + + + pimple mounds + + 735 + + + pingo + A large frost mound; especially a relatively large conical mound of soil-covered ice (commonly 30 to 50 m high and up to 400 m in diameter) raised in part by hydrostatic pressure within and below the permafrost of Arctic regions, and of more than 1 year’s duration. + 740 + + + pinnacle + + 745 + + + plain + (lowland, plateau) An extensive lowland area that ranges from level to gently sloping or undulating. A plain has few or no prominent hills or valleys, and usually occurs at low elevation with reference to surrounding areas (local relief generally less than 100m, although some, such as the Great Plains of the United States, are as much as 1000 to 1800 m above sea level.) Where dissected, remnants of a plain can form the local uplands. + 750 + + + plateau + (mesa, plain) An extensive upland mass with a relatively flat summit area that is considerably elevated (more than 100m) above adjacent lowlands, and is separated from them on one or more sides by escarpments. A comparatively large part of a plateau surface is near summit level. + 755 + + + playa + + 760 + + + polygon (high-centered) + + 765 + + + polygon (low-centered) + + 770 + + + pothole + + 775 + + + raised beach + + 780 + + + raised estuary + + 785 + + + raised mudflat + + 790 + + + raised tidal flat + + 795 + + + ravine + (gulch, draw) A small stream channel; narrow, steep-sided, and commonly V-shaped in cross section; and larger than a gully. + 800 + + + relict coastline + + 805 + + + ridge + A long, narrow elevation of the land surface, usually sharp rested with steep sides and forming an extended upland between valleys. The term is used in areas of both hill and mountain relief. + 810 + + + ridge and valley + + 815 + + + ridgetop bedrock outcrop + + 820 + + + rift valley + + 825 + + + rim + + 830 + + + riverbed + + 835 + + + rock fall avalanche + + 840 + + + saddle + A low point on a ridge or crestline, generally a divide (pass, col) between the heads of streams flowing in opposite directions. + 845 + + + sag pond + + 850 + + + sandhills + + 855 + + + scarp + + 860 + + + scarp slope + + 865 + + + scour + + 870 + + + scoured basin + + 875 + + + sea cliff + + 880 + + + seep + + 885 + + + shoal + + 890 + + + shoreline + + 895 + + + shoulder + (hill slope) The geomorphic component that form the uppermost inclined surface at the top of a hillslope. It comprises the transition zone from backslope to summit of an upland. The surface is dominantly convex in profile and erosional in origin. + 897 + + + sinkhole (undifferentiated) + (doline) A closed depression formed either by solution of the surficial bedrock (e.g. limestone, gypsum, salt) or by collapse of underlying caves. Complexes of sinkholes in carbonate-rock terraces are the main components of karst topography. + 900 + + + slide + + 905 + + + slope + + 910 + + + slough + + 915 + + + slump and topple prone slope + + 920 + + + slump pond + + 925 + + + soil creep slope + + 930 + + + solution sinkhole + + 935 + + + spit + (a) A small point or low tongue or narrow embankment of land, commonly consisting of sand or gravel deposited by longshore drifting and having one end attached to the mainland and the other terminating in open water, usually the sea; a fingerlike extension of the beach. (b) A relatively long, narrow shoal or reef extending from the shore into a body of water. + 940 + + + splay + A small alluvial fan or other outspread deposit formed where an overloaded stream breaks through a levee and deposits its material (often coarse-grained) on the flood plain. + 945 + + + stone circle + + 950 + + + stone stripe + + 955 + + + stream terrace (undifferentiated) + + 960 + + + streambed + + 965 + + + subjacent karst collapse sinkhole + + 970 + + + subsidence sinkhole + + 975 + + + swale + (a) A slight depression, sometimes swampy, in the midst of generally level land. (b) A shallow depression in an undulating ground moraine due to uneven glacial deposition. (c) A long, narrow, generally shallow, trough-like depression between two beach ridges, and aligned roughly parallel to the coastline. + 980 + + + talus + + 985 + + + tarn + + 990 + + + terrace + A step-like surface, bordering a valley floor or shoreline, that represent the former position of an alluvial plain, or lake or sea shore. The term is usually applied to both the relatively flat summit surface (platform, tread), cut or built by stream or wave action, and the steeper descending slope (scarp, riser), graded to a lower base level of erosion. + 992 + + + tidal flat + + 995 + + + tidal gut + + 1000 + + + till plain + + 1005 + + + toe slope + + 1010 + + + toe zone (undifferentiated) + + 1015 + + + transverse dune + + 1020 + + + trench + + 1025 + + + trough + + 1030 + + + valley + (basin) An elongate, relatively large, externally drained depression of the earth's surface that is primarily developed by stream erosion. + 1035 + + + valley floor + + 1040 + + + wave-built terrace + + 1045 + + + wave-cut platform + + 1050 + + + n/a + A recognizable physical feature on the surface of the earth, often including consideration of the natural cause of its formation. + + 1001 + 1002 + 324 + 324 + + 1.0.0 + + + 1326 + surficialDeposits + Surficial Deposits + logical + yes + varchar (90) + n/a + + n/a + closed + + + Aeolian Deposits: Aeolian sand flats and cover sands + + 10 + + + Aeolian Deposits: Dunes + + 20 + + + Aeolian Deposits: Loess deposits + + 30 + + + Aeolian Deposits: Volcanic Ash + + 40 + + + Alluvial Deposits: Alluvial Fan + + 50 + + + Alluvial Deposits: Deltas + + 60 + + + Alluvial Deposits: Floodplain + + 70 + + + Chemical Deposits: Evaporites and Precipitates + + 80 + + + Glacial Deposits: Bedrock and till + + 90 + + + Glacial Deposits: Deltaic deposits + + 100 + + + Glacial Deposits: Glaciofluvial + + 110 + + + Glacial Deposits: Glaciolacustrine + + 120 + + + Glacial Deposits: Glaciomarine + + 130 + + + Glacial Deposits: Moraine + + 140 + + + Glacial Deposits: Till + + 150 + + + Glacial Deposits: Undifferentiated glacial deposit + + 160 + + + Lacustrine Deposits: Coarse sediments + + 170 + + + Lacustrine Deposits: Fine-grained sediments + + 180 + + + Lacustrine Deposits: Unconsolidated Sediments + + 190 + + + Marine Deposits: Coarse sediments + + 200 + + + Marine Deposits: Fine-grained sediments + + 210 + + + Marine Deposits: Unconsolidated Sediments + + 220 + + + Organic Deposits: Muck + + 230 + + + Organic Deposits: Peat + + 240 + + + Other + + 330 + + + Residual Material: Bedrock + + 260 + + + Residual Material: Deeply Weathered Rock + + 270 + + + Residual Material: Disintegrated Rock + + 280 + + + Slope and Modified Deposits: Colluvial + + 290 + + + Slope and Modified Deposits: Solifluction, landslide + + 300 + + + Slope and Modified Deposits: Talus and scree slopes + + 310 + + + Variable + + 320 + + + n/a + Surficial deposits represent the parent material that are the geologic or organic precursors to the soil. They may either have been deposited by geologic (wind, ice, gravity or water) or biologic (organic) activity, or formed in place more-or-less directly from rocks and minerals below. + + 1004 + 1005 + 325 + 325 + + 1.0.0 + + + 1329 + rockType + Rock Type + logical + yes + varchar (90) + n/a + + n/a + closed + + + aa + + 10 + + + acidic-ash + + 20 + + + andesite + + 30 + + + andesitic-ash + + 40 + + + arkose + + 50 + + + basalt + + 60 + + + basaltic-ash + + 70 + + + basic-ash + + 80 + + + chalk + + 90 + + + charcoal + + 100 + + + chert + + 110 + + + cinders + + 120 + + + coal + + 130 + + + conglomerate, calcareous + + 140 + + + conglomerate, noncalcareous + + 150 + + + conglomerate, unspecified + + 160 + + + diorite + + 170 + + + dolostone + + 180 + + + ejecta-ash + + 190 + + + gabbro + + 200 + + + glauconite + + 210 + + + gneiss + + 220 + + + gneiss-acidic + + 230 + + + gneiss-basic + + 240 + + + granite + + 250 + + + graywacke + + 260 + + + gypsum + + 270 + + + hornfels + + 280 + + + igneous, acid + + 290 + + + igneous, basic + + 300 + + + igneous, coarse crystal + + 310 + + + igneous, fine crystal + + 320 + + + igneous, intermediate + + 330 + + + igneous, ultrabasic + + 340 + + + igneous, unspecified + + 350 + + + interbedded sedimentary + + 360 + + + limestone, arenaceous + + 370 + + + limestone, argillaceous + + 380 + + + limestone, cherty + + 390 + + + limestone, phosphatic + + 400 + + + limestone, unspecified + + 410 + + + limestone-sandstone + + 420 + + + limestone-sandstone-shale + + 430 + + + limestone-shale + + 440 + + + limestone-siltstone + + 450 + + + marble + + 460 + + + marl + + 470 + + + metaconglomerate + + 480 + + + metamorphic, unspecified + + 490 + + + mixed + + 500 + + + mixed calcareous + + 510 + + + mixed igneous-metamorphic + + 520 + + + mixed igneous-metamorphic-sedimentary + + 530 + + + mixed igneous-sedimentary + + 540 + + + mixed metamorphic-sedimentary + + 550 + + + mixed noncalcareous + + 560 + + + obsidian + + 570 + + + pahoehoe + + 580 + + + phyllite + + 590 + + + pumice + + 600 + + + pyroclastic, unspecified + + 610 + + + quartzite + + 620 + + + rhyolite + + 630 + + + sandstone, calcareous + + 640 + + + sandstone, noncalcareous + + 650 + + + sandstone, unspecified + + 660 + + + sandstone-shale + + 670 + + + sandstone-siltstone + + 680 + + + schist, acidic + + 690 + + + schist, basic + + 700 + + + schist, unspecified + + 710 + + + scoria + + 720 + + + sedimentary, unspecified + + 730 + + + serpentinite + + 740 + + + shale, acid + + 750 + + + shale, calcareous + + 760 + + + shale, clayey + + 770 + + + shale, noncalcareous + + 780 + + + shale, unspecified + + 790 + + + shale-siltstone + + 800 + + + siltstone, calcareous + + 810 + + + siltstone, noncalcareous + + 820 + + + siltstone, unspecified + + 830 + + + slate + + 840 + + + tuff breccia + + 850 + + + tuff, acidic + + 860 + + + tuff, basic + + 870 + + + tuff, unspecified + + 880 + + + volcanic bombs + + 890 + + + volcanic breccia, acidic + + 900 + + + volcanic breccia, basic + + 910 + + + volcanic breccia, unspecified + + 920 + + + wood + + 930 + + + other + + 1000 + + + no rock visible + + 1010 + + + no observation + + 1020 + + + n/a + RockType values conform to the lithic types in the FGDC Soil Geographic Data Standards, September 1997. http://www.fgdc.gov/standards/documents/standards/soils/soil997.PDF (pages 56-59). + + 1007 + 1008 + 326 + 326 + + 1.0.0 + + + 1332 + stateProvince + State or Province + logical + yes + varchar (55) + n/a + + n/a + no + + n/a + State or Province Name (full name) where the plot is located (US and Canada only). + + 1009 + 1010 + 327 + 327 + + 1.0.2 + + + 1335 + country + Country + logical + yes + varchar (100) + n/a + + n/a + no + + n/a + Country where the plot is located. + + 1010 + 1011 + 328 + 328 + + 1.0.0 + + + 1338 + dateentered + Date Entered + implementation + yes + Date + now() + n/a + + n/a + no + + n/a + Date this plot was entered into VegBank + + 1028 + 329 + + 1.0.0 + + + 1341 + submitter_surname + Submitter_surname + implementation + yes + varchar (100) + n/a + + n/a + no + + n/a + + + 1.0.0 + + + 1344 + submitter_givenname + Submitter_givenname + implementation + yes + varchar (100) + n/a + + n/a + no + + n/a + + + 1.0.0 + + + 1347 + submitter_email + Submitter_email + implementation + yes + varchar (100) + n/a + + n/a + no + + n/a + + + 1.0.0 + + + 1350 + accessionCode + Accession Code + logical + yes + varchar (255) + n/a + + n/a + no + + n/a + Code that uniquely references this record, allowing reference to this record for this version of this database. Better than a primary key, which is automatically generated by a database and not globally unique. VegBank Accession codes are only generated by VegBank, and therefore data integrity can be guaranteed, unlike with a primary key (number). + + 1009 + 1011 + 330 + + 1.0.6 + + + 1353 + notesPublic + Notes Public + logical + yes + Boolean + n/a + + n/a + no + + n/a + TRUE indicates that public notes pertaining to this plot exist in "vegPlot.note" + + 1010 + 331 + + 1.0.0 + + + 1356 + notesMgt + Notes Mgt + logical + yes + Boolean + n/a + + n/a + no + + n/a + TRUE indicates that nonpublic management notes pertaining to this plot exist in "vegPlot.note" + + 1013 + 332 + + 1.0.0 + + + 1359 + revisions + Revisions + logical + yes + Boolean + n/a + + n/a + no + + n/a + TRUE indicates that revisions exist in vegPlot.Revision + + 1016 + 333 + + 1.0.0 + + + 1362 + emb_plot + this row embargoed. + denorm + yes + Integer + n/a + + n/a + no + + n/a + This value mimics the default embargo value for the plot that this record belongs to. + 1.0.2 + + + + project + Project + This table stores information about a project established to collect vegetation plot data. + Each plot originates as part of a project. A project can contain from one to many plots. + plot + 1.0.0 + + 1365 + PROJECT_ID + ID + logical + yes + serial + PK + + n/a + no + + Primary key for the project table. + Database generated identifier assigned to each unique project. + + 334 + + 1.0.0 + + + 1368 + projectName + Project Name + logical + no + varchar (150) + n/a + + n/a + no + + n/a + Project name as defined by the principal investigator. + + 1042 + 1043 + 1044 + 335 + + 1.0.0 + + + 1371 + projectDescription + Project Description + logical + yes + text + n/a + + n/a + no + + n/a + Short description of the project including the original purpose for conducting the project. This can be viewed as the project abstract plus supporting metadata. + + 1047 + 336 + + 1.0.0 + + + 1374 + startDate + Start Date + logical + yes + Date + n/a + + n/a + no + + n/a + Project start date. + + 1048 + 1049 + 1050 + 337 + + + 1.0.0 + + + 1377 + stopDate + Stop Date + logical + yes + Date + n/a + + n/a + no + + n/a + Project stop date. + + 1051 + 1052 + 1053 + 338 + + 1.0.0 + + + 1380 + accessionCode + Accession Code + logical + yes + varchar (255) + n/a + + n/a + no + + n/a + Code that uniquely references this record, allowing reference to this record for this version of this database. Better than a primary key, which is automatically generated by a database and not globally unique. VegBank Accession codes are only generated by VegBank, and therefore data integrity can be guaranteed, unlike with a primary key (number). + + 1052 + 1054 + 339 + + 1.0.6 + + + 1383 + d_obscount + Plot Count + denorm + yes + Integer + n/a + + n/a + no + + n/a + Number of observations associated with this entity. + 1.0.3 + + + 1384 + d_lastplotaddeddate + date last plot added + denorm + yes + Date + n/a + + n/a + no + + n/a + Date a plot was last added to this project. + + 334 + + 1.0.6 + + + + projectContributor + Project Contributor + This table stores information about a party contributing to a project. + This table serves as an intersection entity used to 'link' a party with a specific project wherein vegetation plots are described. + plot + 1.0.0 + + 1386 + PROJECTCONTRIBUTOR_ID + ID + logical + yes + serial + PK + + n/a + no + + Primary key for the projectContributor table. + Database generated identifier assigned to each unique contribution to a project. + + 19 + + 1.0.0 + + + 1389 + PROJECT_ID + Project + logical + no + Integer + FK + + project.PROJECT_ID + no + + Foreign key into the project table + Foreign key linking the contribution to a specific project. + + 1057 + 340 + + 1.0.0 + + + 1392 + PARTY_ID + Party + logical + no + Integer + FK + + party.PARTY_ID + (SELECT CASE WHEN surname is null THEN 'org:' || organizationname ELSE surname || ', ' || givenname END FROM party WHERE party.party_id=projectcontributor.party_id) + no + + Foreign key into the party table + Foreign key linking the contribution to a specific party. + + 1058 + 1059 + 341 + + 1.0.0 + + + 1395 + ROLE_ID + Role + logical + yes + Integer + FK + + aux_Role.ROLE_ID + (select roleCode from aux_role where aux_role.role_id=projectcontributor.role_id) + no + + Foreign key into aux_Role table + Foreign key that identifies the role that a specific party played in the project (e.g., PI, coPI, contact, author, research advisor, etc.). + + 1060 + 1061 + 342 + + 1.0.0 + + + 1398 + surname + Surname + implementation + yes + varchar (50) + n/a + + n/a + no + + + + + 1.0.0 + + + 1401 + cheatRole + Role + implementation + yes + varchar (50) + n/a + + n/a + no + + + + + 1.0.2 + + + + revision + Revision + This table constitutes a log of changes in data deposited in the database. + This table was designed to store as a single, stand-alone table information about attributes in any of the database tables. + plot + 1.0.0 + + 1404 + REVISION_ID + ID + logical + yes + serial + PK + + n/a + no + + Primary key for the revision table + Database generated identifier assigned to each unique revision. + + 1068 + 1069 + 343 + + 1.0.0 + + + 1407 + tableName + Table Name + logical + no + varchar (50) + n/a + + n/a + no + + n/a + Name of the table where the change occurred. + + 1070 + 1071 + 1072 + 344 + + 1.0.0 + + + 1410 + tableAttribute + Table Attribute + logical + no + varchar (50) + n/a + + n/a + no + + n/a + The name of the attribute where the chance occurred. + + 1073 + 1074 + 1075 + 345 + + 1.0.0 + + + 1413 + tableRecord + Table Record + logical + no + Integer + n/a + + n/a + no + + n/a + The number of the record in which the change occurred (i.e., the value of the primary key associated with the value in which the change occurred) + + 1076 + 1077 + 1078 + 346 + + 1.0.0 + + + 1416 + revisionDate + Revision Date + logical + no + Date + n/a + + n/a + no + + n/a + The date on which the revision was made. + + 1079 + 1080 + 1081 + 347 + + 1.0.0 + + + 1419 + previousValueText + Previous Value Text + logical + no + text + n/a + + n/a + no + + n/a + The previous value as a character string. + + 1082 + 1083 + 1084 + 348 + + 1.0.0 + + + 1422 + previousValueType + Previous Value Type + logical + no + varchar (20) + n/a + + n/a + no + + n/a + The data type of the attribute changed. + + 1085 + 1086 + 1087 + 349 + + 1.0.0 + + + 1425 + previousRevision_ID + Previous Revision + logical + yes + Integer + FK + + revision.REVISION_ID + no + + Recursive foreign key + Pointer to a previous record of a revision. + + 1088 + 1089 + 350 + + 1.0.0 + + + + soilObs + Soil Observation + This table stores observation on soil horizons made during the plot observation event. + soilObs is child of observation in recognition of the fact that the horizons observed vary among plot observation events as a results of real change plus changes in investigators, methods and circumstances. + plot + 1.0.0 + + 1428 + SOILOBS_ID + ID + logical + yes + serial + PK + + n/a + no + + Primary key for observation + Database generated identifier assigned to each unique soil observation. + + 19 + + 1.0.0 + + + 1431 + OBSERVATION_ID + Observation + logical + no + Integer + FK + + observation.OBSERVATION_ID + no + + Foreign key to parent plot + Link to the observation event to which this soil observation is associated. + + 1093 + 351 + + 1.0.0 + + + 1434 + soilHorizon + Soil Horizon + logical + no + varchar (15) + n/a + + n/a + closed + + + A + + 3 + + + B + + 5 + + + C + + 6 + + + E + + 4 + + + L + + 1 + + + O + + 2 + + + R + + 7 + + + unknown + 8 + + + closed list - USDA + The horizon to which this observation applies. + + 1094 + 1095 + 1096 + 352 + + 1.0.2 + + + 1437 + soilDepthTop + Soil Depth Top + logical + yes + Float + n/a + + n/a + no + + n/a + The depth at which the horizon observation starts. + m + + 1097 + 1098 + 1099 + 353 + + 1.0.0 + + + 1440 + soilDepthBottom + Soil Depth Bottom + logical + yes + Float + n/a + + n/a + no + + n/a + The depth at which the horizon observation ends. + m + + 1100 + 1101 + 1102 + 354 + + 1.0.0 + + + 1443 + soilColor + Soil Color + logical + yes + varchar (30) + n/a + + n/a + no + + n/a + Soil color (USDA guidelines recommended). + + 1103 + 1104 + 1105 + 355 + + 1.0.0 + + + 1446 + soilOrganic + Soil Organic + logical + yes + Float + n/a + + n/a + no + + n/a + Percent organic content of the soil (for methods see observation.methodsNarrative). + % + + 1106 + 1107 + 1108 + 356 + + 1.0.0 + + + 1449 + soilTexture + Soil Texture + logical + yes + varchar (50) + n/a + + n/a + closed + + + Sands: Coarse Sand + Texture Group: Sandy soils | General Term: Coarse-textured | Texture Class: Sands | Texture Subclass: Coarse Sand + 1 + + + Sands: Sand + Texture Group: Sandy soils | General Term: Coarse-textured | Texture Class: Sands | Texture Subclass: Sand + 2 + + + Sands: Fine Sand + Texture Group: Sandy soils | General Term: Coarse-textured | Texture Class: Sands | Texture Subclass: Fine Sand + 3 + + + Sands: Very Fine Sand + Texture Group: Sandy soils | General Term: Coarse-textured | Texture Class: Sands | Texture Subclass: Very Fine Sand + 4 + + + Sands: (unspecified) + Texture Group: Sandy soils | General Term: Coarse-textured | Texture Class: Sands | Texture Subclass: (unspecified) + 5 + + + Loamy Sands: Loamy Coarse Sand + Texture Group: Sandy soils | General Term: Coarse-textured | Texture Class: Loamy Sands | Texture Subclass: Loamy Coarse Sand + 6 + + + Loamy Sands: Loamy Sand + Texture Group: Sandy soils | General Term: Coarse-textured | Texture Class: Loamy Sands | Texture Subclass: Loamy Sand + 7 + + + Loamy Sands: Loamy Fine Sand + Texture Group: Sandy soils | General Term: Coarse-textured | Texture Class: Loamy Sands | Texture Subclass: Loamy Fine Sand + 8 + + + Loamy Sands: Loamy Very Fine Sand + Texture Group: Sandy soils | General Term: Coarse-textured | Texture Class: Loamy Sands | Texture Subclass: Loamy Very Fine Sand + 9 + + + Loamy Sands: (unspecified) + Texture Group: Sandy soils | General Term: Coarse-textured | Texture Class: Loamy Sands | Texture Subclass: (unspecified) + 10 + + + Sandy Loams: Coarse Sandy Loam + Texture Group: Loamy soils | General Term: Moderately coarse-textured | Texture Class: Sandy Loams | Texture Subclass: Coarse Sandy Loam + 11 + + + Sandy Loams: Sandy Loam + Texture Group: Loamy soils | General Term: Moderately coarse-textured | Texture Class: Sandy Loams | Texture Subclass: Sandy Loam + 12 + + + Sandy Loams: Fine Sandy Loam + Texture Group: Loamy soils | General Term: Moderately coarse-textured | Texture Class: Sandy Loams | Texture Subclass: Fine Sandy Loam + 13 + + + Sandy Loams: Very Fine Sandy Loam + Texture Group: Loamy soils | General Term: Medium-textured | Texture Class: Sandy Loams | Texture Subclass: Very Fine Sandy Loam + 14 + + + Sandy Loams: (unspecified) + Texture Group: Loamy soils | General Term: Moderately coarse-textured to Medium-textured | Texture Class: Sandy Loams | Texture Subclass: (unspecified) + 15 + + + Loam + Texture Group: Loamy soils | General Term: Medium-textured | Texture Class: Loam | Texture Subclass: Loam + 16 + + + Silt Loam + Texture Group: Loamy soils | General Term: Medium-textured | Texture Class: Silt Loam | Texture Subclass: Silt Loam + 17 + + + Silt + Texture Group: Loamy soils | General Term: Medium-textured | Texture Class: Silt | Texture Subclass: Silt + 18 + + + Sandy Clay Loam + Texture Group: Loamy soils | General Term: Moderately fine-textured | Texture Class: Sandy Clay Loam | Texture Subclass: Sandy Clay Loam + 19 + + + Clay Loam + Texture Group: Loamy soils | General Term: Moderately fine-textured | Texture Class: Clay Loam | Texture Subclass: Clay Loam + 20 + + + Silty Clay Loam + Texture Group: Loamy soils | General Term: Moderately fine-textured | Texture Class: Silty Clay Loam | Texture Subclass: Silty Clay Loam + 21 + + + Sandy Clay + Texture Group: Clayey soils | General Term: Fine-textured | Texture Class: Sandy Clay | Texture Subclass: Sandy Clay + 22 + + + Silty Clay + Texture Group: Clayey soils | General Term: Fine-textured | Texture Class: Silty Clay | Texture Subclass: Silty Clay + 23 + + + Clay + Texture Group: Clayey soils | General Term: Fine-textured | Texture Class: Clay | Texture Subclass: Clay + 24 + + + closed list - USDA + Soil texture class.The texture classes sands, loamy sands, and sandy loams (plural terms) correspond to sand, loamy sand, and sandy loam (singular terms) in the textural triangle. + + 1109 + 1110 + 1111 + 357 + + 1.0.2 + + + 1452 + soilSand + Soil Sand + logical + yes + Float + n/a + + n/a + no + + n/a + Percent sand in the soil horizon. + % + + 1112 + 1113 + 1114 + 358 + + 1.0.0 + + + 1455 + soilSilt + Soil Silt + logical + yes + Float + n/a + + n/a + no + + n/a + Percent silt in the soil horizon. + % + + 1115 + 1116 + 1117 + 359 + + 1.0.0 + + + 1458 + soilClay + Soil Clay + logical + yes + Float + n/a + + n/a + no + + n/a + Percent clay in the soil horizon. + % + + 1118 + 1119 + 1120 + 360 + + 1.0.0 + + + 1461 + soilCoarse + Soil Coarse + logical + yes + Float + n/a + + n/a + no + + n/a + percent coarse fragments in the soil, prior to removal for textural analysis + % + + 1121 + 1122 + 1123 + 361 + + 1.0.0 + + + 1464 + soilPH + Soil PH + logical + yes + Float + n/a + + n/a + no + + n/a + pH of the soil (for methods see observation.methodsNarrative). + + 1124 + 1125 + 1126 + 362 + + 1.0.0 + + + 1467 + exchangeCapacity + Exchange Capacity + logical + yes + Float + n/a + + n/a + no + + n/a + Cation exchange capacity (for methods see observation.methodsNarrative). + + 1127 + 1128 + 1129 + 363 + + 1.0.0 + + + 1470 + baseSaturation + Base Saturation + logical + yes + Float + n/a + + n/a + no + + n/a + Percent base saturation (for methods see observation.methodsNarrative). + % + + 1130 + 1131 + 1132 + 364 + + 1.0.0 + + + 1473 + soilDescription + Soil Description + logical + yes + text + n/a + + n/a + no + + n/a + Text description of the soil. + + 1133 + 1134 + 1135 + 365 + + 1.0.0 + + + 1476 + emb_soilObs + this row embargoed. + denorm + yes + Integer + n/a + + n/a + no + + n/a + This value mimics the default embargo value for the plot that this record belongs to. + 1.0.2 + + + + soilTaxon + Soil Taxon + This table stores the valid soilTaxon records that may be used to describe the soil of a plot. + + plot + 1.0.0 + + 1479 + SOILTAXON_ID + ID + logical + yes + serial + PK + + n/a + no + + Primary key for the aux_Soil table. + Database assigned value for a unique soil type + + 19 + + 1.0.0 + + + 1482 + soilCode + Soil Code + logical + yes + varchar (15) + n/a + + n/a + no + + n/a + SCS Code + + 1138 + 1140 + 366 + + 1.0.0 + + + 1485 + soilName + Soil Name + logical + yes + varchar (100) + n/a + + n/a + no + + n/a + Name of soil type + + 1141 + 1142 + 1143 + 367 + + 1.0.0 + + + 1488 + soilLevel + Soil Level + logical + yes + Integer + n/a + + n/a + no + + n/a + Hierarchical level; 1=Order, 2=Suborder, 3=GreatGroup, 4=SubGroup, 5=Family, 6=Series + + 1144 + 1145 + 1146 + 368 + + 1.0.0 + + + 1491 + SOILPARENT_ID + Soil Parent + logical + yes + Integer + FK + + soilTaxon.SOILTAXON_ID + (Select st2.soilName from soilTaxon as st2 where st2.soilTaxon_ID=soilTaxon.soilParent_ID) + no + + n/a + Parent soil taxon in the soil taxon hierarchy for this particular framwork. For example, in USDA soils list, the parent of a soil SubGroup would be the GreatGroup. + + 1147 + 1148 + 369 + + 1.0.0 + + + 1494 + soilFramework + Soil Framework + logical + yes + varchar (33) + n/a + + n/a + no + + n/a + System in which this soil taxon is part. This field may be used to separate multiple soil taxonomic systems. Each unique soil taxonomic system should have all its soilTaxon records with the same soilFramework value. Correlation of different framework taxa is not currently possible. + + 1149 + 1143 + 1151 + 370 + + 1.0.0 + + + 1497 + accessionCode + Accession Code + logical + yes + varchar (255) + n/a + + n/a + no + + n/a + Code that uniquely references this record, allowing reference to this record for this version of this database. Better than a primary key, which is automatically generated by a database and not globally unique. VegBank Accession codes are only generated by VegBank, and therefore data integrity can be guaranteed, unlike with a primary key (number). + + 1152 + 371 + + 1.0.6 + + + + stemCount + Stem Count + This table is intended to store information about the abundance of tree stems of a specific size. + + plot + 1.0.0 + + 1500 + STEMCOUNT_ID + ID + logical + yes + serial + PK + + n/a + no + + Primary Key for the stemSize table. + Database generated identifier assigned to each unique stem tally. + + 19 + + 1.0.0 + + + 1503 + TAXONIMPORTANCE_ID + Taxon Importance + logical + no + Integer + FK + + taxonImportance.taxonImportance_ID + no + + Foreign key into the taxonImportance table + Foreign key into the taxonImportance table, thereby associating a taxon identification with the tree stem(s). + + 1155 + 372 + + 1.0.2 + + + 1506 + stemDiameter + DBH + logical + yes + Float + n/a + + n/a + no + + n/a + The diameter of the stem in centimeters. When diameter classes are used, the stemDiameter is the midpoint between the low end and high end for the diameter class; the offset between this and the endpoints is stored in the stemDiameterAccuracy attribute. + cm + + 1156 + 1157 + 1158 + 373 + + 1.0.0 + + + 1509 + stemDiameterAccuracy + DBH err + logical + yes + Float + n/a + + n/a + no + + n/a + The accuracy of the stem diameter measurements in centimeters. This represents the distance between the diameter class midpoint and endpoint. + cm + + 1159 + 1160 + 1161 + 374 + + ± + 1.0.0 + + + 1512 + stemHeight + Ht. + logical + yes + Float + n/a + + n/a + no + + n/a + The measured height of the stem in meters. When height classes are used, the stemHeight is the midpoint between the low end and high end for the height class; the offset between this and the endpoint is stored in the stemHeightAccuracy field. + m + + 1162 + 1163 + 1164 + 375 + + 1.0.0 + + + 1515 + stemHeightAccuracy + Ht. Err + logical + yes + Float + n/a + + n/a + no + + n/a + The accuracy of the measured height of a stem, being the offset between the midpoint of the class and the endpoint, in meters. + m + + 1165 + 1166 + 1167 + 376 + + ± + 1.0.0 + + + 1518 + stemCount + # + logical + no + Integer + n/a + + n/a + no + + The default value is 1. This field is not logically necessary, but allows for more compact entry and storage of tree stem tally data. + The number of stems of a single species that have these specific stem diameter and height data in common. + stem(s) + + 1168 + 1169 + 1170 + 377 + + 1.0.0 + + + 1521 + stemTaxonArea + Stem Taxon Area + logical + yes + Float + n/a + + n/a + no + + n/a + This is the area in m2 used to infer the presence of the stem(s) referenced in this record. Overrides similar area field in taxonObservation, taxonImportance, and/or observation. RESERVED VALUE: -1 is used to indicate no known boundaries were used while collecting this stem size. + m² + + 1171 + 1173 + 378 + + 1.0.0 + + + 1524 + emb_stemCount + this row embargoed. + denorm + yes + Integer + n/a + + n/a + no + + n/a + This value mimics the default embargo value for the plot that this record belongs to. + 1.0.2 + + + + stemLocation + Stem Location + This table is intended to store location information about individual tree stems. + + plot + 1.0.0 + + 1527 + STEMLOCATION_ID + ID + logical + yes + serial + PK + + n/a + no + + Primary Key for the stemLocation table. + Database generated identifier assigned to each unique stem observation. + + 19 + + 1.0.0 + + + 1530 + STEMCOUNT_ID + Stem Count + logical + no + Integer + FK + + stemCount.STEMCOUNT_ID + no + + Foreign key into the stemSize table + Foreign key into the stemSize table, thereby assigning a location to a particular stem of a specific size + + 20 + + 1.0.0 + + + 1533 + stemCode + Stem Code + logical + yes + varchar (20) + n/a + + n/a + no + + n/a + Name or code applied to a specific stem in the plot. This is generally a numeric label to associate a field data entry with a stem in the database. + + 1178 + 1179 + 1180 + 379 + + 1.0.0 + + + 1536 + stemXPosition + Stem X Position + logical + yes + Float + n/a + + n/a + no + + n/a + The X-coordinate of the stem position in m. The user will enter the relative position of stems with respect to the plot origin (in meters) with the x-axis defined by the plot azimuth. + m + + 1181 + 1182 + 1183 + 380 + + 1.0.0 + + + 1539 + stemYPosition + Stem Y Position + logical + yes + Float + n/a + + n/a + no + + n/a + The Y-coordinate of the stem position, as above. + m + + 1184 + 1185 + 1186 + 381 + + 1.0.0 + + + 1542 + stemHealth + Stem Health + logical + yes + varchar (50) + n/a + + n/a + open + + + dead + stem is dead + 1 + + + uprooted, but alive + stem is uprooted, but still alive + 2 + + + leaning + stem leans in a non-trivial manner + 3 + + + n/a + Health of the stem referenced in this stemLocation record. Usually used to describe "dead" stems. + + 1184.5 + 1185.5 + 1186.5 + 382 + + 1.0.1 + + + 1545 + emb_stemLocation + this row embargoed. + denorm + yes + Integer + n/a + + n/a + no + + n/a + This value mimics the default embargo value for the plot that this record belongs to. + 1.0.2 + + + + stratum + Stratum Definition + This table stores collective information about strata defined within a plot observation. + This table is used to record non-species-specific information about a stratum. Examples include total cover of the stratum and maximum height of the stratum. + plot + observation + 1.0.0 + + 1548 + STRATUM_ID + ID + logical + yes + serial + PK + + n/a + no + + Primary key for the stratum table. + Database assigned value for a unique existence of a stratum within a plot observation. + + 19 + + 1.0.0 + + + 1551 + OBSERVATION_ID + Observation + logical + no + Integer + FK + + observation.OBSERVATION_ID + no + + Foreign key into the observation table. + Link to the plot observation event with which this stratum observation is associated. + + 1190 + 383 + + 1.0.0 + + + 1554 + STRATUMTYPE_ID + Stratum Type + logical + no + Integer + FK + + stratumType.STRATUMTYPE_ID + (SELECT stratumtype.stratumname FROM stratumtype WHERE stratum.stratumtype_id=stratumtype.stratumtype_id) + no + + Foreign key into the stratumType table. + This attribute will link to the definition of the specific stratum observed. + + 1191 + 1192 + 384 + + 1.0.0 + + + 1557 + STRATUMMETHOD_ID + Stratum Method + denorm + yes + Integer + FK + + stratumMethod.STRATUMMETHOD_ID + no + + + + + 1.0.0 + + + 1560 + stratumName + Stratum Name + denorm + yes + varchar (30) + n/a + + n/a + no + + + + + 1.0.0 + + + 1563 + stratumHeight + Stratum Height + logical + yes + Float + n/a + + n/a + no + + n/a + Average height to the top of the stratum in meters. + m + + 1201 + 1203 + 1203 + 385 + + 1.0.0 + + + 1566 + stratumBase + Stratum Base + logical + yes + Float + n/a + + n/a + no + + n/a + Average height of the bottom of the stratum in meters. + m + + 1198 + 1202 + 1202 + 386 + + 1.0.0 + + + 1569 + stratumCover + Stratum Cover + logical + yes + Float + n/a + + n/a + no + + n/a + Cover of the vegetation within the given stratum in percent. + % + + 1204 + 1205 + 1206 + 387 + + 1.0.0 + + + 1572 + stratumDescription + Stratum Description + implementation + yes + varchar (200) + n/a + + n/a + no + + + + + 1.0.0 + + + + stratumMethod + Stratum Method + This table links a set of strata to a sampling protocol . This table, when combined a set of linked stratum occurrences, defines the strata used by a plot observer. + + plot + 1.0.0 + + 1575 + STRATUMMETHOD_ID + ID + logical + yes + serial + PK + + n/a + no + + Primary Key for the stratumMethod table. + Database generated identifier assigned to each unique stratum methodology. + + 19 + + 1.0.0 + + + 1578 + reference_ID + Reference + logical + yes + Integer + FK + + reference.reference_ID + (select shortName from reference where reference.reference_id=stratummethod.reference_id) + no + + Foreign key into the reference table + Link to a publication defining the stratum method. + + 1227 + 1228 + 388 + + 1.0.0 + + + 1581 + stratumMethodName + Stratum Method Name + logical + no + varchar (30) + n/a + + n/a + no + + n/a + Name of the stratum method (e.g., Braun-Blanquet, TNC-ABI, NC Vegetation Survey #1, NC Vegetation Survey #2, etc.) + + 1225 + 1225 + 385 + + 1.0.0 + + + 1584 + stratumMethodDescription + Stratum Method Description + logical + yes + text + n/a + + n/a + no + + n/a + This field describes the general methods used for strata. For example, this field should distinguish as to whether strata are defined as including all foliage on plants that predominantly occupy the stratum regardless of the height of that foliage, or only the foliage that actually occurs within a specified vertical slice of the community. + + 1232 + 1233 + 1234 + 390 + + 1.0.0 + + + 1587 + stratumAssignment + Stratum Assignment + logical + yes + varchar (50) + n/a + + n/a + closed + + + predominant stratum + Each individual is assigned to one and only one stratum in which it most significantly occurs. Generally, this is the tallest stratum that the individual occupies. + 1 + + + soley height determined + Individuals are included in each stratum they occupy, allowing one individual to be assigned to multiple strata, if it crosses the height boundary between strata. + 2 + + + n/a + The way that an individual's cover is assigned to the different stratum. Some methodologies allow an individul to span multiple strata and have stratumCover values in each stratum. Other methodologies require that all cover from an individual be assigned to the upper-most stratum. Further information about the specifics of stratum Methodologies that deviate from the standard practice of the stratumMethod referened in the field stratumMethod_ID should be described in methodNarrative. + + 1235 + 391 + + 1.0.2 + + + 1590 + accessionCode + Accession Code + logical + yes + varchar (255) + n/a + + n/a + no + + n/a + Code that uniquely references this record, allowing reference to this record for this version of this database. Better than a primary key, which is automatically generated by a database and not globally unique. VegBank Accession codes are only generated by VegBank, and therefore data integrity can be guaranteed, unlike with a primary key (number). + + 1236 + 392 + + 1.0.6 + + + + stratumType + Stratum Type + This table stores collective information about strata defined within a plot observation. + This table is used to record non-species-specific information about a stratum. Examples include total cover of the stratum and maximum height of the stratum. + plot + stratumMethod + 1.0.0 + + 1593 + STRATUMTYPE_ID + ID + logical + yes + serial + PK + + n/a + no + + Primary key for the stratum table. + Database assigned value for a unique existence of a stratum within a plot observation. + + 19 + + 1.0.0 + + + 1596 + STRATUMMETHOD_ID + Stratum Method + logical + no + Integer + FK + + stratumMethod.STRATUMMETHOD_ID + no + + Foreign key into the stratumMethod table. + This attribute will link to the stratum to the stratum methodology used. + + 20 + + 1.0.0 + + + 1599 + stratumIndex + Stratum Index + logical + yes + varchar (10) + n/a + + n/a + no + + n/a + Short code used to identify the stratum + + 1239 + 1240 + 1241 + 393 + + 1.0.0 + + + 1602 + stratumName + Stratum Name + logical + yes + varchar (30) + n/a + + n/a + no + + n/a + Name associated with this stratum by the stratumMethod + + 1242 + 1243 + 1244 + 394 + + 1.0.0 + + + 1605 + stratumDescription + Stratum Description + logical + yes + text + n/a + + n/a + no + + n/a + This field describes the specific stratum. For example, a value of "F" under stratumIndex might have a stratumName = "Floating" and a stratumDescription = "foliage floating on or near the surface of water" + + 1245 + 1246 + 1247 + 395 + + 1.0.0 + + + + taxonImportance + Taxon Importance + This table stores information about the importance (i.e. cover, basal area, biomass) of each taxon observed on a plot. Records may be limited to one stratum or apply to all strata. + + plot + 1.0.2 + + 1608 + taxonImportance_ID + Taxon Importance ID + logical + no + serial + PK + + n/a + no + + n/a + Database generated number which uniquely identifies this record of the table. + + 19 + + 1.0.2 + + + 1611 + taxonObservation_ID + Taxon + logical + no + Integer + FK + + taxonObservation.TAXONOBSERVATION_ID + (SELECT authorplantname from taxonobservation as to2 WHERE to2.taxonobservation_id=taxonimportance.taxonobservation_id) + no + + n/a + Foreign Key into the TaxonObservation table to link to the information about the taxon for which this importance value applies. + + 396 + + + 1.0.2 + + + 1614 + stratum_ID + Stratum + logical + yes + Integer + FK + + stratum.STRATUM_ID + (SELECT stratumtype.stratumname FROM stratumtype, stratum WHERE stratum.stratumtype_id=stratumtype.stratumtype_id AND stratum.stratum_id=taxonimportance.stratum_id) + no + + n/a + Foreign Key into the stratum table, if this record is limited to the importance of a taxon in one stratum. If null, all values in this record speak of the importance of the entire taxon across all strata. + + 1299 + 397 + + 1.0.2 + + + 1617 + cover + Cover + logical + yes + Float + n/a + + n/a + no + + n/a + Cover, in percent, of the taxon (potentially limitied to one stratum if stratum_ID has a value). + % + + 1300 + 398 + + @subst_lt@table class="noborder" cellpadding="0" cellspacing="0"@subst_gt@@subst_lt@tr@subst_gt@@subst_lt@td@subst_gt@ + @subst_lt@/td@subst_gt@@subst_lt@/tr@subst_gt@@subst_lt@tr@subst_gt@@subst_lt@td@subst_gt@ + @subst_lt@img src="@images_link@bluedot.png" height="4px" width='@subst_lt@bean:write name="onerowoftaxonimportance" property="cover"/@subst_gt@px' /@subst_gt@ + @subst_lt@/td@subst_gt@@subst_lt@/tr@subst_gt@@subst_lt@/table@subst_gt@ + 1.0.2 + + + 1620 + coverCode + Original Cover Code + denorm + yes + varchar (10) + n/a + + n/a + no + + n/a + The original cover code used by the author in the Cover Method for the plot. + + 1300.5 + + 1.0.3 + addCoverCodeToTaxImportance.sql + + + 1623 + basalArea + Basal Area + logical + yes + Float + n/a + + n/a + no + + n/a + Total basal area of the species in m2/ha (potentially limitied to one stratum if stratum_ID has a value). + m²/ha + + 1301 + 1302 + 399 + + 1.0.2 + + + 1626 + biomass + Biomass + logical + yes + Float + n/a + + n/a + no + + n/a + The biomass of the species in g/m2 (potentially limitied to one stratum if stratum_ID has a value). + g/m² + + 1301.5 + 1302.5 + 400 + + 1.0.2 + + + 1629 + inferenceArea + Inference Area + logical + yes + Float + n/a + + n/a + no + + The area used to infer the importance values of the taxon, if not the same as observation.taxonInferenceArea. + This is the area in m2 used to infer the importance values (i.e. cover, biomass, basal area) in this record. RESERVED VALUE: -1 is used to indicate no plot boundaries were used when estimating importance values. + m² + + 1302 + 1303 + 1305 + 401 + + 1.0.2 + + + 1632 + stratumBase + Stratum Base Ht + denorm + yes + Float + n/a + + n/a + no + + n/a + The Base of the Stratum in meters. + m + + 1.0.2 + + + 1635 + stratumHeight + Stratum Max Ht + denorm + yes + Float + n/a + + n/a + no + + n/a + The Tallest part of the Stratum in meters. + m + + 1.0.2 + + + 1638 + emb_taxonImportance + this row embargoed. + denorm + yes + Integer + n/a + + n/a + no + + n/a + This value mimics the default embargo value for the plot that this record belongs to. + 1.0.2 + + + + taxonInterpretation + Taxon Interpretation + This table allows all users, including the author and/or subsequent interpreters, to attach taxon names and authorities to a specific taxon observation + + plot + 1.0.0 + + 1641 + TAXONINTERPRETATION_ID + ID + logical + yes + serial + PK + + n/a + no + + Primary key for the TaxonInterpretation table. + Database generated identifier assigned to each unique interpretation of a taxon. + + 19 + + 1.0.0 + + + 1644 + TAXONOBSERVATION_ID + Taxon Observation + logical + no + Integer + FK + + taxonObservation.TAXONOBSERVATION_ID + no + + Foreign key into the taxonObservation table. + Link to a particular taxon observation. + + 20 + + 1.0.0 + + + 1647 + stemLocation_ID + Stem Location + logical + yes + Integer + FK + + stemLocation.STEMLOCATION_ID + no + + Foreign key into the StemLocation table. + StemLocation record of a particular stem that is to be interpreted by this taxonInterpretation record. + + 1251.5 + 402 + + 1.0.1 + + + 1650 + PLANTCONCEPT_ID + Plant Concept + logical + no + Integer + FK + + plantConcept.PLANTCONCEPT_ID + (select plantname FROM plantconcept where plantconcept.plantconcept_ID=taxoninterpretation.plantconcept_id) + no + + Foreign key into the plantConcept table. + Link to a taxon in the plantConcept table. The entry in the plantConcept table will in turn point to a reference and a name used in the reference, thereby defining the taxon concept. The name that should be applied to the plantConcept will be party specific and will be found in the plantUsage table. For other than legacy data, the first interpretation recorded for a taxon observation should be redundant with the information contained in taxonObservation.PLANTNAME_ID + PLANTREFERENCE_ID. + + 1 + 1252 + 1253 + 403 + + 1.0.0 + + + 1653 + interpretationDate + Interpretation Date + logical + no + Date + n/a + + n/a + no + + n/a + The date that the interpretation was made. + + 1254 + 2 + 1255 + 1256 + 404 + + 1.0.0 + + + 1656 + PLANTNAME_ID + Plant Name + logical + yes + Integer + FK + + plantName.PLANTNAME_ID + (select plantname from plantname where plantname.plantname_ID=taxoninterpretation.plantname_ID) + no + + Foreign key into the taxonName table. + Foreign key into the plantName (in the plantTaxa database) table to identify the name applied by the interpreter to the plantConcept. This field is not needed except in cases where there is a publication associated with the interpretation. + + 1258 + 405 + + 1.0.0 + + + 1659 + PARTY_ID + Party + logical + no + Integer + FK + + party.PARTY_ID + (SELECT CASE WHEN surname is null THEN 'org:' || organizationname ELSE surname || ', ' || givenname END FROM party WHERE party.party_id=taxoninterpretation.party_id) + no + + Foreign key into the party table. + Foreign key that identifies the party that made the interpretation, which could be the observation author. + + 3 + 1259 + 1260 + 406 + + 1.0.0 + + + 1662 + ROLE_ID + Role + logical + no + Integer + FK + + aux_Role.ROLE_ID + (SELECT rolecode from aux_role where aux_role.role_id=taxoninterpretation.role_id) + no + + Foreign key into aux_Role table + Foreign key that identifies the role of the party making the interpretation (e.g., plot author, publication author, database manager, automated, plot contributor). + + 1262 + 407 + + 1.0.0 + + + 1665 + interpretationType + Interpretation Type + logical + yes + varchar (30) + n/a + + n/a + closed + + + Author + Ideally, the field workers who sampled to plot, but it could also be the person who compiled and submitted the plot to the database, or the person who published the plot. + 1 + + + Computer (automated) + Automated taxonomic change following a taxonomic revision. + 2 + + + Correction + A new interpretation was made because the interpreter has reason to believe that another determination was incorrect or of different certainty than stated. + 4 + + + Finer resolution + The interpreter has reason to believe that determination can be made at a finer level of taxonomic resolution. + 6 + + + Simplification for analysis + This is for the case where one marks up a plot to reflect the interpretaions used in an analysis of multiple plots where the plots had to have a common taxonomy for comparison purposes. These interpretations are of relatively limited value except for documenting the analysis conducted, and many times this is better done in the supplemental material attached to the paper than in the plot database. + 3 + + + Taxonomic revision + Changes in interpretation made to reflect taxonomic changes. + 5 + + + closed list + Categories for the interpretation (e.g., author, computer generated, simplified for comparative analysis, correction, finer resolution). + + 1263 + 4 + 1264 + 1265 + 408 + + 1.0.0 + + + 1668 + reference_ID + Reference + logical + yes + Integer + FK + + reference.reference_ID + (SELECT shortname from reference where reference.reference_id=taxoninterpretation.reference_id) + no + + Foreign key into the reference table. + Foreign key into reference table, which identifies a publication in which the interpretation was formally made, or in which the plot was used in a formal analysis. + + 1267 + 409 + + 1.0.0 + + + 1671 + originalInterpretation + Original Interpretation + logical + no + Boolean + n/a + + n/a + (CASE WHEN originalinterpretation THEN 'Yes' ELSE 'No' END) + no + + n/a + This interpretation corresponds to the original interpretation of the plot author, as best as can be determined. There is no requirement that the authority match the authority of the author; only that the concepts are synonymous. + + 1268 + 5 + 1269 + 1270 + 410 + + 1.0.0 + + + 1674 + currentInterpretation + Current Interpretation + logical + no + Boolean + n/a + + n/a + (CASE WHEN currentinterpretation THEN 'Yes' ELSE 'No' END) + no + + n/a + This interpretation is the most accurate and precise interpretation currently available. + + 1271 + 6 + 1272 + 1273 + 411 + + 1.0.0 + + + 1677 + taxonFit + Taxon Fit + logical + yes + varchar (50) + n/a + + n/a + closed + + + Absolutely correct + (Fits well) No doubt about the match. Perfect fit. + 5 + + + Absolutely wrong + (Absolutely doesn't fit) This answer is absolutely unacceptable. Unambiguously incorrect. + 1 + + + Good answer + (Fits reasonably well) Good match with the concept. Unambiguously correct. + 4 + + + Reasonable or acceptable answer + (Possibly fits) Maybe not the best possible answer but it is acceptable; this answer does not pose a problem to the user. Correct. + 3 + + + Understandable but wrong + (Doesn't fit but is close) Not a good answer. There is something about the plot that makes the answer understandable, but there is clearly a better answer. This answer would pose a problem for users. Incorrect. + 2 + + + n/a + Indicates the degree of fit with the plant concept being assigned. Values derive from Gopal, S., and Woodcock, C. (1994), Theory and methods for accuracy assessment of thematic maps using fuzzy sets. Photogrammetric Engineering and Remote Sensing 60(2):181-188. + + 1272 + 7 + 1253 + 1274 + 412 + + 1.0.1 + + + 1680 + taxonConfidence + Taxon Confidence + logical + yes + varchar (50) + n/a + + n/a + closed + + + High + The party making the taxon interpretation has a high confidence in the accuracy of this interpretation. A party can have high confidence that a plot has a fit of "absolutely wrong" for a particular community. + 1 + + + Low + The party making the taxon interpretation has a low confidence in the accuracy of this interpretation. + 3 + + + Medium + The party making the taxon interpretation has a medium amount of confidence in the accuracy of this interpretation. + 2 + + + n/a + Indicates the degree of confidence of the interpreter(s) in the interpretation made. This can reflect the level of familiarity with the classification or the sufficiency of information about the plot (e.g., High, Moderate, Low). + + 1273 + 8 + 1253.5 + 1275 + 413 + + 1.0.1 + + + 1683 + collector_ID + Collector + logical + yes + Integer + FK + + party.PARTY_ID + (SELECT CASE WHEN surname is null THEN 'org:' || organizationname ELSE surname || ', ' || givenname END FROM party AS pcoll WHERE pcoll.party_id=taxoninterpretation.collector_id) + no + + foreign key into the Party table + Party who collected the voucher which was used to make this taxonInterpretation. + + 1273.1 + 414 + + 1.0.1 + + + 1686 + collectionNumber + Collection Number + logical + yes + varchar (100) + n/a + + n/a + no + + n/a + The Collector's identification code for the voucher. + + 1273.2 + 415 + + 1.0.1 + + + 1689 + collectionDate + Collection Date + logical + yes + Date + n/a + + n/a + no + + n/a + Date on which the voucher was collected. + + 1273.3 + 416 + + 1.0.1 + + + 1692 + museum_ID + Museum + logical + yes + Integer + FK + + party.PARTY_ID + (SELECT CASE WHEN surname is null THEN 'org:' || organizationname ELSE surname || ', ' || givenname END FROM party AS pmus WHERE pmus.party_id=taxoninterpretation.museum_id) + no + + foreign key into the Party table + Link to the Party which is the museum which archives the voucher. + + 1273.4 + 417 + + 1.0.1 + + + 1695 + museumAccessionNumber + Museum Accession Number + logical + yes + varchar (100) + n/a + + n/a + no + + n/a + Museum Code which identifies the voucher. + + 1273.5 + 418 + + 1.0.1 + + + 1698 + groupType + Group Type + logical + yes + varchar (20) + n/a + + n/a + closed + + + one of + One of several plant concepts is interpreted to be the TaxonObservation in question. For example, this is either species A OR species B. Plants observed were one or the other, but not both, but which species cannot be determined. + 1 + + + union + Several plant concepts are grouped to describe this taxon. For example, taxonObservation applies to the union of both species A and species B. Plants observed were from both species. + 2 + + + unknown + It is not specified how the plant concepts are grouped. Not recommended value. + 3 + + + n/a + The type of group formed for this taxonInterpretation_ID. + + 1271.7 + 9 + 1272.7 + 1273.7 + 419 + + 1.0.1 + + + 1701 + notes + Notes + logical + yes + text + n/a + + n/a + no + + n/a + These are notes that the interpreter has included with the interpretation (generally, the reason for the interpretation). + + 1274 + 1276 + 420 + + 1.0.0 + + + 1704 + notesPublic + Notes Public + logical + yes + Boolean + n/a + + n/a + no + + n/a + TRUE indicates that public notes pertaining to this plot exist in "vegPlot.note" + + 1279 + 421 + + 1.0.0 + + + 1707 + notesMgt + Notes Mgt + logical + yes + Boolean + n/a + + n/a + no + + n/a + TRUE indicates that nonpublic management notes pertaining to this plot exist in "vegPlot.note" + + 1282 + 422 + + 1.0.0 + + + 1710 + revisions + Revisions + logical + yes + Boolean + n/a + + n/a + no + + n/a + TRUE indicates that revisions exist in vegPlot.Revision + + 1285 + 423 + + 1.0.0 + + + 1713 + emb_taxonInterpretation + this row embargoed. + denorm + yes + Integer + n/a + + n/a + no + + n/a + This value mimics the default embargo value for the plot that this record belongs to. + 1.0.2 + + + 1714 + accessionCode + Accession Code + logical + yes + varchar (255) + n/a + + n/a + no + + n/a + Code that uniquely references this record, allowing reference to this record for this version of this database. Better than a primary key, which is automatically generated by a database and not globally unique. VegBank Accession codes are only generated by VegBank, and therefore data integrity can be guaranteed, unlike with a primary key (number). + + 1306 + 429 + + 1.0.6 + + + + taxonObservation + Taxon Observation + This table contains the author's determination of a taxon and the overall cover of that taxon. + This table stores information about the original identification by the author of the plot and the taxonomic authority used by that author (i.e. a name - citation pair constituting a taxonomic concept). The table also contains a record of cumulative cover (cover across all strata) of the taxon when not divided into strata. + plot + 1.0.0 + + 1716 + TAXONOBSERVATION_ID + ID + logical + yes + serial + PK + + n/a + (authorplantname) + no + + Primary key of the table. + Database generated identifier assigned to each unique observation of a taxon in a plot. + + 1 + 424 + + 1.0.0 + + + 1719 + OBSERVATION_ID + Observation + logical + no + Integer + FK + + observation.OBSERVATION_ID + (select authorObsCode from observation where observation.observation_id=taxonobservation.observation_id) + no + + Foreign key into the Observation table. + Link to the parent observation event of this taxon observation. + + 1289 + 2 + 425 + + 1.0.0 + + + 1722 + authorPlantName + Author Plant Name + logical + yes + varchar (255) + n/a + + n/a + no + + n/a + The taxon name that the author of the plot used to refer to a taxon observed within the plot. + + 1290 + 1291 + 426 + + 1.0.1 + + + 1725 + reference_ID + Reference + logical + yes + Integer + FK + + reference.reference_ID + (SELECT shortname from reference where reference.reference_id=taxonobservation.reference_id) + no + + Foreign key into the reference table. + The authority for the taxon that was used by the plot author. If the authority is unknown the author of the plot is the authority. For other than legacy data, this field plus plantName_ID will be sufficient to determine taxonInterpretation.plantConcept_ID. + + 1293 + 427 + + 1.0.0 + + + 1728 + taxonInferenceArea + Taxon Inference Area + logical + yes + Float + n/a + + n/a + no + + The area used to infer the presence of the taxon, if not the same as observation.taxonInferenceArea. + This is the area in m2 used to infer the presence of a given taxon. Generally this should be equal to observation.taxonInferenceArea, but at times this area may be larger or smaller for a specific taxon. RESERVED VALUE: -1 is used to indicate that no known plot boundaries were used when recording this species on the plot. That is, this species may occur outside the plot area as indicated in the plot and observation tables. + m² + + 1303 + 1305 + 428 + + 1.0.0 + + + 1731 + accessionCode + Accession Code + logical + yes + varchar (255) + n/a + + n/a + no + + n/a + Code that uniquely references this record, allowing reference to this record for this version of this database. Better than a primary key, which is automatically generated by a database and not globally unique. VegBank Accession codes are only generated by VegBank, and therefore data integrity can be guaranteed, unlike with a primary key (number). + + 1306 + 429 + + 1.0.6 + + + 1734 + emb_taxonObservation + this row embargoed. + denorm + yes + Integer + n/a + + n/a + no + + n/a + This value mimics the default embargo value for the plot that this record belongs to. + 1.0.2 + + + 1737 + int_origPlantConcept_ID + Original Interpretation, Plant Concept ID + denorm + yes + Integer + n/a + + n/a + authorPlantName + no + + n/a + The Plant Concept ID for the Original Interpretation. + 1.0.3 + addTaxonObsDenormPlantNames.sql + + + 1740 + int_origPlantSciFull + Original Interpretation, full Scientific Name + denorm + yes + varchar (255) + n/a + + n/a + authorPlantName + no + + n/a + The full Scientific Name, with authors, for the Original Interpretation. + + 1292 + + 1.0.3 + throwAways\alterTaxObsDenormRenameSciNameToFull.sql + + + 1743 + int_origPlantSciNameNoAuth + Original Interpretation, Scientific Name without authors + denorm + yes + varchar (255) + n/a + + n/a + authorPlantName + no + + n/a + The Scientific Name without authors for the Original Interpretation. + + 1293 + + 1.0.3 + addTaxonObsDenormPlantNames.sql + + + 1746 + int_origPlantCommon + Original Interpretation, Common Name + denorm + yes + varchar (255) + n/a + + n/a + authorPlantName + no + + n/a + The Common Name for the Original Interpretation. + + 1294 + + 1.0.3 + addTaxonObsDenormPlantNames.sql + + + 1749 + int_origPlantCode + Original Interpretation, USDA Code + denorm + yes + varchar (255) + n/a + + n/a + authorPlantName + no + + n/a + The USDA Code, if available, for the Original Interpretation. + + 1295 + + 1.0.3 + addTaxonObsDenormPlantNames.sql + + + 1752 + int_currPlantConcept_ID + Current Interpretation, Plant Concept ID + denorm + yes + Integer + n/a + + n/a + no + + n/a + The Plant Concept ID for the Current Interpretation, which is often that same as the Original Interpretation. + 1.0.3 + addTaxonObsDenormPlantNames.sql + + + 1755 + int_currPlantSciFull + Current Interpretation, full Scientific Name + denorm + yes + varchar (255) + n/a + + n/a + authorPlantName + no + + n/a + The full Scientific Name, with authors,for the Current Interpretation. + + 1297 + + 1.0.3 + throwAways\alterTaxObsDenormRenameSciNameToFull.sql + + + 1758 + int_currPlantSciNameNoAuth + Current Interpretation, Scientific Name without authors + denorm + yes + varchar (255) + n/a + + n/a + authorPlantName + no + + n/a + The Scientific Name without authors for the Current Interpretation. + + 1298 + + 1.0.3 + addTaxonObsDenormPlantNames.sql + + + 1761 + int_currPlantCommon + Current Interpretation, Common Name + denorm + yes + varchar (255) + n/a + + n/a + authorPlantName + no + + n/a + The Common Name for the Current Interpretation. + + 1299 + + 1.0.3 + addTaxonObsDenormPlantNames.sql + + + 1764 + int_currPlantCode + Current Interpretation, USDA Code + denorm + yes + varchar (255) + n/a + + n/a + authorPlantName + no + + n/a + The USDA Code, if available, for the Current Interpretation. + + 1300 + + 1.0.3 + addTaxonObsDenormPlantNames.sql + + + + taxonAlt + Taxon Alt + This table shows alternate taxa that are to be grouped for a taxonInterpretation. + When this table is used, the taxonInterpretation that is referenced here is interpreting the taxonObservation as the combination of all plantConcepts referenced in this table with the same taxonInterpretation_ID. TaxonInterpretation.groupType shows what type of group this is (one of, union, unknown). + plot + 1.0.1 + + 1767 + taxonAlt_ID + ID + logical + yes + serial + PK + + n/a + no + + n/a + Database generated number to uniquely identify this record, and thus taxonGroup. + + 19 + + 1.0.1 + + + 1770 + taxonInterpretation_ID + Taxon Interpretation + logical + no + Integer + FK + + taxonInterpretation.TAXONINTERPRETATION_ID + no + + n/a + Links to the taxonInterpretation for which several plantConcepts are grouped to form an irregular taxon. The plantConcept referenced here is one member of the group. + + 20 + + 1.0.1 + + + 1773 + plantConcept_ID + Plant Concept + logical + no + Integer + FK + + plantConcept.PLANTCONCEPT_ID + (select plantname FROM plantconcept where plantconcept.plantconcept_ID=taxonalt.plantconcept_id) + no + + n/a + Links to the plantConcept that is part of the taxonGroup formed by all records in this table with the same taxonInterpretation_ID. + + 3 + 3 + 3 + 430 + + 1.0.1 + + + 1776 + taxonAltFit + Taxon Fit + logical + yes + varchar (50) + n/a + + n/a + closed + + + Absolutely correct + (Fits well) No doubt about the match. Perfect fit. + 5 + + + Absolutely wrong + (Absolutely doesn't fit) This answer is absolutely unacceptable. Unambiguously incorrect. + 1 + + + Good answer + (Fits reasonably well) Good match with the concept. Unambiguously correct. + 4 + + + Reasonable or acceptable answer + (Possibly fits) Maybe not the best possible answer but it is acceptable; this answer does not pose a problem to the user. Correct. + 3 + + + Understandable but wrong + (Doesn't fit but is close) Not a good answer. There is something about the plot that makes the answer understandable, but there is clearly a better answer. This answer would pose a problem for users. Incorrect. + 2 + + + n/a + Indicates the degree of fit with the plant concept being assigned. Values derive from Gopal, S., and Woodcock, C. (1994), Theory and methods for accuracy assessment of thematic maps using fuzzy sets. Photogrammetric Engineering and Remote Sensing 60(2):181-188. + + 4 + 4 + 4 + 431 + + 1.0.1 + + + 1779 + taxonAltConfidence + Taxon Confidence + logical + yes + varchar (50) + n/a + + n/a + closed + + + High + The party making the taxon interpretation has a high confidence in the accuracy of this interpretation. A party can have high confidence that a plot has a fit of "absolutely wrong" for a particular community. + 1 + + + Low + The party making the taxon interpretation has a low confidence in the accuracy of this interpretation. + 3 + + + Medium + The party making the taxon interpretation has a medium amount of confidence in the accuracy of this interpretation. + 2 + + + n/a + Indicates the degree of confidence of the interpreter(s) in the interpretation made. This can reflect the level of familiarity with the classification or the sufficiency of information about the plot (e.g., High, Moderate, Low). + + 5 + 5 + 5 + 432 + + 1.0.1 + + + 1782 + taxonAltNotes + Taxon Alt Notes + logical + yes + text + n/a + + n/a + no + + n/a + These are notes that the interpreter has included with the interpretation (generally, the reason for the interpretation). + + 6 + 6 + 6 + 433 + + 1.0.1 + + + 1785 + emb_taxonAlt + this row embargoed. + denorm + yes + Integer + n/a + + n/a + no + + n/a + This value mimics the default embargo value for the plot that this record belongs to. + 1.0.2 + + + + telephone + Telephone + Telephone numbers for the various individuals and organizations in the party table. + + plot + 1.0.0 + + 1788 + TELEPHONE_ID + ID + logical + yes + serial + PK + + n/a + no + + Primary key for the telephone table. + Database generated identifier assigned to each unique telephone contact record. + + 19 + + 1.0.0 + + + 1791 + PARTY_ID + Party + logical + no + Integer + FK + + party.PARTY_ID + no + + Foreign key into the party table + This is the 'link' between a PARTY and an entry in the TELEPHONE table. + + 20 + + 1.0.0 + + + 1794 + phoneNumber + Phone Number + logical + no + varchar (30) + n/a + + n/a + no + + n/a + Telephone number. + + 1313 + 1314 + 1315 + 434 + + 1.0.0 + + + 1797 + phoneType + Phone Type + logical + no + varchar (20) + n/a + + n/a + closed + + + Cell + + 3 + + + Fax + + 4 + + + Home + + 2 + + + Not specified + + 6 + + + Secretary + + 5 + + + Work + + 1 + + + closed list + This is the type of telephone: home, work, fax, cell, secretary, other. + + 1316 + 2 + 1318 + 435 + + 1.0.0 + + + + userDefined + User Defined + This table contains the definitions of user-defined variables. The table structure stems from desire to keep the user-defined variables separate from the main body of the database. + This table contains the definitions of user-defined variables. The table structure stems from desire to keep the user-defined variables separate from the main body of the database. + plot + 1.0.0 + + 1800 + USERDEFINED_ID + ID + logical + yes + serial + PK + + n/a + no + + Primary key for userDefined + Database generated identifier assigned to each unique user-defined variable. + + 19 + + 1.0.0 + + + 1803 + userDefinedName + User Defined Name + logical + yes + varchar (50) + n/a + + n/a + open + + + Depth to permafrost + + 3 + + + Microbial biomass + + 1 + + + Slope convexity + + 2 + + + open list + Name of the user-defined variable. + + 1321 + 1322 + 1323 + 436 + + 1.0.0 + + + 1806 + userDefinedMetadata + User Defined Metadata + logical + yes + text + n/a + + n/a + no + + n/a + Metadata about this user-defined variable. + + 1324 + 1325 + 1326 + 437 + + 1.0.0 + + + 1809 + userDefinedCategory + User Defined Category + logical + yes + varchar (30) + n/a + + n/a + closed + + + Disturbance and land use + + 7 + + + Environment + + 5 + + + Geology and geomorphology + + 3 + + + Moisture + + 4 + + + Not specified + + 9 + + + Soil, chemical attributes + + 2 + + + Soil, physical attributes + + 1 + + + Subplots + + 8 + + + Topography + + 6 + + + closed list + Category of variable; included to facilitate queries for specific types of data. + + 1327 + 1328 + 1329 + 438 + + 1.0.0 + + + 1812 + userDefinedType + User Defined Type + logical + no + varchar (20) + n/a + + n/a + no + + n/a + Database data type of the user-defined variable. + + 1330 + 1331 + 1332 + 439 + + 1.0.0 + + + 1815 + tableName + Table Name + logical + no + varchar (50) + n/a + + n/a + no + + n/a + Name of table with which this user-defined variable is associated. For example soilBHorizonColor may be defined by the data contributor as associated with the observation table. + + 1333 + 1334 + 1335 + 440 + + 1.0.0 + + + 1818 + accessionCode + Accession Code + logical + yes + varchar (255) + n/a + + n/a + no + + n/a + Code that uniquely references this record, allowing reference to this record for this version of this database. Better than a primary key, which is automatically generated by a database and not globally unique. VegBank Accession codes are only generated by VegBank, and therefore data integrity can be guaranteed, unlike with a primary key (number). + + 1336 + 441 + + 1.0.6 + + + + embargo + Embargo on Plot + Embargo of plot data. + + plot + 1.0.2 + + 1821 + embargo_ID + Embargo ID + logical + no + serial + PK + + n/a + no + + n/a + Database generated unique key for each record in this table. + + 5 + 5 + 442 + + 1.0.2 + + + 1824 + plot_ID + Plot ID + logical + no + Integer + FK + + plot.PLOT_ID + no + + n/a + Foreign key to the plot to which this embargo applies. + + 6 + 6 + 443 + + 1.0.2 + + + 1827 + embargoReason + Embargo Reason + logical + no + text + n/a + + n/a + closed + + + Author stipulation + Plot Author requires that plot be embargoed + 1 + + + Rare Species + There are rare species on this plot whose exact location should not be revealed to all users. + 2 + + + Land Ownership + Land owner requires plot data to be embargoed + 3 + + + Bad Data + The data pertaining to this plot have been determined to have errors. + 4 + + + Other + None of the above reasons. + 99 + + + Author stipulation,Rare species,Landownership,Bad data,Other + Reason why the plot is embargoed. This field, as all fields in this table, are private and cannot be viewed or downloaded by VegBank users. + + 7 + 7 + 444 + + 1.0.2 + + + 1830 + embargoStart + Embargo Start + logical + no + Date + n/a + + n/a + no + + n/a + Start date for the embargo. + + 8 + 8 + 445 + + 1.0.2 + + + 1833 + embargoStop + Embargo Stop + logical + no + Date + n/a + + n/a + no + + n/a + Stop date for the embargo. + + 9 + 9 + 446 + + 1.0.2 + + + 1836 + defaultStatus + Default Status + logical + no + Integer + n/a + + n/a + closed + + + 0 + Public + 1 + + + 1 + 1 km radius + 2 + + + 2 + 10 km radius + 3 + + + 3 + 100 km radius + 4 + + + 4 + Location embargo + 5 + + + 5 + Public embargo on data + 6 + + + 6 + Full embargo on data + 7 + + + 0-6, according to confidStatus values + Level of embargo for users that do not have special permission found in userPermission table. + + 10 + 10 + 447 + + 1.0.2 + + + + usr + User + Information about VegBank users. + + user + NEVER ADD + 1.0.2 + true + + 1839 + usr_ID + User ID + implementation + no + serial + PK + + n/a + no + + n/a + Database generated unique key for each record in this table. + + 19 + + 1.0.2 + + + 1842 + party_ID + Party ID + implementation + no + Integer + FK + + party.PARTY_ID + no + + n/a + Foreign key pointing to the party that corresponds to this user. When the user makes changes to the database, the party referenced here will be recorded in VegBank. + + 20 + + 1.0.2 + + + 1845 + password + Password + implementation + yes + varchar (512) + n/a + + n/a + no + + n/a + Password to access VegBank on the web. + + 1.0.5 + + + 1848 + permission_type + Permission Type + implementation + no + Integer + n/a + + n/a + no + + Old list of permissions was 1-5 but this is no longer valid, though it is in the code (in comments) some places. + Level of permission that the user has, corresponding to certification. Permission is a composite of various values that are added together, with 1=registered, 2=certified, 4=professional, and 8=admin. Functionally, users will only have permission values of 1 (reg),3 (reg+cert),7 (reg+cert+pro),15 (reg+cert+pro+dba). + 1.0.2 + + + 1851 + begin_time + Begin Time + implementation + yes + Date + n/a + + n/a + no + + n/a + Date/time of first log-in. + 1.0.2 + + + 1854 + last_connect + Last Connect + implementation + yes + Date + n/a + + n/a + no + + n/a + Date/time of most recent log-in. + 1.0.2 + + + 1857 + ticket_count + Ticket Count + implementation + yes + Integer + n/a + + n/a + no + + n/a + Number of times logged in. + 1.0.2 + + + 1860 + email_address + Email Address + implementation + no + varchar (100) + n/a + + n/a + no + + n/a + Email address used to log on to VegBank on the web. + 1.0.2 + + + 1863 + preferred_name + Preferred Name + implementation + yes + varchar (100) + n/a + + n/a + no + + name the user wishes to be called in correspondence + Name to be used in VegBank correspondance, generally just the given name. If blank, we will use the givenName found in party table. + 1.0.2 + + + 1866 + remote_address + Remote Address + implementation + yes + varchar (100) + n/a + + n/a + no + + ip address + IP address used to register the VegBank account. + 1.0.2 + + + + userCertification + User Certification + Info about user certification. + + user + NEVER ADD + 1.0.2 + + 1869 + userCertification_ID + User Certification ID + implementation + no + serial + PK + + n/a + no + + n/a + Database generated unique key for each record in this table. + + 1 + 448 + + 1.0.2 + + + 1872 + usr_ID + User ID + implementation + no + Integer + FK + + usr.usr_ID + no + + n/a + Foreign key pointing to the user about which this certification request applies. + + 2 + 449 + + 1.0.2 + + + 1875 + current_cert_level + Current CertificationLevel + implementation + no + Integer + n/a + + n/a + no + + n/a + Level of certification the user currently has. + 1.0.2 + + + 1878 + requested_cert_level + Requested Certification Level + implementation + no + Integer + n/a + + n/a + no + + n/a + Level of certification the user is requesting in this record. + + 4 + 4 + 450 + + 1.0.2 + + + 1881 + highest_degree + Highest Degree + implementation + yes + varchar (50) + n/a + + n/a + no + + n/a + Highest degree attained by the user, thus far. + + 5 + 5 + 451 + + 1.0.2 + + + 1884 + degree_year + Degree Year + implementation + yes + varchar (50) + n/a + + n/a + no + + n/a + Year of highest Degree. + + 6 + 6 + 452 + + 1.0.2 + + + 1887 + degree_institution + Degree Institution + implementation + yes + varchar (50) + n/a + + n/a + no + + n/a + Institution granting Highest Degree + + 7 + 7 + 453 + + 1.0.2 + + + 1890 + current_org + Current Organization + implementation + yes + varchar (50) + n/a + + n/a + no + + n/a + Current Organization the user works with or for. + + 8 + 8 + 454 + + 1.0.2 + + + 1893 + current_pos + Current Position + implementation + yes + varchar (200) + n/a + + n/a + no + + n/a + Position within the Current Institution of the user. + + 9 + 9 + 455 + + 1.0.2 + + + 1896 + esa_member + ESA Certified Ecologist? + implementation + yes + Boolean + n/a + + n/a + no + + n/a + User is a certified ESA ecologist? + + 10 + 10 + 456 + + 1.0.2 + + + 1899 + prof_exp + Professional Experience Doc + implementation + yes + text + n/a + + n/a + no + + n/a + Users documentation of their professional experience. + + 11 + 11 + 457 + + 1.0.2 + + + 1902 + relevant_pubs + Relevant Pubs + implementation + yes + text + n/a + + n/a + no + + n/a + publications showing experience or expertise in fields relating to VegBank. + + 12 + 12 + 458 + + 1.0.2 + + + 1905 + veg_sampling_exp + Veg Sampling Experience + implementation + yes + text + n/a + + n/a + no + + n/a + background and expertise in vegetation sampling + + 13 + 13 + 459 + + 1.0.2 + + + 1908 + veg_analysis_exp + Veg Analysis Experience + implementation + yes + text + n/a + + n/a + no + + n/a + background and expertise with vegetation analysis, description and classification + + 14 + 14 + 460 + + 1.0.2 + + + 1911 + usnvc_exp + US-NVC Experience + implementation + yes + text + n/a + + n/a + no + + n/a + prior experience with the US National Vegetation Classification, if any + + 15 + 15 + 461 + + 1.0.2 + + + 1914 + vb_exp + Vegbank Experience + implementation + yes + text + n/a + + n/a + no + + n/a + prior experience with the VegBank archive, if any + + 16 + 16 + 462 + + 1.0.2 + + + 1917 + vb_intention + VegBank Expected Uses + implementation + yes + text + n/a + + n/a + no + + n/a + what uses do you anticipate making the VegBank archive? + + 17 + 17 + 463 + + 1.0.2 + + + 1920 + tools_exp + Plotdb Experience Doc + implementation + yes + text + n/a + + n/a + no + + n/a + prior experience with other vegetation plot database and/or analytical tools + + 18 + 18 + 464 + + 1.0.2 + + + 1923 + esa_sponsor_name_a + ESA Sponsor Name A + implementation + yes + varchar (120) + n/a + + n/a + no + + n/a + First ESA sponsor's name + + 19 + 19 + 465 + + 1.0.2 + + + 1926 + esa_sponsor_email_a + ESA Sponsor Email A + implementation + yes + varchar (120) + n/a + + n/a + no + + n/a + First ESA sponsor's email. + + 20 + 20 + 466 + + 1.0.2 + + + 1929 + esa_sponsor_name_b + ESA Sponsor Name B + implementation + yes + varchar (120) + n/a + + n/a + no + + n/a + Second ESA sponsor's name. + + 21 + 21 + 467 + + 1.0.2 + + + 1932 + esa_sponsor_email_b + ESA Sponsor Email B + implementation + yes + varchar (120) + n/a + + n/a + no + + n/a + Second ESA sponsor's email. + + 22 + 22 + 468 + + 1.0.2 + + + 1935 + peer_review + Peer Review + implementation + yes + Boolean + n/a + + n/a + no + + n/a + User would like to participate in the peer review process. + + 23 + 23 + 469 + + 1.0.2 + + + 1938 + addl_stmt + Additional Statements + implementation + yes + text + n/a + + n/a + no + + n/a + Anything else the user would like to say about his/her certification request. + + 24 + 24 + 470 + + 1.0.2 + + + 1941 + certificationStatus + Certification Status + implementation + yes + varchar (30) + n/a + + n/a + closed + + + requested + User has requested certification, but nothing further is known + 1 + + + received + Certification panel has acknowledged receipt of certification request, but a decision has not yet been made. + 2 + + + pending + Certification panel requests that the user demonstrate ability with VegBank before granting certification. + 3 + + + temporary + Certification panel grants certification on a temporary basis, the explanation of which should be in certificationStatusComments + 4 + + + approved + Certification panel has certified this user. + 5 + + + rejected + Certification panel has decided that this user should not be certified. + 6 + + + discarded + Certification panel does not think that this is a serious request and does not respond to it (i.e. junk mail) + 7 + + + n/a + Status of the certification request: requested, pending, denied, approved + 1.0.2 + + + 1944 + certificationStatusComments + Certification Status Comments + implementation + yes + text + n/a + + n/a + no + + n/a + Comments about the certification status, i.e. more information + 1.0.2 + + + 1947 + exp_region_a + Region of Expertise #1 + implementation + yes + text + n/a + + n/a + no + + n/a + Geographical region of expertise. + + 27 + 27 + 471 + + 1.0.2 + + + 1950 + exp_region_b + Region of Expertise #2 + implementation + yes + text + n/a + + n/a + no + + n/a + Geographical region of expertise. + + 28 + 28 + 472 + + 1.0.2 + + + 1953 + exp_region_c + Region of Expertise #3 + implementation + yes + text + n/a + + n/a + no + + n/a + Geographical region of expertise. + + 29 + 29 + 473 + + 1.0.2 + + + 1956 + exp_region_a_veg + Vegetation Expertise in region #1 + implementation + yes + text + n/a + + n/a + no + + n/a + Geographical region of expertise. + + 30 + 30 + 474 + + 1.0.2 + + + 1959 + exp_region_b_veg + Vegetation Expertise in region #2 + implementation + yes + text + n/a + + n/a + no + + n/a + Geographical region of expertise. + + 31 + 31 + 475 + + 1.0.2 + + + 1962 + exp_region_c_veg + Vegetation Expertise in region #3 + implementation + yes + text + n/a + + n/a + no + + n/a + Geographical region of expertise. + + 32 + 32 + 476 + + 1.0.2 + + + 1965 + exp_region_a_flor + Floristics Expertise in region #1 + implementation + yes + text + n/a + + n/a + no + + n/a + Geographical region of expertise. + + 33 + 33 + 477 + + 1.0.2 + + + 1968 + exp_region_b_flor + Floristics Expertise in region #2 + implementation + yes + text + n/a + + n/a + no + + n/a + Geographical region of expertise. + + 34 + 34 + 478 + + 1.0.2 + + + 1971 + exp_region_c_flor + Floristics Expertise in region #3 + implementation + yes + text + n/a + + n/a + no + + n/a + Geographical region of expertise. + + 35 + 35 + 479 + + 1.0.2 + + + 1974 + exp_region_a_nvc + US-NVC Expertise in region #1 + implementation + yes + text + n/a + + n/a + no + + n/a + Geographical region of expertise. + + 36 + 36 + 480 + + 1.0.2 + + + 1977 + exp_region_b_nvc + US-NVC Expertise in region #2 + implementation + yes + text + n/a + + n/a + no + + n/a + Geographical region of expertise. + + 37 + 37 + 481 + + 1.0.2 + + + 1980 + exp_region_c_nvc + US-NVC Expertise in region #3 + implementation + yes + text + n/a + + n/a + no + + n/a + Geographical region of expertise. + + 38 + 38 + 482 + + 1.0.2 + + + + userRegionalExp + User Regional Experience + Self assessment of regional experience for certified users. + + user + NEVER ADD + 1.0.2 + + 1983 + userRegionalExp_ID + User Regional Experience ID + implementation + no + serial + PK + + n/a + no + + n/a + Database generated unique key for each record in this table. + 1.0.2 + + + 1986 + userCertification_ID + User Certification ID + implementation + no + Integer + FK + + userCertification.userCertification_ID + no + + n/a + Foreign key into the userCertification table for which this regional experience assessment applies. + 1.0.2 + + + 1989 + region + Experience in Region + implementation + no + varchar (50) + n/a + + n/a + no + + n/a + Region the user has experience with. + 1.0.2 + + + 1992 + vegetation + Vegetation + implementation + yes + varchar (50) + n/a + + n/a + closed + + + 1 + weak knowledge + 1 + + + 2 + some knowledge + 2 + + + 3 + moderate knowledge + 3 + + + 4 + great knowledge + 4 + + + 5 + expert knowledge + 5 + + + 1=weak, 5=expert + Experience of the user with the Vegetation of this region. + 1.0.2 + + + 1995 + floristics + Floristics + implementation + yes + varchar (50) + n/a + + n/a + closed + + + 1 + weak knowledge + 1 + + + 2 + some knowledge + 2 + + + 3 + moderate knowledge + 3 + + + 4 + great knowledge + 4 + + + 5 + expert knowledge + 5 + + + 1=weak, 5=expert + Experience of the user with the Floristics of this region. + 1.0.2 + + + 1998 + nvc_ivc + US-NVC or IVC + implementation + yes + varchar (50) + n/a + + n/a + closed + + + 1 + weak knowledge + 1 + + + 2 + some knowledge + 2 + + + 3 + moderate knowledge + 3 + + + 4 + great knowledge + 4 + + + 5 + expert knowledge + 5 + + + 1=weak, 5=expert + Experience of the user with the US-NVC or IVC of this region. + 1.0.2 + + + + userDataset + Dataset + User stored datasets + + user + 1.0.2 + + 2001 + userDataset_ID + User Dataset ID + implementation + no + serial + PK + + n/a + no + + n/a + Database generated unique key for each record in this table. + 1.0.2 + + + 2004 + usr_ID + User ID + implementation + yes + Integer + FK + + usr.usr_ID + (select party_id_transl from view_party_transl, usr where view_party_transl.party_id=usr.party_id and usr.usr_id=userdataset.usr_id) + no + + n/a + Foreign key pointing to the user to whom this dataset belongs. + + 2 + 483 + + 1.0.2 + + + 2007 + datasetStart + Dataset Start + implementation + yes + Date + now() + n/a + + n/a + no + + maybe we don't need + Date of start of dataset. + + 3 + 3 + 484 + + 1.0.2 + + + 2010 + datasetStop + Dataset Stop + implementation + yes + Date + n/a + + n/a + no + + maybe we don't need + Date of end of dataset, if deemed no longer active. + + 4 + 485 + + 1.0.2 + + + 2013 + accessionCode + Accession Code + implementation + yes + varchar (255) + n/a + + n/a + no + + n/a + Accession Code of the dataset, to be used to reference the observations contained here with a URL pointing to this dataset. Helps avoid URL's that are too long. + + 5 + 486 + + 1.0.6 + + + 2016 + datasetName + Dataset Name + implementation + no + varchar (100) + n/a + + n/a + no + + n/a + Name of Dataset, should be unique for each user. + + 1 + 1 + 487 + + 1.0.2 + + + 2019 + datasetDescription + Dataset Description + implementation + yes + text + n/a + + n/a + no + + n/a + Description of dataset. + + 7 + 488 + + 1.0.2 + + + 2022 + datasetType + Dataset Type + implementation + yes + varchar (50) + n/a + + n/a + no + + n/a + Type of dataset. + + 8 + 8 + 489 + + 1.0.2 + + + 2025 + datasetSharing + Dataset Sharing + implementation + yes + varchar (30) + n/a + + n/a + closed + + + public + anyone can view this dataset - it is listed among public datasets + 1 + + + private + no one can view this dataset except the user who created it + 2 + + + password + no one may view this dataset except with a password, as specified in this table. + 3 + + + public, private, password + OK to share this dataset with others? Note that the dataset must be public or password-protected to be accessed via the accessionCode. + + 9 + 490 + + 1.0.2 + + + 2028 + datasetPassword + Dataset Password + implementation + yes + varchar (50) + n/a + + n/a + no + + n/a + Password to access the dataset if the dataset is password protected. + 1.0.2 + + + + userDatasetItem + Items of Dataset + Items (entities) that belong to a user's dataset. + + user + 1.0.2 + + 2031 + userDatasetItem_ID + User Dataset Observation ID + implementation + no + serial + PK + + n/a + no + + n/a + Database generated unique key for each record in this table. + 1.0.2 + + + 2034 + userDataset_ID + User Dataset ID + implementation + no + Integer + FK + + userDataset.userDataset_ID + no + + n/a + Foreign key to the dataset in which the observation in this record is a member. + 1.0.2 + + + 2037 + itemAccessionCode + Item's Accession Code + implementation + no + varchar (100) + n/a + + n/a + no + + accessionCode for observation that is part of dataset: used instead of observation_ID to allow observations from any database + Accession Code for the observation which is a member of the dataset referenced in userDataset_ID. Accession codes are used so that observations from any VegBank database can be included in the dataset. + + 491 + + 1.0.2 + + + 2040 + itemDatabase + Item's Source Database + implementation + no + varchar (50) + n/a + + n/a + closed + + + vegbank + VegBank database at vegbank.org + 1 + + + n/a + The source database name where the dataset item is stored. + 1.0.3 + throwAways/add_datasetItem_denorms.sql + + + 2043 + itemTable + Item's Table + implementation + no + varchar (50) + n/a + + n/a + no + + n/a + + 1.0.3 + throwAways/add_datasetItem_denorms.sql + + + 2046 + itemRecord + Item's Primary Key + implementation + no + Integer + n/a + + n/a + no + + n/a + + 1.0.3 + throwAways/add_datasetItem_denorms.sql + + + 2049 + externalAccessionCode + External Accession Code + implementation + yes + varchar (100) + n/a + + n/a + no + + accessionCode for an incoming piece of data + Accession Code for an incoming piece of data. + + 491 + + 1.0.2 + + + 2052 + itemType + Item Type + implementation + yes + varchar (50) + n/a + + n/a + no + + plant, community, plot, observation, etc. + Type of item/entity that this is. + + 4 + 4 + 492 + + 1.0.2 + + + 2055 + itemStart + Dataset Obs Start + implementation + no + Date + now() + n/a + + n/a + no + + n/a + Start date for the validity of this record. + + 5 + 493 + + 1.0.2 + + + 2058 + itemStop + Dataset Obs Stop + implementation + yes + Date + n/a + + n/a + no + + n/a + Stop date for the validity of this record. + + 6 + 494 + + 1.0.2 + + + 2061 + notes + Notes + implementation + yes + text + n/a + + n/a + no + + n/a + Notes about the observation as part of the dataset. + + 7 + 7 + 495 + + 1.0.2 + + + + userNotify + User Notify + User requests to be notified if certain criteria in VegBank change + not implemented + user + 1.0.2 + + 2064 + userNotify_ID + User Notify ID + implementation + no + serial + PK + + n/a + no + + n/a + Database generated unique key for each record in this table. + 1.0.2 + + + 2067 + usr_ID + User ID + implementation + no + Integer + FK + + usr.usr_ID + no + + n/a + Foreign key pointing to the user to whom this notification request pertains. + 1.0.2 + + + 2070 + notifyName + Notify Name + implementation + yes + varchar (100) + n/a + + n/a + no + + n/a + Name of notification, included in emails to user. + + 1 + 1 + 496 + + 1.0.2 + + + 2073 + notifyDescription + Notify Description + implementation + yes + text + n/a + + n/a + no + + n/a + Description of notification, which will be included in emails to user. + + 2 + 2 + 497 + + 1.0.2 + + + 2076 + notifyStart + Notify Start + implementation + yes + Date + now() + n/a + + n/a + no + + n/a + start of notifications. + + 3 + 3 + 498 + + 1.0.2 + + + 2079 + notifyStop + Notify Stop + implementation + yes + Date + n/a + + n/a + no + + n/a + stop date of notifications. + + 4 + 4 + 499 + + 1.0.2 + + + 2082 + lastCheckDate + Last Check Date + implementation + yes + Date + n/a + + n/a + no + + n/a + date of last check, assuming these requests will be processed through a cron-job. + + 5 + 5 + 500 + + 1.0.2 + + + 2085 + notifySQL + Notify SQL + implementation + yes + text + n/a + + n/a + no + + n/a + SQL that returns whatever information the user would like to know. Preferably, these grab accession codes which would be easy to build hyperlinks to the info requested. + + 6 + 6 + 501 + + 1.0.2 + + + + userPermission + User Permission + Permission for user to see embargoed plot. + not implemented + user + NEVER ADD + 1.0.2 + + 2088 + userPermission_ID + User Permission ID + implementation + no + serial + PK + + n/a + no + + n/a + Database generated unique key for each record in this table. + 1.0.2 + + + 2091 + embargo_ID + Embargo ID + implementation + no + Integer + FK + + embargo.embargo_ID + no + + n/a + Foreign key into the Embargo table that identifies which embargo this permission overrides. + 1.0.2 + + + 2094 + usr_ID + User ID + implementation + no + Integer + FK + + usr.usr_ID + no + + n/a + Foreign key into the user table which identifies the user to whom this permission is granted. + + 1 + 1 + 502 + + 1.0.2 + + + 2097 + permissionStart + Permission Start + implementation + no + Date + now() + n/a + + n/a + no + + n/a + Start date of permission + + 2 + 2 + 503 + + 1.0.2 + + + 2100 + permissionStop + Permission Stop + implementation + yes + Date + n/a + + n/a + no + + n/a + Stop date of permission + + 3 + 3 + 504 + + 1.0.2 + + + 2103 + permissionStatus + Permission Status + implementation + no + Integer + n/a + + n/a + closed + + + 0 + Public + 1 + + + 1 + 1 km radius + 2 + + + 2 + 10 km radius + 3 + + + 3 + 100 km radius + 4 + + + 4 + Location embargo + 5 + + + 5 + Public embargo on data + 6 + + + 6 + Full embargo on data + 7 + + + 0-6, according to confidStatus values + Status granted to the user for viewing. + + 4 + 4 + 505 + + 1.0.2 + + + 2106 + permissionNotes + Permission Notes + implementation + yes + text + n/a + + n/a + no + + n/a + Notes that the embargo owner may include with the permission. + + 5 + 5 + 506 + + 1.0.2 + + + + userQuery + User Query + User stored queries. + not implemented + user + 1.0.2 + + 2109 + userQuery_ID + User Query ID + implementation + no + serial + PK + + n/a + no + + n/a + Database generated unique key for each record in this table. + 1.0.2 + + + 2112 + usr_ID + User ID + implementation + no + Integer + FK + + usr.usr_ID + no + + n/a + Foreign key to the user who created and owns this query. + 1.0.2 + + + 2115 + queryStart + Query Start + implementation + yes + Date + now() + n/a + + n/a + no + + maybe we don't need + Start date for query. + + 1 + 1 + 507 + + 1.0.2 + + + 2118 + queryStop + Query Stop + implementation + yes + Date + n/a + + n/a + no + + maybe we don't need + Stop date for query. + + 2 + 2 + 508 + + 1.0.2 + + + 2121 + accessionCode + Accession Code + implementation + yes + varchar (255) + n/a + + n/a + no + + n/a + Accession Code used to see this query and its results. + + 3 + 509 + + 1.0.6 + + + 2124 + queryName + Query Name + implementation + yes + varchar (100) + n/a + + n/a + no + + n/a + Name of query, provided by user. + + 4 + 4 + 510 + + 1.0.2 + + + 2127 + queryDescription + Query Description + implementation + yes + text + n/a + + n/a + no + + n/a + Description of query, provided by user. + + 5 + 5 + 511 + + 1.0.2 + + + 2130 + querySQL + Query SQL + implementation + yes + text + n/a + + n/a + no + + n/a + SQL that identifies objects in question. + + 6 + 6 + 512 + + 1.0.2 + + + 2133 + queryType + Query Type + implementation + yes + varchar (50) + n/a + + n/a + no + + plot query, plant query, party query, etc. + Type of query that this is - user specified. + + 7 + 7 + 513 + + 1.0.2 + + + 2136 + querySharing + Query Sharing + implementation + yes + varchar (30) + n/a + + n/a + closed + + + public + anyone can view this query- it is listed among public queries + 1 + + + private + no one can view this query except the user who created it + 2 + + + password + no one may view this query except with a password, as specified in this table. + 3 + + + n/a + type of sharing, if any allowed. + + 8 + 8 + 514 + + 1.0.2 + + + 2139 + queryPassword + Query Password + implementation + yes + varchar (50) + n/a + + n/a + no + + n/a + Password to access query, if query is password-protected. + 1.0.2 + + + + userPreference + User Preference + Generic table to store user Preferences. + not implemented + user + 1.0.2 + + 2142 + userPreference_ID + User Preference ID + implementation + no + serial + PK + + n/a + no + + n/a + Database generated unique key for each record in this table. + 1.0.2 + + + 2145 + usr_ID + User ID + implementation + no + Integer + FK + + usr.usr_ID + no + + n/a + Foreign key pointing to the user whose preference this is. + + 1 + 1 + 515 + + 1.0.2 + + + 2148 + preferenceName + Preference Name + implementation + yes + varchar (100) + n/a + + n/a + no + + n/a + Name of preference. + + 2 + 2 + 516 + + 1.0.2 + + + 2151 + preferenceValue + Preference Value + implementation + yes + text + n/a + + n/a + no + + n/a + Value of the preference. + + 3 + 3 + 517 + + 1.0.2 + + + 2154 + preferencePriority + Preference Priority + implementation + yes + Float + n/a + + n/a + no + + n/a + The priority rank of this preference if there are more than one preference with the same value. Useful if options are not always available. For example, the first rank priority could instruct VegBank to show plantConcept with common Name system. A second preference could specify that if the first pref is unavailable, use Scientitic Name. + + 4 + 4 + 518 + + 1.0.2 + + + 2157 + preferenceStart + Preference Start + implementation + yes + Date + now() + n/a + + n/a + no + + n/a + start of notifications. + + 5 + 5 + 519 + + 1.0.2 + + + 2160 + preferenceStop + Preference Stop + implementation + yes + Date + n/a + + n/a + no + + n/a + stop date of notifications. + + 6 + 6 + 520 + + 1.0.2 + + + + userRecordOwner + User Record Owner + Information about what user owns what table records in vegbank + not implemented, userDataset used instead. + user + 1.0.2 + + 2163 + userRecordOwner_ID + implementation + no + serial + PK + + n/a + no + + n/a + Database generated number to uniquely identify this row in this table. + 1.0.2 + + + 2166 + usr_ID + User ID + implementation + no + Integer + FK + + usr.usr_ID + no + + n/a + Foreign key pointing to the user about which this ownership applies. + 1.0.2 + + + 2169 + tableName + Table Name + implementation + no + varchar (50) + n/a + + n/a + no + + n/a + Name of the table that the ownsership is associated with. + + 618 + 619 + 620 + 521 + + 1.0.2 + + + 2172 + tableRecord + Table Record + implementation + no + Integer + n/a + + n/a + no + + n/a + The record number (row) containing the value with which the ownership is associated (which translates to the primary key value for the table wherein the record is stored). + + 624 + 625 + 626 + 522 + + 1.0.2 + + + 2175 + recordCreationDate + Record Creation Date + implementation + no + Date + n/a + + n/a + no + + n/a + Date the record in question was created in VegBank. This could be different from OwnerStart if ownership was transferred to another user. + + 79 + 80 + 81 + 523 + + 1.0.2 + + + 2178 + ownerStart + Ownership Start Date + implementation + no + Date + now() + n/a + + n/a + no + + n/a + Start date of the ownership of the record specified. + + 79 + 80 + 81 + 524 + + 1.0.2 + + + 2181 + ownerStop + Ownership Stop Date + implementation + yes + Date + n/a + + n/a + no + + n/a + Stop date of the ownership of the record specified. + + 82 + 83 + 84 + 525 + + 1.0.2 + + + 2184 + ownerType + Owner Type + implementation + no + varchar (30) + n/a + + n/a + closed + + + full + full ownership of record + 1 + + + limited + incomplete ownership of record, privileges are limited + 2 + + + n/a + The degree of control the owner has over the record in question. + 1.0.2 + + + + keywords + Keywords + Keywords about different entities, so as to faciliate search for these items. + + extra + 1.0.3 + + 2187 + entity + implementation + no + text + n/a + + n/a + no + + n/a + Table Name for entity to which these keywords apply. + 1.0.3 + + + 2190 + keywords + implementation + yes + text + n/a + + n/a + no + + n/a + List of space delimited keywords which apply to the entity in question. + 1.0.3 + + + 2193 + table_id + implementation + no + Integer + n/a + + n/a + no + + n/a + PK of table to identify which entity in the table is mentioned here. + 1.0.3 + + + + keywords_extra + Keywords eXtra + A temp table to collect keywords to put back into keywords table, grouping by unique entities + + extra + 1.0.3 + + 2196 + entity + implementation + no + text + n/a + + n/a + no + + n/a + Table Name for entity to which these keywords apply. + 1.0.3 + + + 2199 + keywords + implementation + yes + text + n/a + + n/a + no + + n/a + List of space delimited keywords which apply to the entity in question. + 1.0.3 + + + 2202 + table_id + implementation + no + Integer + n/a + + n/a + no + + n/a + PK of table to identify which entity in the table is mentioned here. + 1.0.3 + + + + dba_confidentialitystatus + Confidentiality Status Text + A table that stores data on what confidentiality status values mean + + extra + 1.0.4 + true + + 2400 + confidentialitystatus + implementation + no + Integer + PK + + n/a + no + + n/a + refers to plot.confidentialitystatus value + 1.0.4 + create_andPopulate_configTables.sql + + + 2403 + confidentialityshorttext + implementation + yes + varchar (100) + n/a + + n/a + no + + n/a + short descipription of what this value means + 1.0.4 + create_andPopulate_configTables.sql + + + 2406 + confidentialitytext + implementation + yes + varchar (100) + n/a + + n/a + no + + n/a + Longer description of what this confidentiality status means. + 1.0.4 + create_andPopulate_configTables.sql + + + + dba_cookie + Cookies available to set + + + extra + 1.0.4 + true + + 2409 + cookie_id + implementation + no + serial + PK + + n/a + no + + n/a + unique ID + 1.0.4 + create_andPopulate_configTables.sql + + + 2412 + cookiename + implementation + no + varchar (75) + n/a + + n/a + no + + pseudo FK + name of the cookie + 1.0.4 + create_andPopulate_configTables.sql + + + 2415 + defaultvalue + implementation + no + varchar (75) + n/a + + n/a + no + + n/a + default value that should be set for the cookie + 1.0.4 + create_andPopulate_configTables.sql + + + 2418 + viewname + implementation + no + varchar (25) + n/a + + n/a + no + + n/a + name of view this cookie applies to + 1.0.4 + create_andPopulate_configTables.sql + + + 2421 + description + implementation + yes + text + n/a + + n/a + no + + n/a + description of what this cookie does + 1.0.4 + create_andPopulate_configTables.sql + + + 2424 + examplepk + implementation + no + Integer + n/a + + n/a + no + + n/a + used to link to example data (I think) + 1.0.4 + create_andPopulate_configTables.sql + + + 2427 + sortorder + implementation + yes + Integer + n/a + + n/a + no + + n/a + order in which these cookies should be displayed as user configures the view + 1.0.4 + create_andPopulate_configTables.sql + + + 2430 + startgroup + implementation + yes + Boolean + n/a + + n/a + no + + n/a + this cookie is the beginning of a new group + 1.0.4 + create_andPopulate_configTables.sql + + + 2433 + prefixhtml + implementation + yes + text + n/a + + n/a + no + + n/a + what html should come before the cookie in config? + 1.0.4 + create_andPopulate_configTables.sql + + + 2436 + suffixhtml + implementation + yes + text + n/a + + n/a + no + + n/a + what html should come after the cookie in config? + 1.0.4 + create_andPopulate_configTables.sql + + + + dba_cookielabels + Cookie Labels + Labels for the cookies that the user sees + + extra + 1.0.4 + true + + 2439 + cookielabel_id + implementation + no + serial + PK + + n/a + no + + n/a + unique ID + 1.0.4 + create_andPopulate_configTables.sql + + + 2442 + vieworcookie + implementation + no + varchar (50) + n/a + + n/a + no + + n/a + name of view or cookie about which the label (description) applies + 1.0.4 + create_andPopulate_configTables.sql + + + 2445 + description + implementation + yes + text + n/a + + n/a + no + + n/a + a description of a cookie or view name that would make sense to the user + 1.0.4 + create_andPopulate_configTables.sql + + + + dba_dbstatstime + DB Stats + Stats of how many records are in the database over time + + extra + 1.0.4 + + 2448 + stat_id + implementation + no + serial + PK + + n/a + no + + n/a + unique ID + 1.0.4 + throwAways\createTable_dba_stats.sql + + + 2451 + statdate + implementation + yes + Date + n/a + + n/a + no + + n/a + date and time stat was recorded + 1.0.4 + throwAways\createTable_dba_stats.sql + + + 2454 + statpkg + implementation + yes + Integer + n/a + + n/a + no + + n/a + not implemented. Group of stats name. + 1.0.4 + throwAways\createTable_dba_stats.sql + + + 2457 + statname + implementation + yes + text + n/a + + n/a + no + + n/a + not implemented. Name of stat. + 1.0.4 + throwAways\createTable_dba_stats.sql + + + 2460 + stattable + implementation + yes + varchar (100) + n/a + + n/a + no + + n/a + Name of table that this stat applies to. + 1.0.4 + throwAways\createTable_dba_stats.sql + + + 2463 + minpk + implementation + yes + Integer + n/a + + n/a + no + + n/a + Minimum PK of the table + 1.0.4 + throwAways\createTable_dba_stats.sql + + + 2466 + maxpk + implementation + yes + Integer + n/a + + n/a + no + + n/a + Maximum PK of the table + 1.0.4 + throwAways\createTable_dba_stats.sql + + + 2469 + countrecs + implementation + yes + Integer + n/a + + n/a + no + + n/a + Count of records in the table + 1.0.4 + throwAways\createTable_dba_stats.sql + + + + dba_preassignacccode + Preassign Accession + Holds new accessionCodes that aren't in the database yet, but that users have requested for client databases. They are globally unique. The db prefix is different in this table. + + extra + 1.0.5 + + 2500 + dba_preassignacccode_id + implementation + no + serial + PK + + n/a + no + + n/a + Unique ID for table and also serves to ensure new Accession Codes uniqueness. + 1.0.5 + add_requestAccCodeTblFields.sql + + + 2503 + dba_requestnumber + implementation + no + Integer + n/a + + n/a + no + + n/a + a request number that is specified in sequence dba_preassignacccode_dba_requestnumber_seq. This is used to get a pile of accessionCodes to the same user. + 1.0.5 + add_requestAccCodeTblFields.sql + + + 2506 + databasekey + implementation + no + varchar (20) + n/a + + n/a + no + + n/a + the first part of the accession code. This is set in build.properties + 1.0.5 + add_requestAccCodeTblFields.sql + + + 2509 + tableabbrev + implementation + no + varchar (10) + n/a + + n/a + no + + n/a + second part of accession code. abbreviation for the table + 1.0.5 + add_requestAccCodeTblFields.sql + + + 2512 + confirmcode + implementation + no + varchar (70) + (replace(replace(replace(replace(now(),' ','T'),'-',''),':',''),'.','d') || 'R' || floor(random()*1000000)) + n/a + + n/a + no + + n/a + fourth part of accession code. Time in format YYYYMMDDTHHNNSSd#####00R(random) where ### is milliseconds and (random) is random number + 1.0.5 + add_requestAccCodeTblFields.sql + + + 2515 + accessioncode + implementation + yes + varchar (255) + n/a + + n/a + no + + n/a + the compiled accessioncode from the various pieces in the other fields. + 1.0.6 + add_requestAccCodeTblFields.sql + + + 2514 + codeIsUsed + implementation + yes + Boolean + n/a + + n/a + no + + n/a + This accessionCode is used and represented in the main database. + 1.0.5 + add_requestAccCodeTblFields.sql + + + + dba_onerow + One Empty Row + Holds one row that is used to get simple data with vegbank:get that doesn't come from a table, i.e. a sequence value. + + extra + 1.0.5 + true + + 2516 + dba_onerow_id + implementation + no + serial + PK + + n/a + no + + n/a + just a number + 1.0.5 + + + + dba_datamodelversion + Data Model Version + Stores which version the database is, and when each version was implemented. + + extra + 1.0.5 + true + + 2518 + dba_datamodelversion_ID + implementation + no + serial + PK + + n/a + no + + n/a + PK + 1.0.5 + add_versionTable.sql + + + 2521 + versionText + implementation + no + varchar (20) + n/a + + n/a + no + + n/a + The name of the version, i.e. 1.0.5 + 1.0.5 + add_versionTable.sql + + + 2524 + versionImplemented + implementation + yes + Date + now() + n/a + + n/a + no + + n/a + The date and time that the version was implemented in this database. + 1.0.5 + add_versionTable.sql + + + + dba_xmlCache + XML Cache + Stores XML representations of entities in the database. + + extra + 1.0.5 + + 2527 + accessioncode + denorm + yes + varchar (255) + n/a + + n/a + no + + n/a + accession code of the element whose XML is contained in this record. + 1.0.6 + + + 2530 + xml + denorm + yes + bytea + n/a + + n/a + no + + n/a + The XML node that represents the element. + 1.0.5 + + + + temptbl_std_commnames + Community Names (compiled) + Stores community names of different class systems. + + extra + 1.0.5 + + 2550 + commconcept_id + denorm + yes + serial + PK + + n/a + no + + referenced commConcept.commConcept_ID + unique ID for community + 1.0.5 + + + 2553 + sciname + denorm + yes + varchar (255) + n/a + + n/a + no + + n/a + scientific name of the community + 1.0.5 + + + 2556 + translated + denorm + yes + varchar (255) + n/a + + n/a + no + + n/a + translated name of the community + 1.0.5 + + + 2559 + code + denorm + yes + varchar (255) + n/a + + n/a + no + + n/a + community code + 1.0.5 + + + 2562 + common + denorm + yes + varchar (255) + n/a + + n/a + no + + n/a + community common name + 1.0.5 + + + + temptbl_std_plantnames + Plant Names (compiled) + Stores plant names of different class systems. + + extra + 1.0.5 + + 2650 + plantconcept_id + denorm + yes + serial + PK + + n/a + no + + referenced plantConcept.plantConcept_ID + unique ID for plant + 1.0.5 + + + 2652 + plantname + denorm + yes + varchar (255) + n/a + + n/a + no + + n/a + name the plant concept is based on + 1.0.5 + + + 2653 + sciname + denorm + yes + varchar (255) + n/a + + n/a + no + + n/a + scientific name of the plant + 1.0.5 + + + 2654 + scinamenoauth + denorm + yes + varchar (255) + n/a + + n/a + no + + n/a + scientific name of the plant, no authors + 1.0.5 + + + 2659 + code + denorm + yes + varchar (255) + n/a + + n/a + no + + n/a + plant code + 1.0.5 + + + 2662 + common + denorm + yes + varchar (255) + n/a + + n/a + no + + n/a + plant common name + 1.0.5 + + + + dba_tableDescription + Table Description + Stores information about each table for the data dictionary. + + extra + 1.0.5 + true + + 2700 + dba_tableDescription_ID + ID + implementation + yes + serial + PK + + n/a + no + + n/a + Primary key of this table + 1.0.5 + + + 2703 + tableName + DB Table Name + implementation + yes + varchar (75) + n/a + + n/a + no + + n/a + Database name of the table + + 399 + 399 + + 1.0.5 + + + 2706 + tableLabel + Table + implementation + yes + varchar (200) + n/a + + n/a + no + + n/a + Label of the table, that is a human readable name. + + 405 + 405 + + 1.0.5 + + + 2709 + tableNotes + Notes + implementation + yes + text + n/a + + n/a + no + + n/a + Notes about the table + + 415 + 415 + + 1.0.5 + + + 2712 + tableDescription + Description + implementation + yes + text + n/a + + n/a + no + + n/a + Description of the table + + 425 + 425 + + 1.0.5 + + + 2715 + tableKeywords + Keywords + implementation + yes + text + n/a + + n/a + no + + n/a + Keywords of the table, consisting of field names and table info. + 1.0.5 + + + + dba_fieldDescription + Field Description + Stores information about each field for the data dictionary. + + extra + 1.0.5 + true + + 2800 + dba_fieldDescription_ID + implementation + yes + serial + PK + + n/a + no + + n/a + Primary key of this table + 1.0.5 + + + 2802 + tableName + Table + implementation + yes + varchar (75) + n/a + + n/a + no + + n/a + Table that the field exists on. + 1.0.5 + + + 2803 + fieldName + DB Field Name + implementation + yes + varchar (75) + n/a + + n/a + no + + n/a + Database name of the field. + + 405 + 405 + 405 + + 1.0.5 + + + 2806 + fieldLabel + Field + implementation + yes + varchar (200) + n/a + + n/a + no + + n/a + Label (human-readable) of the field. + + 395 + 395 + 395 + + 1.0.5 + + + 2809 + fieldModel + Model + implementation + yes + varchar (50) + n/a + + n/a + no + + n/a + Model which the field belongs to, i.e. logical, denorm, implementation + 1.0.5 + + + 2812 + fieldNulls + Req'd? + implementation + yes + varchar (10) + n/a + + n/a + (SELECT CASE when fieldnulls='no' THEN 'required' ELSE 'not' END) + no + + n/a + whether the field can contain nulls + + 425 + 425 + 425 + + 1.0.5 + + + 2815 + fieldType + Data Type + implementation + yes + varchar (30) + n/a + + n/a + no + + n/a + Field's data type. + + 435 + 435 + 435 + + 1.0.5 + + + 2818 + fieldKey + Misc Flag + implementation + yes + varchar (10) + n/a + + n/a + (SELECT CASE when fieldkey='PK' or fieldkey='FK' THEN fieldkey WHEN fieldmodel='denorm' or fieldmodel='implementation' THEN fieldmodel ELSE null END) + no + + n/a + If the field is a PK or FK. Forms may contain other useful information. + + 445 + 445 + 445 + + 1.0.5 + + + 2821 + fieldReferences + References + implementation + yes + varchar (200) + n/a + + n/a + no + + n/a + If the field is a FK, what field it references + + 455 + + 1.0.5 + + + 2824 + fieldList + List? + implementation + yes + varchar (50) + n/a + + n/a + no + + n/a + If the field has a constrained vocabulary, whether it is open or closed. + + 465 + 465 + 465 + + 1.0.5 + + + 2827 + fieldNotes + Notes + implementation + yes + text + n/a + + n/a + no + + n/a + Field Notes. + + 475 + + 1.0.5 + + + 2830 + fieldDefinition + Definition + implementation + yes + text + n/a + + n/a + no + + n/a + Field Definition. + + 485 + 485 + 485 + + 1.0.5 + + + 2835 + fieldKeywords + Keywords + implementation + yes + text + n/a + + n/a + no + + n/a + The keywords for this field, derived from most fields here and table name. + 1.0.5 + + + + dba_fieldList + Field Lists + Stores information about lists attached to fields. + + extra + 1.0.5 + + 2900 + dba_fieldList_ID + implementation + yes + serial + PK + + n/a + no + + n/a + Primary key of this table + 1.0.5 + + + 2903 + tableName + Table + implementation + yes + varchar (75) + n/a + + n/a + no + + n/a + Table that the list belongs to. + 1.0.5 + + + 2906 + fieldName + Field + implementation + yes + varchar (75) + n/a + + n/a + no + + n/a + Field that the list belongs to. + 1.0.5 + + + 2909 + listValue + Value + implementation + yes + varchar (255) + n/a + + n/a + no + + n/a + the list value. + + 1 + + 1.0.5 + + + 2912 + listValueDescription + Description + implementation + yes + text + n/a + + n/a + no + + n/a + the list value's description. + + 10 + + 1.0.5 + + + 2915 + listValueSortOrder + Sorting + implementation + yes + Float + n/a + + n/a + no + + n/a + the list value's sort order. + + 20 + + 1.0.5 + + + + dba_dataCache + Data cache + A table that stores data for quick display, using a unique key + + extra + 1.0.6 + + 3019 + DBA_DATACACHE_ID + implementation + no + serial + PK + + n/a + no + + n/a + primary key + 1.0.6 + + + 3020 + cache_key + implementation + no + varchar (200) + n/a + + n/a + no + + n/a + key to find stored data + 1.0.6 + + + 3030 + cache_label + implementation + yes + varchar (200) + n/a + + n/a + no + + n/a + label for data row + 1.0.6 + + + 3031 + cache_order + implementation + yes + Float + n/a + + n/a + no + + n/a + order in which to list rows + 1.0.6 + + + 3021 + data1 + implementation + yes + varchar (255) + n/a + + n/a + no + + n/a + piece of data stored with cache key + 1.0.6 + + + 3022 + data2 + implementation + yes + varchar (255) + n/a + + n/a + no + + n/a + piece of data stored with cache key + 1.0.6 + + + 3023 + data3 + implementation + yes + varchar (255) + n/a + + n/a + no + + n/a + piece of data stored with cache key + 1.0.6 + + + 3024 + data4 + implementation + yes + varchar (255) + n/a + + n/a + no + + n/a + piece of data stored with cache key + 1.0.6 + + + 3025 + data5 + implementation + yes + varchar (255) + n/a + + n/a + no + + n/a + piece of data stored with cache key + 1.0.6 + + + 3026 + data6 + implementation + yes + varchar (255) + n/a + + n/a + no + + n/a + piece of data stored with cache key + 1.0.6 + + + 3027 + data7 + implementation + yes + varchar (255) + n/a + + n/a + no + + n/a + piece of data stored with cache key + 1.0.6 + + + 3028 + data8 + implementation + yes + varchar (255) + n/a + + n/a + no + + n/a + piece of data stored with cache key + 1.0.6 + + + 3029 + data9 + implementation + yes + varchar (255) + n/a + + n/a + no + + n/a + piece of data stored with cache key + 1.0.6 + + + 3040 + data10 + implementation + yes + varchar (255) + n/a + + n/a + no + + n/a + piece of data stored with cache key + 1.0.6 + + + + view_all_commnames_code + + + view_all_commnames_common + + + view_all_commnames_sciname + + + view_all_commnames_translated + + + view_all_plantnames_code + + + view_all_plantnames_common + + + view_all_plantnames_sciname + + + view_all_plantnames_scinamenoauth + + + view_browseparty_all + + + view_browseparty_all_count + + + view_browseparty_all_count_combined + + + view_browseparty_classcontrib + + + view_browseparty_classcontrib_count + + + view_browseparty_obscontrib + + + view_browseparty_obscontrib_count + + + view_browseparty_projectcontrib + + + view_browseparty_projectcontrib_count + + + view_busrule_duplcovercode + + + view_busrule_duplstratumtype + + + view_busrule_plotsizeshape + + + view_commconcept_transl + + + view_comminterp_more + + + view_csv_taxonimportance + + + view_csv_taxonimportance_pre + + + view_emb_embargo_complete + + + view_emb_embargo_currentfullonly + + + view_keywprojplaces + + + view_kwhelper_projcontrib + + + view_kwhelper_refjournal + + + view_kwhelper_refparty + + + view_notemb_classcontributor + + + view_notemb_commclass + + + view_notemb_comminterpretation + + + view_notemb_disturbanceobs + + + view_notemb_observation + + + view_notemb_plot + + + view_notemb_soilobs + + + view_notemb_stemcount + + + view_notemb_stemlocation + + + view_notemb_taxonalt + + + view_notemb_taxonimportance + + + view_notemb_taxoninterpretation + + + view_notemb_taxonobservation + + + view_observation_transl + + + view_party_public + + + view_party_transl + + + view_plantconcept_transl + + + view_plotall_withembargo + + + view_reference_transl + + + view_std_commnames_code + + + view_std_commnames_common + + + view_std_commnames_sciname + + + view_std_commnames_translated + + + view_std_plantnames_code + + + view_std_plantnames_common + + + view_std_plantnames_sciname + + + view_std_plantnames_scinamenoauth + + + view_taxoninterp_more + + + view_taxonobs_distinctid_curr + + + view_taxonobs_distinctid_curr_counts + + + view_taxonobs_distinctid_curr_counts_plants + + + view_taxonobs_withmaxcover + + + view_dbafielddesc_notimpl + + + dba_preassignacccode_dba_requestnumber_seq + + diff --git a/sql-transformations/getvegbanksql.sh b/sql-transformations/getvegbanksql.sh new file mode 100755 index 0000000..9cfc66a --- /dev/null +++ b/sql-transformations/getvegbanksql.sh @@ -0,0 +1,29 @@ +#/bin/bash + +# Define the input and output file names +INPUT_XML="db_model_vegbank.xml" +STYLESHEET_XSL="VegBankModel2SQL.xsl" +OUTPUT_SQL="vegbank.sql" + +# Confirm input XML file exists +if [ ! -f "$INPUT_XML" ]; then + echo "Input XML file '$INPUT_XML' not found!" + exit 1 +fi + +# Confirm XSL stylesheet file exists +if [ ! -f "$STYLESHEET_XSL" ]; then + echo "XSL stylesheet file '$STYLESHEET_XSL' not found!" + exit 1 +fi + +# Run the XSLT transformation to get 'vegbank.sql' +xsltproc -o "$OUTPUT_SQL" "$STYLESHEET_XSL" "$INPUT_XML" + +# Check if the process was successful +if [ $? -eq 0 ]; then + echo "Transformation successful. Output saved to '$OUTPUT_SQL'." +else + echo "Transformation failed." + exit 1 +fi \ No newline at end of file From 4b2da2dd6729d3422c48479ceca48bcfa4d12987 Mon Sep 17 00:00:00 2001 From: Dou Mok Date: Wed, 24 Jul 2024 13:58:19 -0700 Subject: [PATCH 02/49] Add required .sql files defined in 'updateSQLFile' parameter in 'db_model_vegbank.xml' --- sql-transformations/INSTALL.md | 27 +++++++ .../addCoverCodeToTaxImportance.sql | 3 + sql-transformations/addInterpFldsToObs.sql | 36 +++++++++ sql-transformations/addObsSynDenorm.sql | 1 + .../addTaxonObsDenormPlantNames.sql | 20 +++++ .../addTop5SppToObs_denormFlds.sql | 19 +++++ .../add_currentaccepted_toconcept.sql | 3 + .../add_requestAccCodeTblFields.sql | 28 +++++++ .../db_model_vegbank_updateSQLFileList.txt | 74 +++++++++++++++++++ .../throwAways/add_datasetItem_denorms.sql | 17 +++++ .../alterTaxObsDenormRenameSciNameToFull.sql | 4 + .../throwAways/createTable_dba_stats.sql | 1 + 12 files changed, 233 insertions(+) create mode 100644 sql-transformations/INSTALL.md create mode 100644 sql-transformations/addCoverCodeToTaxImportance.sql create mode 100644 sql-transformations/addInterpFldsToObs.sql create mode 100644 sql-transformations/addObsSynDenorm.sql create mode 100644 sql-transformations/addTaxonObsDenormPlantNames.sql create mode 100644 sql-transformations/addTop5SppToObs_denormFlds.sql create mode 100644 sql-transformations/add_currentaccepted_toconcept.sql create mode 100644 sql-transformations/add_requestAccCodeTblFields.sql create mode 100644 sql-transformations/db_model_vegbank_updateSQLFileList.txt create mode 100644 sql-transformations/throwAways/add_datasetItem_denorms.sql create mode 100644 sql-transformations/throwAways/alterTaxObsDenormRenameSciNameToFull.sql create mode 100644 sql-transformations/throwAways/createTable_dba_stats.sql diff --git a/sql-transformations/INSTALL.md b/sql-transformations/INSTALL.md new file mode 100644 index 0000000..e796745 --- /dev/null +++ b/sql-transformations/INSTALL.md @@ -0,0 +1,27 @@ +VegBank PostGres Migration Notes + +## Begin with getting the very first `vegbank.sql` file + +./getvegbanksql.sh + +Missing SQL Files that were declared in 'db_model_vegbank': +- add_versionTable.sql +- create_andPopulate_configTables.sql + +```sh +% grep "" db_model_vegbank.xml > updateSQLFileList.txt +% sort db_model_vegbank_updateSQLFileList.txt| uniq > unique_rows.txt + +addCoverCodeToTaxImportance.sql +addInterpFldsToObs.sql +addObsSynDenorm.sql +addTaxonObsDenormPlantNames.sql +addTop5SppToObs_denormFlds.sql +add_currentaccepted_toconcept.sql +add_requestAccCodeTblFields.sql +add_versionTable.sql +create_andPopulate_configTables.sql +throwAways/add_datasetItem_denorms.sql +throwAways\alterTaxObsDenormRenameSciNameToFull.sql +throwAways\createTable_dba_stats.sql +``` \ No newline at end of file diff --git a/sql-transformations/addCoverCodeToTaxImportance.sql b/sql-transformations/addCoverCodeToTaxImportance.sql new file mode 100644 index 0000000..cea9a6d --- /dev/null +++ b/sql-transformations/addCoverCodeToTaxImportance.sql @@ -0,0 +1,3 @@ +ALTER TABLE taxonImportance ADD COLUMN coverCode varchar (10) ; + + diff --git a/sql-transformations/addInterpFldsToObs.sql b/sql-transformations/addInterpFldsToObs.sql new file mode 100644 index 0000000..91f488c --- /dev/null +++ b/sql-transformations/addInterpFldsToObs.sql @@ -0,0 +1,36 @@ + +ALTER TABLE observation ADD COLUMN interp_orig_ci_ID Integer ; + +ALTER TABLE observation ADD COLUMN interp_orig_cc_ID Integer ; + +ALTER TABLE observation ADD COLUMN interp_orig_sciname text ; + +ALTER TABLE observation ADD COLUMN interp_orig_code text ; + +ALTER TABLE observation ADD COLUMN interp_orig_party_id Integer ; + +ALTER TABLE observation ADD COLUMN interp_orig_partyname text ; + +ALTER TABLE observation ADD COLUMN interp_current_ci_ID Integer ; + +ALTER TABLE observation ADD COLUMN interp_current_cc_ID Integer ; + +ALTER TABLE observation ADD COLUMN interp_current_sciname text ; + +ALTER TABLE observation ADD COLUMN interp_current_code text ; + +ALTER TABLE observation ADD COLUMN interp_current_party_id Integer ; + +ALTER TABLE observation ADD COLUMN interp_current_partyname text ; + +ALTER TABLE observation ADD COLUMN interp_bestfit_ci_ID Integer ; + +ALTER TABLE observation ADD COLUMN interp_bestfit_cc_ID Integer ; + +ALTER TABLE observation ADD COLUMN interp_bestfit_sciname text ; + +ALTER TABLE observation ADD COLUMN interp_bestfit_code text ; + +ALTER TABLE observation ADD COLUMN interp_bestfit_party_id Integer ; + +ALTER TABLE observation ADD COLUMN interp_bestfit_partyname text ; \ No newline at end of file diff --git a/sql-transformations/addObsSynDenorm.sql b/sql-transformations/addObsSynDenorm.sql new file mode 100644 index 0000000..fba6513 --- /dev/null +++ b/sql-transformations/addObsSynDenorm.sql @@ -0,0 +1 @@ +alter table observation add column hasObservationSynonym boolean; \ No newline at end of file diff --git a/sql-transformations/addTaxonObsDenormPlantNames.sql b/sql-transformations/addTaxonObsDenormPlantNames.sql new file mode 100644 index 0000000..675cc91 --- /dev/null +++ b/sql-transformations/addTaxonObsDenormPlantNames.sql @@ -0,0 +1,20 @@ + +ALTER TABLE taxonObservation ADD COLUMN int_origPlantConcept_ID Integer ; + +ALTER TABLE taxonObservation ADD COLUMN int_origPlantSciName varchar (255) ; + +ALTER TABLE taxonObservation ADD COLUMN int_origPlantSciNameNoAuth varchar (255) ; + +ALTER TABLE taxonObservation ADD COLUMN int_origPlantCommon varchar (255) ; + +ALTER TABLE taxonObservation ADD COLUMN int_origPlantCode varchar (255) ; + +ALTER TABLE taxonObservation ADD COLUMN int_currPlantConcept_ID Integer ; + +ALTER TABLE taxonObservation ADD COLUMN int_currPlantSciName varchar (255) ; + +ALTER TABLE taxonObservation ADD COLUMN int_currPlantSciNameNoAuth varchar (255) ; + +ALTER TABLE taxonObservation ADD COLUMN int_currPlantCommon varchar (255) ; + +ALTER TABLE taxonObservation ADD COLUMN int_currPlantCode varchar (255) ; \ No newline at end of file diff --git a/sql-transformations/addTop5SppToObs_denormFlds.sql b/sql-transformations/addTop5SppToObs_denormFlds.sql new file mode 100644 index 0000000..05f50b2 --- /dev/null +++ b/sql-transformations/addTop5SppToObs_denormFlds.sql @@ -0,0 +1,19 @@ + +ALTER TABLE observation ADD COLUMN topTaxon1Name varchar (255) ; + + + +ALTER TABLE observation ADD COLUMN topTaxon2Name varchar (255) ; + + + +ALTER TABLE observation ADD COLUMN topTaxon3Name varchar (255) ; + + + +ALTER TABLE observation ADD COLUMN topTaxon4Name varchar (255) ; + + + +ALTER TABLE observation ADD COLUMN topTaxon5Name varchar (255) ; + diff --git a/sql-transformations/add_currentaccepted_toconcept.sql b/sql-transformations/add_currentaccepted_toconcept.sql new file mode 100644 index 0000000..dfa67c3 --- /dev/null +++ b/sql-transformations/add_currentaccepted_toconcept.sql @@ -0,0 +1,3 @@ +ALTER TABLE commConcept ADD COLUMN d_currentaccepted Boolean ; + +ALTER TABLE plantConcept ADD COLUMN d_currentaccepted Boolean ; \ No newline at end of file diff --git a/sql-transformations/add_requestAccCodeTblFields.sql b/sql-transformations/add_requestAccCodeTblFields.sql new file mode 100644 index 0000000..b868e00 --- /dev/null +++ b/sql-transformations/add_requestAccCodeTblFields.sql @@ -0,0 +1,28 @@ +--create table that stores a list of newly requested accession codes, but these elements aren't in the db yet: +drop table dba_preassignacccode; +create table dba_preassignacccode ( + dba_preassignacccode_id serial, + dba_requestnumber int not null, + databasekey varchar(20) not null, + tableabbrev varchar(10) not null, + confirmcode varchar(70) not null, + accessioncode varchar(100), + primary key (dba_preassignacccode_id) + ); + +-- create a unique sequence that feeds the dba_requestnumber field: +drop sequence dba_preassignacccode_dba_requestnumber_seq; +create sequence dba_preassignacccode_dba_requestnumber_seq; + + -- set the default value for confirm code + alter table dba_preassignacccode alter column confirmcode set default (replace(replace(replace(replace(now(),' ','T'),'-',''),':',''),'.','d') || 'R' || floor(random()*1000000)); + + --we need a one row table for getting the sequence value: + drop table dba_onerow; + create table dba_onerow ( + dba_onerow_id int, + primary key (dba_onerow_id) + ); + + --populate dba_onerow (just one empty row of data): + insert into dba_onerow (dba_onerow_id) values (1); diff --git a/sql-transformations/db_model_vegbank_updateSQLFileList.txt b/sql-transformations/db_model_vegbank_updateSQLFileList.txt new file mode 100644 index 0000000..ba1b650 --- /dev/null +++ b/sql-transformations/db_model_vegbank_updateSQLFileList.txt @@ -0,0 +1,74 @@ + add_currentaccepted_toconcept.sql + add_currentaccepted_toconcept.sql + addInterpFldsToObs.sql + addInterpFldsToObs.sql + addInterpFldsToObs.sql + addInterpFldsToObs.sql + addInterpFldsToObs.sql + addInterpFldsToObs.sql + addInterpFldsToObs.sql + addInterpFldsToObs.sql + addInterpFldsToObs.sql + addInterpFldsToObs.sql + addInterpFldsToObs.sql + addInterpFldsToObs.sql + addInterpFldsToObs.sql + addInterpFldsToObs.sql + addInterpFldsToObs.sql + addInterpFldsToObs.sql + addInterpFldsToObs.sql + addInterpFldsToObs.sql + addTop5SppToObs_denormFlds.sql + addTop5SppToObs_denormFlds.sql + addTop5SppToObs_denormFlds.sql + addTop5SppToObs_denormFlds.sql + addTop5SppToObs_denormFlds.sql + addObsSynDenorm.sql + addCoverCodeToTaxImportance.sql + addTaxonObsDenormPlantNames.sql + throwAways\alterTaxObsDenormRenameSciNameToFull.sql + addTaxonObsDenormPlantNames.sql + addTaxonObsDenormPlantNames.sql + addTaxonObsDenormPlantNames.sql + addTaxonObsDenormPlantNames.sql + throwAways\alterTaxObsDenormRenameSciNameToFull.sql + addTaxonObsDenormPlantNames.sql + addTaxonObsDenormPlantNames.sql + addTaxonObsDenormPlantNames.sql + throwAways/add_datasetItem_denorms.sql + throwAways/add_datasetItem_denorms.sql + throwAways/add_datasetItem_denorms.sql + create_andPopulate_configTables.sql + create_andPopulate_configTables.sql + create_andPopulate_configTables.sql + create_andPopulate_configTables.sql + create_andPopulate_configTables.sql + create_andPopulate_configTables.sql + create_andPopulate_configTables.sql + create_andPopulate_configTables.sql + create_andPopulate_configTables.sql + create_andPopulate_configTables.sql + create_andPopulate_configTables.sql + create_andPopulate_configTables.sql + create_andPopulate_configTables.sql + create_andPopulate_configTables.sql + create_andPopulate_configTables.sql + create_andPopulate_configTables.sql + throwAways\createTable_dba_stats.sql + throwAways\createTable_dba_stats.sql + throwAways\createTable_dba_stats.sql + throwAways\createTable_dba_stats.sql + throwAways\createTable_dba_stats.sql + throwAways\createTable_dba_stats.sql + throwAways\createTable_dba_stats.sql + throwAways\createTable_dba_stats.sql + add_requestAccCodeTblFields.sql + add_requestAccCodeTblFields.sql + add_requestAccCodeTblFields.sql + add_requestAccCodeTblFields.sql + add_requestAccCodeTblFields.sql + add_requestAccCodeTblFields.sql + add_requestAccCodeTblFields.sql + add_versionTable.sql + add_versionTable.sql + add_versionTable.sql diff --git a/sql-transformations/throwAways/add_datasetItem_denorms.sql b/sql-transformations/throwAways/add_datasetItem_denorms.sql new file mode 100644 index 0000000..5a0177b --- /dev/null +++ b/sql-transformations/throwAways/add_datasetItem_denorms.sql @@ -0,0 +1,17 @@ +ALTER TABLE userDatasetItem ADD COLUMN itemDatabase varchar (50) ; + +ALTER TABLE userDatasetItem ADD COLUMN itemTable varchar (50) ; + +ALTER TABLE userDatasetItem ADD COLUMN itemRecord Integer ; + +UPDATE userDatasetItem set itemDatabase='vegbank' where itemDatabase is null; + +update userDatasetItem set itemTable = itemType where itemtable is null; + +UPDATE userDatasetitem set itemRecord=substr(itemACcessionCode,7,-1+position('.' in substr(itemACcessionCode,7,(char_length(itemACcessionCode)-7))))::integer where itemrecord is null; + +ALTER TABLE userDatasetItem ALTER COLUMN itemDatabase SET NOT NULL; + +ALTER TABLE userDatasetItem ALTER COLUMN itemTable SET NOT NULL; + +ALTER TABLE userDatasetItem ALTER COLUMN itemRecord SET NOT NULL; \ No newline at end of file diff --git a/sql-transformations/throwAways/alterTaxObsDenormRenameSciNameToFull.sql b/sql-transformations/throwAways/alterTaxObsDenormRenameSciNameToFull.sql new file mode 100644 index 0000000..c773c07 --- /dev/null +++ b/sql-transformations/throwAways/alterTaxObsDenormRenameSciNameToFull.sql @@ -0,0 +1,4 @@ +alter table taxonobservation rename column int_currplantsciname TO int_currplantscifull; + +alter table taxonobservation rename column int_origplantsciname TO int_origplantscifull; + diff --git a/sql-transformations/throwAways/createTable_dba_stats.sql b/sql-transformations/throwAways/createTable_dba_stats.sql new file mode 100644 index 0000000..e6f7fb8 --- /dev/null +++ b/sql-transformations/throwAways/createTable_dba_stats.sql @@ -0,0 +1 @@ +create table dba_dbstatstime (stat_ID serial, statDate timestamp with time zone, statPkg integer, statName text, statTable varchar (100), minPK integer, maxPK integer, countRecs integer, primary key (stat_ID)); From bff0705c85579f1b0617112396ccb73e1f8a8264 Mon Sep 17 00:00:00 2001 From: Dou Mok Date: Wed, 24 Jul 2024 14:20:41 -0700 Subject: [PATCH 03/49] Add 'INSTALL.md' to provide WIP context, and modify 'db_model_vegbank.xml' back slash typo to reference sql file in 'throwAways' folder --- sql-transformations/INSTALL.md | 20 ++++++++++++++++---- sql-transformations/db_model_vegbank.xml | 20 ++++++++++---------- 2 files changed, 26 insertions(+), 14 deletions(-) diff --git a/sql-transformations/INSTALL.md b/sql-transformations/INSTALL.md index e796745..cae5457 100644 --- a/sql-transformations/INSTALL.md +++ b/sql-transformations/INSTALL.md @@ -1,10 +1,17 @@ -VegBank PostGres Migration Notes +# VegBank PostGres Migration Notes -## Begin with getting the very first `vegbank.sql` file +## 0_vegbank.sql +This is the first migration sql file to create the database tables + +Run the following bash script in 'sql-transformations': +```sh ./getvegbanksql.sh +``` + +Note: there is an issue with the syntax relating to the `dba_preassignacccode` table, so the equivalent 'migrations' file has been modified. -Missing SQL Files that were declared in 'db_model_vegbank': +Missing SQL Files that were declared in 'db_model_vegbank' and cannot be found: - add_versionTable.sql - create_andPopulate_configTables.sql @@ -22,6 +29,11 @@ Missing SQL Files that were declared in 'db_model_vegbank': add_versionTable.sql create_andPopulate_configTables.sql throwAways/add_datasetItem_denorms.sql +// The backward slashes have been amended in 'db_model_vegbank.xml' to be forward slashes throwAways\alterTaxObsDenormRenameSciNameToFull.sql throwAways\createTable_dba_stats.sql -``` \ No newline at end of file +``` + +## The remaining migrations + +The other migration sqls were obtained by following the 'build.xml' structure. \ No newline at end of file diff --git a/sql-transformations/db_model_vegbank.xml b/sql-transformations/db_model_vegbank.xml index 2a7d50f..347cf01 100644 --- a/sql-transformations/db_model_vegbank.xml +++ b/sql-transformations/db_model_vegbank.xml @@ -16246,7 +16246,7 @@ conditions may change between resampling events. 1292 1.0.3 - throwAways\alterTaxObsDenormRenameSciNameToFull.sql + throwAways/alterTaxObsDenormRenameSciNameToFull.sql 1743 @@ -16347,7 +16347,7 @@ conditions may change between resampling events. 1297 1.0.3 - throwAways\alterTaxObsDenormRenameSciNameToFull.sql + throwAways/alterTaxObsDenormRenameSciNameToFull.sql 1758 @@ -20095,7 +20095,7 @@ conditions may change between resampling events. n/a unique ID 1.0.4 - throwAways\createTable_dba_stats.sql + throwAways/createTable_dba_stats.sql 2451 @@ -20111,7 +20111,7 @@ conditions may change between resampling events. n/a date and time stat was recorded 1.0.4 - throwAways\createTable_dba_stats.sql + throwAways/createTable_dba_stats.sql 2454 @@ -20127,7 +20127,7 @@ conditions may change between resampling events. n/a not implemented. Group of stats name. 1.0.4 - throwAways\createTable_dba_stats.sql + throwAways/createTable_dba_stats.sql 2457 @@ -20143,7 +20143,7 @@ conditions may change between resampling events. n/a not implemented. Name of stat. 1.0.4 - throwAways\createTable_dba_stats.sql + throwAways/createTable_dba_stats.sql 2460 @@ -20159,7 +20159,7 @@ conditions may change between resampling events. n/a Name of table that this stat applies to. 1.0.4 - throwAways\createTable_dba_stats.sql + throwAways/createTable_dba_stats.sql 2463 @@ -20175,7 +20175,7 @@ conditions may change between resampling events. n/a Minimum PK of the table 1.0.4 - throwAways\createTable_dba_stats.sql + throwAways/createTable_dba_stats.sql 2466 @@ -20191,7 +20191,7 @@ conditions may change between resampling events. n/a Maximum PK of the table 1.0.4 - throwAways\createTable_dba_stats.sql + throwAways/createTable_dba_stats.sql 2469 @@ -20207,7 +20207,7 @@ conditions may change between resampling events. n/a Count of records in the table 1.0.4 - throwAways\createTable_dba_stats.sql + throwAways/createTable_dba_stats.sql From 5e611b6b14eec53554e91a7ceac90eeae865939c Mon Sep 17 00:00:00 2001 From: Dou Mok Date: Wed, 24 Jul 2024 14:21:39 -0700 Subject: [PATCH 04/49] Add initial migrations WIP flow, not yet tested with flyway, and TO-DO item for missing data dictionary sql --- migrations/0_vegbank.sql | 3488 +++++++++++++++++ migrations/1_create_aggregrates.sql | 6 + migrations/2_create_extras.sql | 8 + migrations/3_createIndices.sql | 518 +++ migrations/4_drop_vegbank_views.sql | 104 + migrations/5_create_vegbank_views.sql | 426 ++ .../6_vegbank_populate_configtables.sql | 110 + migrations/7_create_temp_tbls.sql | 110 + migrations/8_create_vegbank_views copy.sql | 426 ++ 9 files changed, 5196 insertions(+) create mode 100644 migrations/0_vegbank.sql create mode 100644 migrations/1_create_aggregrates.sql create mode 100644 migrations/2_create_extras.sql create mode 100644 migrations/3_createIndices.sql create mode 100644 migrations/4_drop_vegbank_views.sql create mode 100644 migrations/5_create_vegbank_views.sql create mode 100644 migrations/6_vegbank_populate_configtables.sql create mode 100644 migrations/7_create_temp_tbls.sql create mode 100644 migrations/8_create_vegbank_views copy.sql diff --git a/migrations/0_vegbank.sql b/migrations/0_vegbank.sql new file mode 100644 index 0000000..dd24cab --- /dev/null +++ b/migrations/0_vegbank.sql @@ -0,0 +1,3488 @@ + + -- This is a generated SQL script for postgresql + -- + + + +---------------------------------------------------------------------------- +-- CREATE commConcept +---------------------------------------------------------------------------- + + + CREATE SEQUENCE commConcept_COMMCONCEPT_ID_seq; + +CREATE TABLE commConcept +( + + + + + + + + COMMCONCEPT_ID integer + NOT NULL PRIMARY KEY default nextval('commConcept_COMMCONCEPT_ID_seq') + , + COMMNAME_ID Integer NOT NULL, + commName text, + reference_ID Integer, + commDescription text, + accessionCode varchar (255), + d_obscount Integer, + d_currentaccepted Boolean + +); + + +---------------------------------------------------------------------------- +-- CREATE commCorrelation +---------------------------------------------------------------------------- + + + CREATE SEQUENCE commCorrelation_COMMCORRELATION_ID_seq; + +CREATE TABLE commCorrelation +( + + + + + + + + COMMCORRELATION_ID integer + NOT NULL PRIMARY KEY default nextval('commCorrelation_COMMCORRELATION_ID_seq') + , + COMMSTATUS_ID Integer NOT NULL, + COMMCONCEPT_ID Integer NOT NULL, + commConvergence varchar (20) NOT NULL, + correlationStart timestamp with time zone NOT NULL, + correlationStop timestamp with time zone + +); + + +---------------------------------------------------------------------------- +-- CREATE commLineage +---------------------------------------------------------------------------- + + + CREATE SEQUENCE commLineage_COMMLINEAGE_ID_seq; + +CREATE TABLE commLineage +( + + + + + + + + COMMLINEAGE_ID integer + NOT NULL PRIMARY KEY default nextval('commLineage_COMMLINEAGE_ID_seq') + , + parentCommStatus_ID Integer NOT NULL, + childCommStatus_ID Integer NOT NULL + +); + + +---------------------------------------------------------------------------- +-- CREATE commName +---------------------------------------------------------------------------- + + + CREATE SEQUENCE commName_COMMNAME_ID_seq; + +CREATE TABLE commName +( + + + + + + + + COMMNAME_ID integer + NOT NULL PRIMARY KEY default nextval('commName_COMMNAME_ID_seq') + , + commName text NOT NULL, + reference_ID Integer, + dateEntered timestamp with time zone DEFAULT now() + +); + + +---------------------------------------------------------------------------- +-- CREATE commStatus +---------------------------------------------------------------------------- + + + CREATE SEQUENCE commStatus_COMMSTATUS_ID_seq; + +CREATE TABLE commStatus +( + + + + + + + + COMMSTATUS_ID integer + NOT NULL PRIMARY KEY default nextval('commStatus_COMMSTATUS_ID_seq') + , + COMMCONCEPT_ID Integer NOT NULL, + reference_ID Integer, + commConceptStatus varchar (20) NOT NULL, + commParent_ID Integer, + commLevel varchar (80), + startDate timestamp with time zone NOT NULL, + stopDate timestamp with time zone , + commPartyComments text, + PARTY_ID Integer NOT NULL, + accessionCode varchar (255) + +); + + +---------------------------------------------------------------------------- +-- CREATE commUsage +---------------------------------------------------------------------------- + + + CREATE SEQUENCE commUsage_COMMUSAGE_ID_seq; + +CREATE TABLE commUsage +( + + + + + + + + COMMUSAGE_ID integer + NOT NULL PRIMARY KEY default nextval('commUsage_COMMUSAGE_ID_seq') + , + COMMNAME_ID Integer NOT NULL, + commName text, + COMMCONCEPT_ID Integer, + usageStart timestamp with time zone , + usageStop timestamp with time zone , + commNameStatus varchar (20), + classSystem varchar (50), + PARTY_ID Integer, + COMMSTATUS_ID Integer + +); + + +---------------------------------------------------------------------------- +-- CREATE plantConcept +---------------------------------------------------------------------------- + + + CREATE SEQUENCE plantConcept_PLANTCONCEPT_ID_seq; + +CREATE TABLE plantConcept +( + + + + + + + + PLANTCONCEPT_ID integer + NOT NULL PRIMARY KEY default nextval('plantConcept_PLANTCONCEPT_ID_seq') + , + PLANTNAME_ID Integer NOT NULL, + reference_ID Integer NOT NULL, + plantname varchar (200), + plantCode varchar (23), + plantDescription text, + accessionCode varchar (255), + d_obscount Integer, + d_currentaccepted Boolean + +); + + +---------------------------------------------------------------------------- +-- CREATE plantCorrelation +---------------------------------------------------------------------------- + + + CREATE SEQUENCE plantCorrelation_PLANTCORRELATION_ID_seq; + +CREATE TABLE plantCorrelation +( + + + + + + + + PLANTCORRELATION_ID integer + NOT NULL PRIMARY KEY default nextval('plantCorrelation_PLANTCORRELATION_ID_seq') + , + PLANTSTATUS_ID Integer NOT NULL, + PLANTCONCEPT_ID Integer NOT NULL, + plantConvergence varchar (20) NOT NULL, + correlationStart timestamp with time zone NOT NULL, + correlationStop timestamp with time zone + +); + + +---------------------------------------------------------------------------- +-- CREATE plantLineage +---------------------------------------------------------------------------- + + + CREATE SEQUENCE plantLineage_PLANTLINEAGE_ID_seq; + +CREATE TABLE plantLineage +( + + + + + + + + PLANTLINEAGE_ID integer + NOT NULL PRIMARY KEY default nextval('plantLineage_PLANTLINEAGE_ID_seq') + , + childPlantStatus_ID Integer NOT NULL, + parentPlantStatus_ID Integer NOT NULL + +); + + +---------------------------------------------------------------------------- +-- CREATE plantName +---------------------------------------------------------------------------- + + + CREATE SEQUENCE plantName_PLANTNAME_ID_seq; + +CREATE TABLE plantName +( + + + + + + + + PLANTNAME_ID integer + NOT NULL PRIMARY KEY default nextval('plantName_PLANTNAME_ID_seq') + , + plantName varchar (255) NOT NULL, + reference_ID Integer, + dateEntered timestamp with time zone DEFAULT now() + +); + + +---------------------------------------------------------------------------- +-- CREATE plantStatus +---------------------------------------------------------------------------- + + + CREATE SEQUENCE plantStatus_PLANTSTATUS_ID_seq; + +CREATE TABLE plantStatus +( + + + + + + + + PLANTSTATUS_ID integer + NOT NULL PRIMARY KEY default nextval('plantStatus_PLANTSTATUS_ID_seq') + , + PLANTCONCEPT_ID Integer NOT NULL, + reference_ID Integer, + plantConceptStatus varchar (20) NOT NULL, + startDate timestamp with time zone NOT NULL, + stopDate timestamp with time zone , + plantPartyComments text, + plantParentName varchar (200), + plantParentConcept_id Integer, + plantParent_ID Integer, + plantLevel varchar (80), + PARTY_ID Integer NOT NULL, + accessionCode varchar (255) + +); + + +---------------------------------------------------------------------------- +-- CREATE plantUsage +---------------------------------------------------------------------------- + + + CREATE SEQUENCE plantUsage_PLANTUSAGE_ID_seq; + +CREATE TABLE plantUsage +( + + + + + + + + PLANTUSAGE_ID integer + NOT NULL PRIMARY KEY default nextval('plantUsage_PLANTUSAGE_ID_seq') + , + PLANTNAME_ID Integer NOT NULL, + PLANTCONCEPT_ID Integer, + usageStart timestamp with time zone , + usageStop timestamp with time zone , + plantNameStatus varchar (20), + plantName varchar (220), + classSystem varchar (50), + acceptedSynonym varchar (220), + PARTY_ID Integer, + PLANTSTATUS_ID Integer + +); + + +---------------------------------------------------------------------------- +-- CREATE address +---------------------------------------------------------------------------- + + + CREATE SEQUENCE address_ADDRESS_ID_seq; + +CREATE TABLE address +( + + + + + + + + ADDRESS_ID integer + NOT NULL PRIMARY KEY default nextval('address_ADDRESS_ID_seq') + , + party_ID Integer NOT NULL, + organization_ID Integer, + orgPosition varchar (50), + email varchar (100), + deliveryPoint varchar (200), + city varchar (50), + administrativeArea varchar (50), + postalCode varchar (10), + country varchar (50), + currentFlag Boolean, + addressStartDate timestamp with time zone + +); + + +---------------------------------------------------------------------------- +-- CREATE aux_Role +---------------------------------------------------------------------------- + + + CREATE SEQUENCE aux_Role_ROLE_ID_seq; + +CREATE TABLE aux_Role +( + + + + + + + + + + ROLE_ID integer + NOT NULL PRIMARY KEY default nextval('aux_Role_ROLE_ID_seq') + , + roleCode varchar (30) NOT NULL, + roleDescription varchar (200), + accessionCode varchar (255), + roleProject Integer, + roleObservation Integer, + roleTaxonInt Integer, + roleClassInt Integer + +); + + +---------------------------------------------------------------------------- +-- CREATE reference +---------------------------------------------------------------------------- + + + CREATE SEQUENCE reference_reference_ID_seq; + +CREATE TABLE reference +( + + + + + + + + reference_ID integer + NOT NULL PRIMARY KEY default nextval('reference_reference_ID_seq') + , + shortName varchar (250), + fulltext text, + referenceType varchar (250), + title varchar (250), + titleSuperior varchar (250), + pubDate timestamp with time zone , + accessDate timestamp with time zone , + conferenceDate timestamp with time zone , + referenceJournal_ID Integer, + volume varchar (250), + issue varchar (250), + pageRange varchar (250), + totalPages Integer, + publisher varchar (250), + publicationPlace varchar (250), + isbn varchar (250), + edition varchar (250), + numberOfVolumes Integer, + chapterNumber Integer, + reportNumber Integer, + communicationType varchar (250), + degree varchar (250), + url text, + doi text, + additionalInfo text, + accessionCode varchar (255) + +); + + +---------------------------------------------------------------------------- +-- CREATE referenceAltIdent +---------------------------------------------------------------------------- + + + CREATE SEQUENCE referenceAltIdent_referenceAltIdent_ID_seq; + +CREATE TABLE referenceAltIdent +( + + + + + + + + referenceAltIdent_ID integer + NOT NULL PRIMARY KEY default nextval('referenceAltIdent_referenceAltIdent_ID_seq') + , + reference_ID Integer NOT NULL, + system varchar (250), + identifier varchar (250) NOT NULL + +); + + +---------------------------------------------------------------------------- +-- CREATE referenceContributor +---------------------------------------------------------------------------- + + + CREATE SEQUENCE referenceContributor_referenceContributor_ID_seq; + +CREATE TABLE referenceContributor +( + + + + + + + + referenceContributor_ID integer + NOT NULL PRIMARY KEY default nextval('referenceContributor_referenceContributor_ID_seq') + , + reference_ID Integer NOT NULL, + referenceParty_ID Integer NOT NULL, + roleType varchar (250), + position Integer + +); + + +---------------------------------------------------------------------------- +-- CREATE referenceParty +---------------------------------------------------------------------------- + + + CREATE SEQUENCE referenceParty_referenceParty_ID_seq; + +CREATE TABLE referenceParty +( + + + + + + + + referenceParty_ID integer + NOT NULL PRIMARY KEY default nextval('referenceParty_referenceParty_ID_seq') + , + type varchar (250), + positionName varchar (250), + salutation varchar (250), + givenName varchar (250), + surname varchar (250), + suffix varchar (250), + organizationName varchar (250), + currentParty_ID Integer, + accessionCode varchar (255) + +); + + +---------------------------------------------------------------------------- +-- CREATE referenceJournal +---------------------------------------------------------------------------- + + + CREATE SEQUENCE referenceJournal_referenceJournal_ID_seq; + +CREATE TABLE referenceJournal +( + + + + + + + + referenceJournal_ID integer + NOT NULL PRIMARY KEY default nextval('referenceJournal_referenceJournal_ID_seq') + , + journal varchar (250) NOT NULL, + issn varchar (250), + abbreviation varchar (250), + accessionCode varchar (255) + +); + + +---------------------------------------------------------------------------- +-- CREATE classContributor +---------------------------------------------------------------------------- + + + CREATE SEQUENCE classContributor_CLASSCONTRIBUTOR_ID_seq; + +CREATE TABLE classContributor +( + + + + + + + + CLASSCONTRIBUTOR_ID integer + NOT NULL PRIMARY KEY default nextval('classContributor_CLASSCONTRIBUTOR_ID_seq') + , + COMMCLASS_ID Integer NOT NULL, + PARTY_ID Integer NOT NULL, + ROLE_ID Integer, + emb_classContributor Integer + +); + + +---------------------------------------------------------------------------- +-- CREATE commClass +---------------------------------------------------------------------------- + + + CREATE SEQUENCE commClass_COMMCLASS_ID_seq; + +CREATE TABLE commClass +( + + + + + + + + COMMCLASS_ID integer + NOT NULL PRIMARY KEY default nextval('commClass_COMMCLASS_ID_seq') + , + OBSERVATION_ID Integer NOT NULL, + classStartDate timestamp with time zone , + classStopDate timestamp with time zone , + inspection Boolean, + tableAnalysis Boolean, + multivariateAnalysis Boolean, + expertSystem text, + classPublication_ID Integer, + classNotes text, + commName varchar (200), + commCode varchar (200), + commFramework varchar (200), + commLevel varchar (200), + accessionCode varchar (255), + emb_commClass Integer + +); + + +---------------------------------------------------------------------------- +-- CREATE commInterpretation +---------------------------------------------------------------------------- + + + CREATE SEQUENCE commInterpretation_COMMINTERPRETATION_ID_seq; + +CREATE TABLE commInterpretation +( + + + + + + + + COMMINTERPRETATION_ID integer + NOT NULL PRIMARY KEY default nextval('commInterpretation_COMMINTERPRETATION_ID_seq') + , + COMMCLASS_ID Integer NOT NULL, + COMMCONCEPT_ID Integer, + commcode varchar (34), + commname varchar (200), + classFit varchar (50), + classConfidence varchar (15), + commAuthority_ID Integer, + notes text, + type Boolean, + nomenclaturalType Boolean, + emb_commInterpretation Integer + +); + + +---------------------------------------------------------------------------- +-- CREATE coverIndex +---------------------------------------------------------------------------- + + + CREATE SEQUENCE coverIndex_COVERINDEX_ID_seq; + +CREATE TABLE coverIndex +( + + + + + + + + COVERINDEX_ID integer + NOT NULL PRIMARY KEY default nextval('coverIndex_COVERINDEX_ID_seq') + , + COVERMETHOD_ID Integer NOT NULL, + coverCode varchar (10) NOT NULL, + upperLimit Float, + lowerLimit Float, + coverPercent Float NOT NULL, + indexDescription text + +); + + +---------------------------------------------------------------------------- +-- CREATE coverMethod +---------------------------------------------------------------------------- + + + CREATE SEQUENCE coverMethod_COVERMETHOD_ID_seq; + +CREATE TABLE coverMethod +( + + + + + + + + COVERMETHOD_ID integer + NOT NULL PRIMARY KEY default nextval('coverMethod_COVERMETHOD_ID_seq') + , + reference_ID Integer, + coverType varchar (30) NOT NULL, + coverEstimationMethod varchar (80), + accessionCode varchar (255) + +); + + +---------------------------------------------------------------------------- +-- CREATE definedValue +---------------------------------------------------------------------------- + + + CREATE SEQUENCE definedValue_DEFINEDVALUE_ID_seq; + +CREATE TABLE definedValue +( + + + + + + + + DEFINEDVALUE_ID integer + NOT NULL PRIMARY KEY default nextval('definedValue_DEFINEDVALUE_ID_seq') + , + USERDEFINED_ID Integer NOT NULL, + tableRecord_ID Integer NOT NULL, + definedValue text NOT NULL + +); + + +---------------------------------------------------------------------------- +-- CREATE disturbanceObs +---------------------------------------------------------------------------- + + + CREATE SEQUENCE disturbanceObs_disturbanceObs_ID_seq; + +CREATE TABLE disturbanceObs +( + + + + + + + + disturbanceObs_ID integer + NOT NULL PRIMARY KEY default nextval('disturbanceObs_disturbanceObs_ID_seq') + , + OBSERVATION_ID Integer NOT NULL, + disturbanceType varchar (30) NOT NULL, + disturbanceIntensity varchar (30), + disturbanceAge Float, + disturbanceExtent Float, + disturbanceComment text, + emb_disturbanceObs Integer + +); + + +---------------------------------------------------------------------------- +-- CREATE graphic +---------------------------------------------------------------------------- + + + CREATE SEQUENCE graphic_GRAPHIC_ID_seq; + +CREATE TABLE graphic +( + + + + + + + + GRAPHIC_ID integer + NOT NULL PRIMARY KEY default nextval('graphic_GRAPHIC_ID_seq') + , + OBSERVATION_ID Integer NOT NULL, + graphicName varchar (30), + graphicLocation text, + graphicDescription text, + graphicType varchar (20), + graphicDate timestamp with time zone , + graphicData oid, + accessionCode varchar (255) + +); + + +---------------------------------------------------------------------------- +-- CREATE namedPlace +---------------------------------------------------------------------------- + + + CREATE SEQUENCE namedPlace_NAMEDPLACE_ID_seq; + +CREATE TABLE namedPlace +( + + + + + + + + NAMEDPLACE_ID integer + NOT NULL PRIMARY KEY default nextval('namedPlace_NAMEDPLACE_ID_seq') + , + placeSystem varchar (50), + placeName varchar (100) NOT NULL, + placeDescription text, + placeCode varchar (15), + owner varchar (100), + reference_ID Integer, + accessionCode varchar (255), + d_obscount Integer + +); + + +---------------------------------------------------------------------------- +-- CREATE namedPlaceCorrelation +---------------------------------------------------------------------------- + + + CREATE SEQUENCE namedPlaceCorrelation_NAMEDPLACECORRELATION_ID_seq; + +CREATE TABLE namedPlaceCorrelation +( + + + + + + + + NAMEDPLACECORRELATION_ID integer + NOT NULL PRIMARY KEY default nextval('namedPlaceCorrelation_NAMEDPLACECORRELATION_ID_seq') + , + PARENTPLACE_ID Integer NOT NULL, + CHILDPLACE_ID Integer NOT NULL, + placeConvergence varchar (20) NOT NULL + +); + + +---------------------------------------------------------------------------- +-- CREATE note +---------------------------------------------------------------------------- + + + CREATE SEQUENCE note_NOTE_ID_seq; + +CREATE TABLE note +( + + + + + + + + NOTE_ID integer + NOT NULL PRIMARY KEY default nextval('note_NOTE_ID_seq') + , + NOTELINK_ID Integer NOT NULL, + PARTY_ID Integer NOT NULL, + ROLE_ID Integer NOT NULL, + noteDate timestamp with time zone , + noteType varchar (20) NOT NULL, + noteText text NOT NULL, + accessionCode varchar (255) + +); + + +---------------------------------------------------------------------------- +-- CREATE noteLink +---------------------------------------------------------------------------- + + + CREATE SEQUENCE noteLink_NOTELINK_ID_seq; + +CREATE TABLE noteLink +( + + + + + + + + NOTELINK_ID integer + NOT NULL PRIMARY KEY default nextval('noteLink_NOTELINK_ID_seq') + , + tableName varchar (50) NOT NULL, + attributeName varchar (50), + tableRecord Integer NOT NULL + +); + + +---------------------------------------------------------------------------- +-- CREATE observation +---------------------------------------------------------------------------- + + + CREATE SEQUENCE observation_OBSERVATION_ID_seq; + +CREATE TABLE observation +( + + + + + + + + OBSERVATION_ID integer + NOT NULL PRIMARY KEY default nextval('observation_OBSERVATION_ID_seq') + , + PREVIOUSOBS_ID Integer, + PLOT_ID Integer NOT NULL, + PROJECT_ID Integer, + authorObsCode varchar (30), + obsStartDate timestamp with time zone , + obsEndDate timestamp with time zone , + dateAccuracy varchar (30), + dateEntered timestamp with time zone DEFAULT now(), + COVERMETHOD_ID Integer, + coverDispersion varchar (30), + autoTaxonCover Boolean, + STRATUMMETHOD_ID Integer, + methodNarrative text, + taxonObservationArea Float, + stemSizeLimit Float, + stemObservationArea Float, + stemSampleMethod varchar (30), + originalData text, + effortLevel varchar (30), + plotValidationLevel Integer, + floristicQuality varchar (30), + bryophyteQuality varchar (30), + lichenQuality varchar (30), + observationNarrative text, + landscapeNarrative text, + homogeneity varchar (50), + phenologicAspect varchar (30), + representativeness varchar (255), + standMaturity varchar (50), + successionalStatus text, + numberOfTaxa Integer, + basalArea Float, + hydrologicRegime varchar (30), + soilMoistureRegime varchar (30), + soilDrainage varchar (30), + waterSalinity varchar (30), + waterDepth Float, + shoreDistance Float, + soilDepth Float, + organicDepth Float, + SOILTAXON_ID Integer, + soilTaxonSrc varchar (200), + percentBedRock Float, + percentRockGravel Float, + percentWood Float, + percentLitter Float, + percentBareSoil Float, + percentWater Float, + percentOther Float, + nameOther varchar (30), + treeHt Float, + shrubHt Float, + fieldHt Float, + nonvascularHt Float, + submergedHt Float, + treeCover Float, + shrubCover Float, + fieldCover Float, + nonvascularCover Float, + floatingCover Float, + submergedCover Float, + dominantStratum varchar (40), + growthform1Type varchar (40), + growthform2Type varchar (40), + growthform3Type varchar (40), + growthform1Cover Float, + growthform2Cover Float, + growthform3Cover Float, + totalCover Float, + accessionCode varchar (255), + notesPublic Boolean, + notesMgt Boolean, + revisions Boolean, + emb_observation Integer, + interp_orig_ci_ID Integer, + interp_orig_cc_ID Integer, + interp_orig_sciname text, + interp_orig_code text, + interp_orig_party_id Integer, + interp_orig_partyname text, + interp_current_ci_ID Integer, + interp_current_cc_ID Integer, + interp_current_sciname text, + interp_current_code text, + interp_current_party_id Integer, + interp_current_partyname text, + interp_bestfit_ci_ID Integer, + interp_bestfit_cc_ID Integer, + interp_bestfit_sciname text, + interp_bestfit_code text, + interp_bestfit_party_id Integer, + interp_bestfit_partyname text, + topTaxon1Name varchar (255), + topTaxon2Name varchar (255), + topTaxon3Name varchar (255), + topTaxon4Name varchar (255), + topTaxon5Name varchar (255), + hasObservationSynonym Boolean + +); + + +---------------------------------------------------------------------------- +-- CREATE observationContributor +---------------------------------------------------------------------------- + + + CREATE SEQUENCE observationContributor_OBSERVATIONCONTRIBUTOR_ID_seq; + +CREATE TABLE observationContributor +( + + + + + + + + OBSERVATIONCONTRIBUTOR_ID integer + NOT NULL PRIMARY KEY default nextval('observationContributor_OBSERVATIONCONTRIBUTOR_ID_seq') + , + OBSERVATION_ID Integer NOT NULL, + PARTY_ID Integer NOT NULL, + ROLE_ID Integer NOT NULL, + contributionDate timestamp with time zone + +); + + +---------------------------------------------------------------------------- +-- CREATE observationSynonym +---------------------------------------------------------------------------- + + + CREATE SEQUENCE observationSynonym_OBSERVATIONSYNONYM_ID_seq; + +CREATE TABLE observationSynonym +( + + + + + + + + OBSERVATIONSYNONYM_ID integer + NOT NULL PRIMARY KEY default nextval('observationSynonym_OBSERVATIONSYNONYM_ID_seq') + , + synonymObservation_ID Integer NOT NULL, + primaryObservation_ID Integer NOT NULL, + PARTY_ID Integer NOT NULL, + ROLE_ID Integer NOT NULL, + classStartDate timestamp with time zone NOT NULL DEFAULT now(), + classStopDate timestamp with time zone , + synonymComment text, + accessionCode varchar (255) + +); + + +---------------------------------------------------------------------------- +-- CREATE party +---------------------------------------------------------------------------- + + + CREATE SEQUENCE party_PARTY_ID_seq; + +CREATE TABLE party +( + + + + + + + + + PARTY_ID integer + NOT NULL PRIMARY KEY default nextval('party_PARTY_ID_seq') + , + salutation varchar (20), + givenName varchar (50), + middleName varchar (50), + surName varchar (50), + organizationName varchar (100), + currentName_ID Integer, + contactInstructions text, + email varchar (120), + accessionCode varchar (255), + partyType varchar (40), + partyPublic Boolean DEFAULT true, + d_obscount Integer + +); + + +---------------------------------------------------------------------------- +-- CREATE partyMember +---------------------------------------------------------------------------- + + + CREATE SEQUENCE partyMember_partyMember_ID_seq; + +CREATE TABLE partyMember +( + + + + + + + + partyMember_ID integer + NOT NULL PRIMARY KEY default nextval('partyMember_partyMember_ID_seq') + , + parentParty_ID Integer NOT NULL, + childParty_ID Integer NOT NULL, + role_ID Integer, + memberStart timestamp with time zone NOT NULL DEFAULT now(), + memberStop timestamp with time zone + +); + + +---------------------------------------------------------------------------- +-- CREATE place +---------------------------------------------------------------------------- + + + CREATE SEQUENCE place_PLOTPLACE_ID_seq; + +CREATE TABLE place +( + + + + + + + + PLOTPLACE_ID integer + NOT NULL PRIMARY KEY default nextval('place_PLOTPLACE_ID_seq') + , + PLOT_ID Integer NOT NULL, + calculated Boolean, + NAMEDPLACE_ID Integer NOT NULL + +); + + +---------------------------------------------------------------------------- +-- CREATE plot +---------------------------------------------------------------------------- + + + CREATE SEQUENCE plot_PLOT_ID_seq; + +CREATE TABLE plot +( + + + + + + + + PLOT_ID integer + NOT NULL PRIMARY KEY default nextval('plot_PLOT_ID_seq') + , + authorPlotCode varchar (30) NOT NULL, + reference_ID Integer, + PARENT_ID Integer, + realLatitude Float, + realLongitude Float, + locationAccuracy Float, + confidentialityStatus Integer NOT NULL, + confidentialityReason varchar (200), + latitude Float, + longitude Float, + authorE varchar (20), + authorN varchar (20), + authorZone varchar (20), + authorDatum varchar (20), + authorLocation varchar (200), + locationNarrative text, + plotRationaleNarrative text, + azimuth Float, + dsgpoly text, + shape varchar (50), + area Float, + standSize varchar (50), + placementMethod varchar (50), + permanence Boolean, + layoutNarrative text, + elevation Float, + elevationAccuracy Float, + elevationRange Float, + slopeAspect Float, + minSlopeAspect Float, + maxSlopeAspect Float, + slopeGradient Float, + minSlopeGradient Float, + maxSlopeGradient Float, + topoPosition varchar (90), + landform varchar (50), + surficialDeposits varchar (90), + rockType varchar (90), + stateProvince varchar (55), + country varchar (100), + dateentered timestamp with time zone DEFAULT now(), + submitter_surname varchar (100), + submitter_givenname varchar (100), + submitter_email varchar (100), + accessionCode varchar (255), + notesPublic Boolean, + notesMgt Boolean, + revisions Boolean, + emb_plot Integer + +); + + +---------------------------------------------------------------------------- +-- CREATE project +---------------------------------------------------------------------------- + + + CREATE SEQUENCE project_PROJECT_ID_seq; + +CREATE TABLE project +( + + + + + + + + PROJECT_ID integer + NOT NULL PRIMARY KEY default nextval('project_PROJECT_ID_seq') + , + projectName varchar (150) NOT NULL, + projectDescription text, + startDate timestamp with time zone , + stopDate timestamp with time zone , + accessionCode varchar (255), + d_obscount Integer, + d_lastplotaddeddate timestamp with time zone + +); + + +---------------------------------------------------------------------------- +-- CREATE projectContributor +---------------------------------------------------------------------------- + + + CREATE SEQUENCE projectContributor_PROJECTCONTRIBUTOR_ID_seq; + +CREATE TABLE projectContributor +( + + + + + + + + PROJECTCONTRIBUTOR_ID integer + NOT NULL PRIMARY KEY default nextval('projectContributor_PROJECTCONTRIBUTOR_ID_seq') + , + PROJECT_ID Integer NOT NULL, + PARTY_ID Integer NOT NULL, + ROLE_ID Integer, + surname varchar (50), + cheatRole varchar (50) + +); + + +---------------------------------------------------------------------------- +-- CREATE revision +---------------------------------------------------------------------------- + + + CREATE SEQUENCE revision_REVISION_ID_seq; + +CREATE TABLE revision +( + + + + + + + + REVISION_ID integer + NOT NULL PRIMARY KEY default nextval('revision_REVISION_ID_seq') + , + tableName varchar (50) NOT NULL, + tableAttribute varchar (50) NOT NULL, + tableRecord Integer NOT NULL, + revisionDate timestamp with time zone NOT NULL, + previousValueText text NOT NULL, + previousValueType varchar (20) NOT NULL, + previousRevision_ID Integer + +); + + +---------------------------------------------------------------------------- +-- CREATE soilObs +---------------------------------------------------------------------------- + + + CREATE SEQUENCE soilObs_SOILOBS_ID_seq; + +CREATE TABLE soilObs +( + + + + + + + + SOILOBS_ID integer + NOT NULL PRIMARY KEY default nextval('soilObs_SOILOBS_ID_seq') + , + OBSERVATION_ID Integer NOT NULL, + soilHorizon varchar (15) NOT NULL, + soilDepthTop Float, + soilDepthBottom Float, + soilColor varchar (30), + soilOrganic Float, + soilTexture varchar (50), + soilSand Float, + soilSilt Float, + soilClay Float, + soilCoarse Float, + soilPH Float, + exchangeCapacity Float, + baseSaturation Float, + soilDescription text, + emb_soilObs Integer + +); + + +---------------------------------------------------------------------------- +-- CREATE soilTaxon +---------------------------------------------------------------------------- + + + CREATE SEQUENCE soilTaxon_SOILTAXON_ID_seq; + +CREATE TABLE soilTaxon +( + + + + + + + + SOILTAXON_ID integer + NOT NULL PRIMARY KEY default nextval('soilTaxon_SOILTAXON_ID_seq') + , + soilCode varchar (15), + soilName varchar (100), + soilLevel Integer, + SOILPARENT_ID Integer, + soilFramework varchar (33), + accessionCode varchar (255) + +); + + +---------------------------------------------------------------------------- +-- CREATE stemCount +---------------------------------------------------------------------------- + + + CREATE SEQUENCE stemCount_STEMCOUNT_ID_seq; + +CREATE TABLE stemCount +( + + + + + + + + STEMCOUNT_ID integer + NOT NULL PRIMARY KEY default nextval('stemCount_STEMCOUNT_ID_seq') + , + TAXONIMPORTANCE_ID Integer NOT NULL, + stemDiameter Float, + stemDiameterAccuracy Float, + stemHeight Float, + stemHeightAccuracy Float, + stemCount Integer NOT NULL, + stemTaxonArea Float, + emb_stemCount Integer + +); + + +---------------------------------------------------------------------------- +-- CREATE stemLocation +---------------------------------------------------------------------------- + + + CREATE SEQUENCE stemLocation_STEMLOCATION_ID_seq; + +CREATE TABLE stemLocation +( + + + + + + + + STEMLOCATION_ID integer + NOT NULL PRIMARY KEY default nextval('stemLocation_STEMLOCATION_ID_seq') + , + STEMCOUNT_ID Integer NOT NULL, + stemCode varchar (20), + stemXPosition Float, + stemYPosition Float, + stemHealth varchar (50), + emb_stemLocation Integer + +); + + +---------------------------------------------------------------------------- +-- CREATE stratum +---------------------------------------------------------------------------- + + + CREATE SEQUENCE stratum_STRATUM_ID_seq; + +CREATE TABLE stratum +( + + + + + + + + + STRATUM_ID integer + NOT NULL PRIMARY KEY default nextval('stratum_STRATUM_ID_seq') + , + OBSERVATION_ID Integer NOT NULL, + STRATUMTYPE_ID Integer NOT NULL, + STRATUMMETHOD_ID Integer, + stratumName varchar (30), + stratumHeight Float, + stratumBase Float, + stratumCover Float, + stratumDescription varchar (200) + +); + + +---------------------------------------------------------------------------- +-- CREATE stratumMethod +---------------------------------------------------------------------------- + + + CREATE SEQUENCE stratumMethod_STRATUMMETHOD_ID_seq; + +CREATE TABLE stratumMethod +( + + + + + + + + STRATUMMETHOD_ID integer + NOT NULL PRIMARY KEY default nextval('stratumMethod_STRATUMMETHOD_ID_seq') + , + reference_ID Integer, + stratumMethodName varchar (30) NOT NULL, + stratumMethodDescription text, + stratumAssignment varchar (50), + accessionCode varchar (255) + +); + + +---------------------------------------------------------------------------- +-- CREATE stratumType +---------------------------------------------------------------------------- + + + CREATE SEQUENCE stratumType_STRATUMTYPE_ID_seq; + +CREATE TABLE stratumType +( + + + + + + + + + STRATUMTYPE_ID integer + NOT NULL PRIMARY KEY default nextval('stratumType_STRATUMTYPE_ID_seq') + , + STRATUMMETHOD_ID Integer NOT NULL, + stratumIndex varchar (10), + stratumName varchar (30), + stratumDescription text + +); + + +---------------------------------------------------------------------------- +-- CREATE taxonImportance +---------------------------------------------------------------------------- + + + CREATE SEQUENCE taxonImportance_taxonImportance_ID_seq; + +CREATE TABLE taxonImportance +( + + + + + + + + taxonImportance_ID integer + NOT NULL PRIMARY KEY default nextval('taxonImportance_taxonImportance_ID_seq') + , + taxonObservation_ID Integer NOT NULL, + stratum_ID Integer, + cover Float, + coverCode varchar (10), + basalArea Float, + biomass Float, + inferenceArea Float, + stratumBase Float, + stratumHeight Float, + emb_taxonImportance Integer + +); + + +---------------------------------------------------------------------------- +-- CREATE taxonInterpretation +---------------------------------------------------------------------------- + + + CREATE SEQUENCE taxonInterpretation_TAXONINTERPRETATION_ID_seq; + +CREATE TABLE taxonInterpretation +( + + + + + + + + TAXONINTERPRETATION_ID integer + NOT NULL PRIMARY KEY default nextval('taxonInterpretation_TAXONINTERPRETATION_ID_seq') + , + TAXONOBSERVATION_ID Integer NOT NULL, + stemLocation_ID Integer, + PLANTCONCEPT_ID Integer NOT NULL, + interpretationDate timestamp with time zone NOT NULL, + PLANTNAME_ID Integer, + PARTY_ID Integer NOT NULL, + ROLE_ID Integer NOT NULL, + interpretationType varchar (30), + reference_ID Integer, + originalInterpretation Boolean NOT NULL, + currentInterpretation Boolean NOT NULL, + taxonFit varchar (50), + taxonConfidence varchar (50), + collector_ID Integer, + collectionNumber varchar (100), + collectionDate timestamp with time zone , + museum_ID Integer, + museumAccessionNumber varchar (100), + groupType varchar (20), + notes text, + notesPublic Boolean, + notesMgt Boolean, + revisions Boolean, + emb_taxonInterpretation Integer, + accessionCode varchar (255) + +); + + +---------------------------------------------------------------------------- +-- CREATE taxonObservation +---------------------------------------------------------------------------- + + + CREATE SEQUENCE taxonObservation_TAXONOBSERVATION_ID_seq; + +CREATE TABLE taxonObservation +( + + + + + + + + TAXONOBSERVATION_ID integer + NOT NULL PRIMARY KEY default nextval('taxonObservation_TAXONOBSERVATION_ID_seq') + , + OBSERVATION_ID Integer NOT NULL, + authorPlantName varchar (255), + reference_ID Integer, + taxonInferenceArea Float, + accessionCode varchar (255), + emb_taxonObservation Integer, + int_origPlantConcept_ID Integer, + int_origPlantSciFull varchar (255), + int_origPlantSciNameNoAuth varchar (255), + int_origPlantCommon varchar (255), + int_origPlantCode varchar (255), + int_currPlantConcept_ID Integer, + int_currPlantSciFull varchar (255), + int_currPlantSciNameNoAuth varchar (255), + int_currPlantCommon varchar (255), + int_currPlantCode varchar (255) + +); + + +---------------------------------------------------------------------------- +-- CREATE taxonAlt +---------------------------------------------------------------------------- + + + CREATE SEQUENCE taxonAlt_taxonAlt_ID_seq; + +CREATE TABLE taxonAlt +( + + + + + + + + taxonAlt_ID integer + NOT NULL PRIMARY KEY default nextval('taxonAlt_taxonAlt_ID_seq') + , + taxonInterpretation_ID Integer NOT NULL, + plantConcept_ID Integer NOT NULL, + taxonAltFit varchar (50), + taxonAltConfidence varchar (50), + taxonAltNotes text, + emb_taxonAlt Integer + +); + + +---------------------------------------------------------------------------- +-- CREATE telephone +---------------------------------------------------------------------------- + + + CREATE SEQUENCE telephone_TELEPHONE_ID_seq; + +CREATE TABLE telephone +( + + + + + + + + TELEPHONE_ID integer + NOT NULL PRIMARY KEY default nextval('telephone_TELEPHONE_ID_seq') + , + PARTY_ID Integer NOT NULL, + phoneNumber varchar (30) NOT NULL, + phoneType varchar (20) NOT NULL + +); + + +---------------------------------------------------------------------------- +-- CREATE userDefined +---------------------------------------------------------------------------- + + + CREATE SEQUENCE userDefined_USERDEFINED_ID_seq; + +CREATE TABLE userDefined +( + + + + + + + + USERDEFINED_ID integer + NOT NULL PRIMARY KEY default nextval('userDefined_USERDEFINED_ID_seq') + , + userDefinedName varchar (50), + userDefinedMetadata text, + userDefinedCategory varchar (30), + userDefinedType varchar (20) NOT NULL, + tableName varchar (50) NOT NULL, + accessionCode varchar (255) + +); + + +---------------------------------------------------------------------------- +-- CREATE embargo +---------------------------------------------------------------------------- + + + CREATE SEQUENCE embargo_embargo_ID_seq; + +CREATE TABLE embargo +( + + + + + + + + embargo_ID integer + NOT NULL PRIMARY KEY default nextval('embargo_embargo_ID_seq') + , + plot_ID Integer NOT NULL, + embargoReason text NOT NULL, + embargoStart timestamp with time zone NOT NULL, + embargoStop timestamp with time zone NOT NULL, + defaultStatus Integer NOT NULL + +); + + +---------------------------------------------------------------------------- +-- CREATE usr +---------------------------------------------------------------------------- + + + CREATE SEQUENCE usr_usr_ID_seq; + +CREATE TABLE usr +( + + + + + + + + + + usr_ID integer + NOT NULL PRIMARY KEY default nextval('usr_usr_ID_seq') + , + party_ID Integer NOT NULL, + password varchar (512), + permission_type Integer NOT NULL, + begin_time timestamp with time zone , + last_connect timestamp with time zone , + ticket_count Integer, + email_address varchar (100) NOT NULL, + preferred_name varchar (100), + remote_address varchar (100) + +); + + +---------------------------------------------------------------------------- +-- CREATE userCertification +---------------------------------------------------------------------------- + + + CREATE SEQUENCE userCertification_userCertification_ID_seq; + +CREATE TABLE userCertification +( + + + + + + + + + userCertification_ID integer + NOT NULL PRIMARY KEY default nextval('userCertification_userCertification_ID_seq') + , + usr_ID Integer NOT NULL, + current_cert_level Integer NOT NULL, + requested_cert_level Integer NOT NULL, + highest_degree varchar (50), + degree_year varchar (50), + degree_institution varchar (50), + current_org varchar (50), + current_pos varchar (200), + esa_member Boolean, + prof_exp text, + relevant_pubs text, + veg_sampling_exp text, + veg_analysis_exp text, + usnvc_exp text, + vb_exp text, + vb_intention text, + tools_exp text, + esa_sponsor_name_a varchar (120), + esa_sponsor_email_a varchar (120), + esa_sponsor_name_b varchar (120), + esa_sponsor_email_b varchar (120), + peer_review Boolean, + addl_stmt text, + certificationStatus varchar (30), + certificationStatusComments text, + exp_region_a text, + exp_region_b text, + exp_region_c text, + exp_region_a_veg text, + exp_region_b_veg text, + exp_region_c_veg text, + exp_region_a_flor text, + exp_region_b_flor text, + exp_region_c_flor text, + exp_region_a_nvc text, + exp_region_b_nvc text, + exp_region_c_nvc text + +); + + +---------------------------------------------------------------------------- +-- CREATE userRegionalExp +---------------------------------------------------------------------------- + + + CREATE SEQUENCE userRegionalExp_userRegionalExp_ID_seq; + +CREATE TABLE userRegionalExp +( + + + + + + + + + userRegionalExp_ID integer + NOT NULL PRIMARY KEY default nextval('userRegionalExp_userRegionalExp_ID_seq') + , + userCertification_ID Integer NOT NULL, + region varchar (50) NOT NULL, + vegetation varchar (50), + floristics varchar (50), + nvc_ivc varchar (50) + +); + + +---------------------------------------------------------------------------- +-- CREATE userDataset +---------------------------------------------------------------------------- + + + CREATE SEQUENCE userDataset_userDataset_ID_seq; + +CREATE TABLE userDataset +( + + + + + + + + userDataset_ID integer + NOT NULL PRIMARY KEY default nextval('userDataset_userDataset_ID_seq') + , + usr_ID Integer, + datasetStart timestamp with time zone DEFAULT now(), + datasetStop timestamp with time zone , + accessionCode varchar (255), + datasetName varchar (100) NOT NULL, + datasetDescription text, + datasetType varchar (50), + datasetSharing varchar (30), + datasetPassword varchar (50) + +); + + +---------------------------------------------------------------------------- +-- CREATE userDatasetItem +---------------------------------------------------------------------------- + + + CREATE SEQUENCE userDatasetItem_userDatasetItem_ID_seq; + +CREATE TABLE userDatasetItem +( + + + + + + + + userDatasetItem_ID integer + NOT NULL PRIMARY KEY default nextval('userDatasetItem_userDatasetItem_ID_seq') + , + userDataset_ID Integer NOT NULL, + itemAccessionCode varchar (100) NOT NULL, + itemDatabase varchar (50) NOT NULL, + itemTable varchar (50) NOT NULL, + itemRecord Integer NOT NULL, + externalAccessionCode varchar (100), + itemType varchar (50), + itemStart timestamp with time zone NOT NULL DEFAULT now(), + itemStop timestamp with time zone , + notes text + +); + + +---------------------------------------------------------------------------- +-- CREATE userNotify +---------------------------------------------------------------------------- + + + CREATE SEQUENCE userNotify_userNotify_ID_seq; + +CREATE TABLE userNotify +( + + + + + + + + userNotify_ID integer + NOT NULL PRIMARY KEY default nextval('userNotify_userNotify_ID_seq') + , + usr_ID Integer NOT NULL, + notifyName varchar (100), + notifyDescription text, + notifyStart timestamp with time zone DEFAULT now(), + notifyStop timestamp with time zone , + lastCheckDate timestamp with time zone , + notifySQL text + +); + + +---------------------------------------------------------------------------- +-- CREATE userPermission +---------------------------------------------------------------------------- + + + CREATE SEQUENCE userPermission_userPermission_ID_seq; + +CREATE TABLE userPermission +( + + + + + + + + + userPermission_ID integer + NOT NULL PRIMARY KEY default nextval('userPermission_userPermission_ID_seq') + , + embargo_ID Integer NOT NULL, + usr_ID Integer NOT NULL, + permissionStart timestamp with time zone NOT NULL DEFAULT now(), + permissionStop timestamp with time zone , + permissionStatus Integer NOT NULL, + permissionNotes text + +); + + +---------------------------------------------------------------------------- +-- CREATE userQuery +---------------------------------------------------------------------------- + + + CREATE SEQUENCE userQuery_userQuery_ID_seq; + +CREATE TABLE userQuery +( + + + + + + + + userQuery_ID integer + NOT NULL PRIMARY KEY default nextval('userQuery_userQuery_ID_seq') + , + usr_ID Integer NOT NULL, + queryStart timestamp with time zone DEFAULT now(), + queryStop timestamp with time zone , + accessionCode varchar (255), + queryName varchar (100), + queryDescription text, + querySQL text, + queryType varchar (50), + querySharing varchar (30), + queryPassword varchar (50) + +); + + +---------------------------------------------------------------------------- +-- CREATE userPreference +---------------------------------------------------------------------------- + + + CREATE SEQUENCE userPreference_userPreference_ID_seq; + +CREATE TABLE userPreference +( + + + + + + + + userPreference_ID integer + NOT NULL PRIMARY KEY default nextval('userPreference_userPreference_ID_seq') + , + usr_ID Integer NOT NULL, + preferenceName varchar (100), + preferenceValue text, + preferencePriority Float, + preferenceStart timestamp with time zone DEFAULT now(), + preferenceStop timestamp with time zone + +); + + +---------------------------------------------------------------------------- +-- CREATE userRecordOwner +---------------------------------------------------------------------------- + + + CREATE SEQUENCE userRecordOwner_userRecordOwner_ID_seq; + +CREATE TABLE userRecordOwner +( + + + + + + + + userRecordOwner_ID integer + NOT NULL PRIMARY KEY default nextval('userRecordOwner_userRecordOwner_ID_seq') + , + usr_ID Integer NOT NULL, + tableName varchar (50) NOT NULL, + tableRecord Integer NOT NULL, + recordCreationDate timestamp with time zone NOT NULL, + ownerStart timestamp with time zone NOT NULL DEFAULT now(), + ownerStop timestamp with time zone , + ownerType varchar (30) NOT NULL + +); + + +---------------------------------------------------------------------------- +-- CREATE keywords +---------------------------------------------------------------------------- + + +CREATE TABLE keywords +( + + + + + + + + entity text NOT NULL, + keywords text, + table_id Integer NOT NULL + +); + + +---------------------------------------------------------------------------- +-- CREATE keywords_extra +---------------------------------------------------------------------------- + + +CREATE TABLE keywords_extra +( + + + + + + + + entity text NOT NULL, + keywords text, + table_id Integer NOT NULL + +); + + +---------------------------------------------------------------------------- +-- CREATE dba_confidentialitystatus +---------------------------------------------------------------------------- + + +CREATE TABLE dba_confidentialitystatus +( + + + + + + + + + confidentialitystatus Integer + NOT NULL PRIMARY KEY + , + confidentialityshorttext varchar (100), + confidentialitytext varchar (100) + +); + + +---------------------------------------------------------------------------- +-- CREATE dba_cookie +---------------------------------------------------------------------------- + + + CREATE SEQUENCE dba_cookie_cookie_id_seq; + +CREATE TABLE dba_cookie +( + + + + + + + + + cookie_id integer + NOT NULL PRIMARY KEY default nextval('dba_cookie_cookie_id_seq') + , + cookiename varchar (75) NOT NULL, + defaultvalue varchar (75) NOT NULL, + viewname varchar (25) NOT NULL, + description text, + examplepk Integer NOT NULL, + sortorder Integer, + startgroup Boolean, + prefixhtml text, + suffixhtml text + +); + + +---------------------------------------------------------------------------- +-- CREATE dba_cookielabels +---------------------------------------------------------------------------- + + + CREATE SEQUENCE dba_cookielabels_cookielabel_id_seq; + +CREATE TABLE dba_cookielabels +( + + + + + + + + + cookielabel_id integer + NOT NULL PRIMARY KEY default nextval('dba_cookielabels_cookielabel_id_seq') + , + vieworcookie varchar (50) NOT NULL, + description text + +); + + +---------------------------------------------------------------------------- +-- CREATE dba_dbstatstime +---------------------------------------------------------------------------- + + + CREATE SEQUENCE dba_dbstatstime_stat_id_seq; + +CREATE TABLE dba_dbstatstime +( + + + + + + + + stat_id integer + NOT NULL PRIMARY KEY default nextval('dba_dbstatstime_stat_id_seq') + , + statdate timestamp with time zone , + statpkg Integer, + statname text, + stattable varchar (100), + minpk Integer, + maxpk Integer, + countrecs Integer + +); + + +---------------------------------------------------------------------------- +-- CREATE dba_preassignacccode +---------------------------------------------------------------------------- + + + CREATE SEQUENCE dba_preassignacccode_dba_preassignacccode_id_seq; + +CREATE TABLE dba_preassignacccode +( + + + + + + + + dba_preassignacccode_id integer + NOT NULL PRIMARY KEY default nextval('dba_preassignacccode_dba_preassignacccode_id_seq') + , + dba_requestnumber Integer NOT NULL, + databasekey varchar (20) NOT NULL, + tableabbrev varchar (10) NOT NULL, + confirmcode varchar (70) NOT NULL DEFAULT ( + replace( + replace( + replace( + replace(to_char(now(), 'YYYY-MM-DD"T"HH24:MI:SS'), ' ', 'T'), '-', '' + ), ':', '' + ), '.', 'd' + ) || 'R' || floor(random() * 1000000) + ), + accessioncode varchar (255), + codeIsUsed Boolean +); + + +---------------------------------------------------------------------------- +-- CREATE dba_onerow +---------------------------------------------------------------------------- + + + CREATE SEQUENCE dba_onerow_dba_onerow_id_seq; + +CREATE TABLE dba_onerow +( + + + + + + + + + dba_onerow_id integer + NOT NULL PRIMARY KEY default nextval('dba_onerow_dba_onerow_id_seq') + + +); + + +---------------------------------------------------------------------------- +-- CREATE dba_datamodelversion +---------------------------------------------------------------------------- + + + CREATE SEQUENCE dba_datamodelversion_dba_datamodelversion_ID_seq; + +CREATE TABLE dba_datamodelversion +( + + + + + + + + + dba_datamodelversion_ID integer + NOT NULL PRIMARY KEY default nextval('dba_datamodelversion_dba_datamodelversion_ID_seq') + , + versionText varchar (20) NOT NULL, + versionImplemented timestamp with time zone DEFAULT now() + +); + + INSERT INTO dba_datamodelversion (versionText) values ('1.0.5'); + + +---------------------------------------------------------------------------- +-- CREATE dba_xmlCache +---------------------------------------------------------------------------- + + +CREATE TABLE dba_xmlCache +( + + + + + + + + accessioncode varchar (255), + xml bytea + +); + + +---------------------------------------------------------------------------- +-- CREATE temptbl_std_commnames +---------------------------------------------------------------------------- + + + CREATE SEQUENCE temptbl_std_commnames_commconcept_id_seq; + +CREATE TABLE temptbl_std_commnames +( + + + + + + + + commconcept_id integer + NOT NULL PRIMARY KEY default nextval('temptbl_std_commnames_commconcept_id_seq') + , + sciname varchar (255), + translated varchar (255), + code varchar (255), + common varchar (255) + +); + + +---------------------------------------------------------------------------- +-- CREATE temptbl_std_plantnames +---------------------------------------------------------------------------- + + + CREATE SEQUENCE temptbl_std_plantnames_plantconcept_id_seq; + +CREATE TABLE temptbl_std_plantnames +( + + + + + + + + plantconcept_id integer + NOT NULL PRIMARY KEY default nextval('temptbl_std_plantnames_plantconcept_id_seq') + , + plantname varchar (255), + sciname varchar (255), + scinamenoauth varchar (255), + code varchar (255), + common varchar (255) + +); + + +---------------------------------------------------------------------------- +-- CREATE dba_tableDescription +---------------------------------------------------------------------------- + + + CREATE SEQUENCE dba_tableDescription_dba_tableDescription_ID_seq; + +CREATE TABLE dba_tableDescription +( + + + + + + + + + dba_tableDescription_ID integer + NOT NULL PRIMARY KEY default nextval('dba_tableDescription_dba_tableDescription_ID_seq') + , + tableName varchar (75), + tableLabel varchar (200), + tableNotes text, + tableDescription text, + tableKeywords text + +); + + +---------------------------------------------------------------------------- +-- CREATE dba_fieldDescription +---------------------------------------------------------------------------- + + + CREATE SEQUENCE dba_fieldDescription_dba_fieldDescription_ID_seq; + +CREATE TABLE dba_fieldDescription +( + + + + + + + + + dba_fieldDescription_ID integer + NOT NULL PRIMARY KEY default nextval('dba_fieldDescription_dba_fieldDescription_ID_seq') + , + tableName varchar (75), + fieldName varchar (75), + fieldLabel varchar (200), + fieldModel varchar (50), + fieldNulls varchar (10), + fieldType varchar (30), + fieldKey varchar (10), + fieldReferences varchar (200), + fieldList varchar (50), + fieldNotes text, + fieldDefinition text, + fieldKeywords text + +); + + +---------------------------------------------------------------------------- +-- CREATE dba_fieldList +---------------------------------------------------------------------------- + + + CREATE SEQUENCE dba_fieldList_dba_fieldList_ID_seq; + +CREATE TABLE dba_fieldList +( + + + + + + + + dba_fieldList_ID integer + NOT NULL PRIMARY KEY default nextval('dba_fieldList_dba_fieldList_ID_seq') + , + tableName varchar (75), + fieldName varchar (75), + listValue varchar (255), + listValueDescription text, + listValueSortOrder Float + +); + + +---------------------------------------------------------------------------- +-- CREATE dba_dataCache +---------------------------------------------------------------------------- + + + CREATE SEQUENCE dba_dataCache_DBA_DATACACHE_ID_seq; + +CREATE TABLE dba_dataCache +( + + + + + + + + DBA_DATACACHE_ID integer + NOT NULL PRIMARY KEY default nextval('dba_dataCache_DBA_DATACACHE_ID_seq') + , + cache_key varchar (200) NOT NULL, + cache_label varchar (200), + cache_order Float, + data1 varchar (255), + data2 varchar (255), + data3 varchar (255), + data4 varchar (255), + data5 varchar (255), + data6 varchar (255), + data7 varchar (255), + data8 varchar (255), + data9 varchar (255), + data10 varchar (255) + +); + +---------------------------------------------------------------------------- +-- ALTER commConcept +---------------------------------------------------------------------------- + + +ALTER TABLE commConcept + ADD CONSTRAINT COMMNAME_ID FOREIGN KEY ( COMMNAME_ID ) + REFERENCES commName (COMMNAME_ID); + +ALTER TABLE commConcept + ADD CONSTRAINT reference_ID FOREIGN KEY ( reference_ID ) + REFERENCES reference (reference_ID); + +---------------------------------------------------------------------------- +-- ALTER commCorrelation +---------------------------------------------------------------------------- + + +ALTER TABLE commCorrelation + ADD CONSTRAINT COMMSTATUS_ID FOREIGN KEY ( COMMSTATUS_ID ) + REFERENCES commStatus (COMMSTATUS_ID); + +ALTER TABLE commCorrelation + ADD CONSTRAINT COMMCONCEPT_ID FOREIGN KEY ( COMMCONCEPT_ID ) + REFERENCES commConcept (COMMCONCEPT_ID); + +---------------------------------------------------------------------------- +-- ALTER commLineage +---------------------------------------------------------------------------- + + +ALTER TABLE commLineage + ADD CONSTRAINT parentCommStatus_ID FOREIGN KEY ( parentCommStatus_ID ) + REFERENCES commStatus (COMMSTATUS_ID); + +ALTER TABLE commLineage + ADD CONSTRAINT childCommStatus_ID FOREIGN KEY ( childCommStatus_ID ) + REFERENCES commStatus (COMMSTATUS_ID); + +---------------------------------------------------------------------------- +-- ALTER commName +---------------------------------------------------------------------------- + + +ALTER TABLE commName + ADD CONSTRAINT reference_ID FOREIGN KEY ( reference_ID ) + REFERENCES reference (reference_ID); + +---------------------------------------------------------------------------- +-- ALTER commStatus +---------------------------------------------------------------------------- + + +ALTER TABLE commStatus + ADD CONSTRAINT COMMCONCEPT_ID FOREIGN KEY ( COMMCONCEPT_ID ) + REFERENCES commConcept (COMMCONCEPT_ID); + +ALTER TABLE commStatus + ADD CONSTRAINT reference_ID FOREIGN KEY ( reference_ID ) + REFERENCES reference (reference_ID); + +ALTER TABLE commStatus + ADD CONSTRAINT commParent_ID FOREIGN KEY ( commParent_ID ) + REFERENCES commConcept (COMMCONCEPT_ID); + +ALTER TABLE commStatus + ADD CONSTRAINT PARTY_ID FOREIGN KEY ( PARTY_ID ) + REFERENCES party (PARTY_ID); + +---------------------------------------------------------------------------- +-- ALTER commUsage +---------------------------------------------------------------------------- + + +ALTER TABLE commUsage + ADD CONSTRAINT COMMNAME_ID FOREIGN KEY ( COMMNAME_ID ) + REFERENCES commName (COMMNAME_ID); + +ALTER TABLE commUsage + ADD CONSTRAINT COMMCONCEPT_ID FOREIGN KEY ( COMMCONCEPT_ID ) + REFERENCES commConcept (COMMCONCEPT_ID); + +ALTER TABLE commUsage + ADD CONSTRAINT PARTY_ID FOREIGN KEY ( PARTY_ID ) + REFERENCES party (PARTY_ID); + +ALTER TABLE commUsage + ADD CONSTRAINT COMMSTATUS_ID FOREIGN KEY ( COMMSTATUS_ID ) + REFERENCES commStatus (COMMSTATUS_ID); + +---------------------------------------------------------------------------- +-- ALTER plantConcept +---------------------------------------------------------------------------- + + +ALTER TABLE plantConcept + ADD CONSTRAINT PLANTNAME_ID FOREIGN KEY ( PLANTNAME_ID ) + REFERENCES plantName (PLANTNAME_ID); + +ALTER TABLE plantConcept + ADD CONSTRAINT reference_ID FOREIGN KEY ( reference_ID ) + REFERENCES reference (reference_ID); + +---------------------------------------------------------------------------- +-- ALTER plantCorrelation +---------------------------------------------------------------------------- + + +ALTER TABLE plantCorrelation + ADD CONSTRAINT PLANTSTATUS_ID FOREIGN KEY ( PLANTSTATUS_ID ) + REFERENCES plantStatus (PLANTSTATUS_ID); + +ALTER TABLE plantCorrelation + ADD CONSTRAINT PLANTCONCEPT_ID FOREIGN KEY ( PLANTCONCEPT_ID ) + REFERENCES plantConcept (PLANTCONCEPT_ID); + +---------------------------------------------------------------------------- +-- ALTER plantLineage +---------------------------------------------------------------------------- + + +ALTER TABLE plantLineage + ADD CONSTRAINT childPlantStatus_ID FOREIGN KEY ( childPlantStatus_ID ) + REFERENCES plantStatus (PLANTSTATUS_ID); + +ALTER TABLE plantLineage + ADD CONSTRAINT parentPlantStatus_ID FOREIGN KEY ( parentPlantStatus_ID ) + REFERENCES plantStatus (PLANTSTATUS_ID); + +---------------------------------------------------------------------------- +-- ALTER plantName +---------------------------------------------------------------------------- + + +ALTER TABLE plantName + ADD CONSTRAINT reference_ID FOREIGN KEY ( reference_ID ) + REFERENCES reference (reference_ID); + +---------------------------------------------------------------------------- +-- ALTER plantStatus +---------------------------------------------------------------------------- + + +ALTER TABLE plantStatus + ADD CONSTRAINT PLANTCONCEPT_ID FOREIGN KEY ( PLANTCONCEPT_ID ) + REFERENCES plantConcept (PLANTCONCEPT_ID); + +ALTER TABLE plantStatus + ADD CONSTRAINT reference_ID FOREIGN KEY ( reference_ID ) + REFERENCES reference (reference_ID); + +ALTER TABLE plantStatus + ADD CONSTRAINT plantParent_ID FOREIGN KEY ( plantParent_ID ) + REFERENCES plantConcept (PLANTCONCEPT_ID); + +ALTER TABLE plantStatus + ADD CONSTRAINT PARTY_ID FOREIGN KEY ( PARTY_ID ) + REFERENCES party (PARTY_ID); + +---------------------------------------------------------------------------- +-- ALTER plantUsage +---------------------------------------------------------------------------- + + +ALTER TABLE plantUsage + ADD CONSTRAINT PLANTNAME_ID FOREIGN KEY ( PLANTNAME_ID ) + REFERENCES plantName (PLANTNAME_ID); + +ALTER TABLE plantUsage + ADD CONSTRAINT PLANTCONCEPT_ID FOREIGN KEY ( PLANTCONCEPT_ID ) + REFERENCES plantConcept (PLANTCONCEPT_ID); + +ALTER TABLE plantUsage + ADD CONSTRAINT PARTY_ID FOREIGN KEY ( PARTY_ID ) + REFERENCES party (PARTY_ID); + +ALTER TABLE plantUsage + ADD CONSTRAINT PLANTSTATUS_ID FOREIGN KEY ( PLANTSTATUS_ID ) + REFERENCES plantStatus (PLANTSTATUS_ID); + +---------------------------------------------------------------------------- +-- ALTER address +---------------------------------------------------------------------------- + + +ALTER TABLE address + ADD CONSTRAINT party_ID FOREIGN KEY ( party_ID ) + REFERENCES party (PARTY_ID); + +ALTER TABLE address + ADD CONSTRAINT organization_ID FOREIGN KEY ( organization_ID ) + REFERENCES party (PARTY_ID); + +---------------------------------------------------------------------------- +-- ALTER aux_Role +---------------------------------------------------------------------------- + + +---------------------------------------------------------------------------- +-- ALTER reference +---------------------------------------------------------------------------- + + +ALTER TABLE reference + ADD CONSTRAINT referenceJournal_ID FOREIGN KEY ( referenceJournal_ID ) + REFERENCES referenceJournal (referenceJournal_ID); + +---------------------------------------------------------------------------- +-- ALTER referenceAltIdent +---------------------------------------------------------------------------- + + +ALTER TABLE referenceAltIdent + ADD CONSTRAINT reference_ID FOREIGN KEY ( reference_ID ) + REFERENCES reference (reference_ID); + +---------------------------------------------------------------------------- +-- ALTER referenceContributor +---------------------------------------------------------------------------- + + +ALTER TABLE referenceContributor + ADD CONSTRAINT reference_ID FOREIGN KEY ( reference_ID ) + REFERENCES reference (reference_ID); + +ALTER TABLE referenceContributor + ADD CONSTRAINT referenceParty_ID FOREIGN KEY ( referenceParty_ID ) + REFERENCES referenceParty (referenceParty_ID); + +---------------------------------------------------------------------------- +-- ALTER referenceParty +---------------------------------------------------------------------------- + + +ALTER TABLE referenceParty + ADD CONSTRAINT currentParty_ID FOREIGN KEY ( currentParty_ID ) + REFERENCES referenceParty (referenceParty_ID); + +---------------------------------------------------------------------------- +-- ALTER referenceJournal +---------------------------------------------------------------------------- + + +---------------------------------------------------------------------------- +-- ALTER classContributor +---------------------------------------------------------------------------- + + +ALTER TABLE classContributor + ADD CONSTRAINT COMMCLASS_ID FOREIGN KEY ( COMMCLASS_ID ) + REFERENCES commClass (COMMCLASS_ID); + +ALTER TABLE classContributor + ADD CONSTRAINT PARTY_ID FOREIGN KEY ( PARTY_ID ) + REFERENCES party (PARTY_ID); + +ALTER TABLE classContributor + ADD CONSTRAINT ROLE_ID FOREIGN KEY ( ROLE_ID ) + REFERENCES aux_Role (ROLE_ID); + +---------------------------------------------------------------------------- +-- ALTER commClass +---------------------------------------------------------------------------- + + +ALTER TABLE commClass + ADD CONSTRAINT OBSERVATION_ID FOREIGN KEY ( OBSERVATION_ID ) + REFERENCES observation (OBSERVATION_ID); + +ALTER TABLE commClass + ADD CONSTRAINT classPublication_ID FOREIGN KEY ( classPublication_ID ) + REFERENCES reference (reference_ID); + +---------------------------------------------------------------------------- +-- ALTER commInterpretation +---------------------------------------------------------------------------- + + +ALTER TABLE commInterpretation + ADD CONSTRAINT COMMCLASS_ID FOREIGN KEY ( COMMCLASS_ID ) + REFERENCES commClass (COMMCLASS_ID); + +ALTER TABLE commInterpretation + ADD CONSTRAINT COMMCONCEPT_ID FOREIGN KEY ( COMMCONCEPT_ID ) + REFERENCES commConcept (COMMCONCEPT_ID); + +ALTER TABLE commInterpretation + ADD CONSTRAINT commAuthority_ID FOREIGN KEY ( commAuthority_ID ) + REFERENCES reference (reference_ID); + +---------------------------------------------------------------------------- +-- ALTER coverIndex +---------------------------------------------------------------------------- + + +ALTER TABLE coverIndex + ADD CONSTRAINT COVERMETHOD_ID FOREIGN KEY ( COVERMETHOD_ID ) + REFERENCES coverMethod (COVERMETHOD_ID); + +---------------------------------------------------------------------------- +-- ALTER coverMethod +---------------------------------------------------------------------------- + + +ALTER TABLE coverMethod + ADD CONSTRAINT reference_ID FOREIGN KEY ( reference_ID ) + REFERENCES reference (reference_ID); + +---------------------------------------------------------------------------- +-- ALTER definedValue +---------------------------------------------------------------------------- + + +ALTER TABLE definedValue + ADD CONSTRAINT USERDEFINED_ID FOREIGN KEY ( USERDEFINED_ID ) + REFERENCES userDefined (USERDEFINED_ID); + +---------------------------------------------------------------------------- +-- ALTER disturbanceObs +---------------------------------------------------------------------------- + + +ALTER TABLE disturbanceObs + ADD CONSTRAINT OBSERVATION_ID FOREIGN KEY ( OBSERVATION_ID ) + REFERENCES observation (OBSERVATION_ID); + +---------------------------------------------------------------------------- +-- ALTER graphic +---------------------------------------------------------------------------- + + +ALTER TABLE graphic + ADD CONSTRAINT OBSERVATION_ID FOREIGN KEY ( OBSERVATION_ID ) + REFERENCES observation (OBSERVATION_ID); + +---------------------------------------------------------------------------- +-- ALTER namedPlace +---------------------------------------------------------------------------- + + +ALTER TABLE namedPlace + ADD CONSTRAINT reference_ID FOREIGN KEY ( reference_ID ) + REFERENCES reference (reference_ID); + +---------------------------------------------------------------------------- +-- ALTER namedPlaceCorrelation +---------------------------------------------------------------------------- + + +ALTER TABLE namedPlaceCorrelation + ADD CONSTRAINT PARENTPLACE_ID FOREIGN KEY ( PARENTPLACE_ID ) + REFERENCES namedPlace (NAMEDPLACE_ID); + +ALTER TABLE namedPlaceCorrelation + ADD CONSTRAINT CHILDPLACE_ID FOREIGN KEY ( CHILDPLACE_ID ) + REFERENCES namedPlace (NAMEDPLACE_ID); + +---------------------------------------------------------------------------- +-- ALTER note +---------------------------------------------------------------------------- + + +ALTER TABLE note + ADD CONSTRAINT NOTELINK_ID FOREIGN KEY ( NOTELINK_ID ) + REFERENCES noteLink (NOTELINK_ID); + +ALTER TABLE note + ADD CONSTRAINT PARTY_ID FOREIGN KEY ( PARTY_ID ) + REFERENCES party (PARTY_ID); + +ALTER TABLE note + ADD CONSTRAINT ROLE_ID FOREIGN KEY ( ROLE_ID ) + REFERENCES aux_Role (ROLE_ID); + +---------------------------------------------------------------------------- +-- ALTER noteLink +---------------------------------------------------------------------------- + + +---------------------------------------------------------------------------- +-- ALTER observation +---------------------------------------------------------------------------- + + +ALTER TABLE observation + ADD CONSTRAINT PREVIOUSOBS_ID FOREIGN KEY ( PREVIOUSOBS_ID ) + REFERENCES observation (OBSERVATION_ID); + +ALTER TABLE observation + ADD CONSTRAINT PLOT_ID FOREIGN KEY ( PLOT_ID ) + REFERENCES plot (PLOT_ID); + +ALTER TABLE observation + ADD CONSTRAINT PROJECT_ID FOREIGN KEY ( PROJECT_ID ) + REFERENCES project (PROJECT_ID); + +ALTER TABLE observation + ADD CONSTRAINT COVERMETHOD_ID FOREIGN KEY ( COVERMETHOD_ID ) + REFERENCES coverMethod (COVERMETHOD_ID); + +ALTER TABLE observation + ADD CONSTRAINT STRATUMMETHOD_ID FOREIGN KEY ( STRATUMMETHOD_ID ) + REFERENCES stratumMethod (STRATUMMETHOD_ID); + +ALTER TABLE observation + ADD CONSTRAINT SOILTAXON_ID FOREIGN KEY ( SOILTAXON_ID ) + REFERENCES soilTaxon (SOILTAXON_ID); + +---------------------------------------------------------------------------- +-- ALTER observationContributor +---------------------------------------------------------------------------- + + +ALTER TABLE observationContributor + ADD CONSTRAINT OBSERVATION_ID FOREIGN KEY ( OBSERVATION_ID ) + REFERENCES observation (OBSERVATION_ID); + +ALTER TABLE observationContributor + ADD CONSTRAINT PARTY_ID FOREIGN KEY ( PARTY_ID ) + REFERENCES party (PARTY_ID); + +ALTER TABLE observationContributor + ADD CONSTRAINT ROLE_ID FOREIGN KEY ( ROLE_ID ) + REFERENCES aux_Role (ROLE_ID); + +---------------------------------------------------------------------------- +-- ALTER observationSynonym +---------------------------------------------------------------------------- + + +ALTER TABLE observationSynonym + ADD CONSTRAINT synonymObservation_ID FOREIGN KEY ( synonymObservation_ID ) + REFERENCES observation (OBSERVATION_ID); + +ALTER TABLE observationSynonym + ADD CONSTRAINT primaryObservation_ID FOREIGN KEY ( primaryObservation_ID ) + REFERENCES observation (OBSERVATION_ID); + +ALTER TABLE observationSynonym + ADD CONSTRAINT PARTY_ID FOREIGN KEY ( PARTY_ID ) + REFERENCES party (PARTY_ID); + +ALTER TABLE observationSynonym + ADD CONSTRAINT ROLE_ID FOREIGN KEY ( ROLE_ID ) + REFERENCES aux_Role (ROLE_ID); + +---------------------------------------------------------------------------- +-- ALTER party +---------------------------------------------------------------------------- + + +ALTER TABLE party + ADD CONSTRAINT currentName_ID FOREIGN KEY ( currentName_ID ) + REFERENCES party (PARTY_ID); + +---------------------------------------------------------------------------- +-- ALTER partyMember +---------------------------------------------------------------------------- + + +ALTER TABLE partyMember + ADD CONSTRAINT parentParty_ID FOREIGN KEY ( parentParty_ID ) + REFERENCES party (PARTY_ID); + +ALTER TABLE partyMember + ADD CONSTRAINT childParty_ID FOREIGN KEY ( childParty_ID ) + REFERENCES party (PARTY_ID); + +ALTER TABLE partyMember + ADD CONSTRAINT role_ID FOREIGN KEY ( role_ID ) + REFERENCES aux_Role (ROLE_ID); + +---------------------------------------------------------------------------- +-- ALTER place +---------------------------------------------------------------------------- + + +ALTER TABLE place + ADD CONSTRAINT PLOT_ID FOREIGN KEY ( PLOT_ID ) + REFERENCES plot (PLOT_ID); + +ALTER TABLE place + ADD CONSTRAINT NAMEDPLACE_ID FOREIGN KEY ( NAMEDPLACE_ID ) + REFERENCES namedPlace (NAMEDPLACE_ID); + +---------------------------------------------------------------------------- +-- ALTER plot +---------------------------------------------------------------------------- + + +ALTER TABLE plot + ADD CONSTRAINT reference_ID FOREIGN KEY ( reference_ID ) + REFERENCES reference (reference_ID); + +ALTER TABLE plot + ADD CONSTRAINT PARENT_ID FOREIGN KEY ( PARENT_ID ) + REFERENCES plot (PLOT_ID); + +---------------------------------------------------------------------------- +-- ALTER project +---------------------------------------------------------------------------- + + +---------------------------------------------------------------------------- +-- ALTER projectContributor +---------------------------------------------------------------------------- + + +ALTER TABLE projectContributor + ADD CONSTRAINT PROJECT_ID FOREIGN KEY ( PROJECT_ID ) + REFERENCES project (PROJECT_ID); + +ALTER TABLE projectContributor + ADD CONSTRAINT PARTY_ID FOREIGN KEY ( PARTY_ID ) + REFERENCES party (PARTY_ID); + +ALTER TABLE projectContributor + ADD CONSTRAINT ROLE_ID FOREIGN KEY ( ROLE_ID ) + REFERENCES aux_Role (ROLE_ID); + +---------------------------------------------------------------------------- +-- ALTER revision +---------------------------------------------------------------------------- + + +ALTER TABLE revision + ADD CONSTRAINT previousRevision_ID FOREIGN KEY ( previousRevision_ID ) + REFERENCES revision (REVISION_ID); + +---------------------------------------------------------------------------- +-- ALTER soilObs +---------------------------------------------------------------------------- + + +ALTER TABLE soilObs + ADD CONSTRAINT OBSERVATION_ID FOREIGN KEY ( OBSERVATION_ID ) + REFERENCES observation (OBSERVATION_ID); + +---------------------------------------------------------------------------- +-- ALTER soilTaxon +---------------------------------------------------------------------------- + + +ALTER TABLE soilTaxon + ADD CONSTRAINT SOILPARENT_ID FOREIGN KEY ( SOILPARENT_ID ) + REFERENCES soilTaxon (SOILTAXON_ID); + +---------------------------------------------------------------------------- +-- ALTER stemCount +---------------------------------------------------------------------------- + + +ALTER TABLE stemCount + ADD CONSTRAINT TAXONIMPORTANCE_ID FOREIGN KEY ( TAXONIMPORTANCE_ID ) + REFERENCES taxonImportance (taxonImportance_ID); + +---------------------------------------------------------------------------- +-- ALTER stemLocation +---------------------------------------------------------------------------- + + +ALTER TABLE stemLocation + ADD CONSTRAINT STEMCOUNT_ID FOREIGN KEY ( STEMCOUNT_ID ) + REFERENCES stemCount (STEMCOUNT_ID); + +---------------------------------------------------------------------------- +-- ALTER stratum +---------------------------------------------------------------------------- + + +ALTER TABLE stratum + ADD CONSTRAINT OBSERVATION_ID FOREIGN KEY ( OBSERVATION_ID ) + REFERENCES observation (OBSERVATION_ID); + +ALTER TABLE stratum + ADD CONSTRAINT STRATUMTYPE_ID FOREIGN KEY ( STRATUMTYPE_ID ) + REFERENCES stratumType (STRATUMTYPE_ID); + +ALTER TABLE stratum + ADD CONSTRAINT STRATUMMETHOD_ID FOREIGN KEY ( STRATUMMETHOD_ID ) + REFERENCES stratumMethod (STRATUMMETHOD_ID); + +---------------------------------------------------------------------------- +-- ALTER stratumMethod +---------------------------------------------------------------------------- + + +ALTER TABLE stratumMethod + ADD CONSTRAINT reference_ID FOREIGN KEY ( reference_ID ) + REFERENCES reference (reference_ID); + +---------------------------------------------------------------------------- +-- ALTER stratumType +---------------------------------------------------------------------------- + + +ALTER TABLE stratumType + ADD CONSTRAINT STRATUMMETHOD_ID FOREIGN KEY ( STRATUMMETHOD_ID ) + REFERENCES stratumMethod (STRATUMMETHOD_ID); + +---------------------------------------------------------------------------- +-- ALTER taxonImportance +---------------------------------------------------------------------------- + + +ALTER TABLE taxonImportance + ADD CONSTRAINT taxonObservation_ID FOREIGN KEY ( taxonObservation_ID ) + REFERENCES taxonObservation (TAXONOBSERVATION_ID); + +ALTER TABLE taxonImportance + ADD CONSTRAINT stratum_ID FOREIGN KEY ( stratum_ID ) + REFERENCES stratum (STRATUM_ID); + +---------------------------------------------------------------------------- +-- ALTER taxonInterpretation +---------------------------------------------------------------------------- + + +ALTER TABLE taxonInterpretation + ADD CONSTRAINT TAXONOBSERVATION_ID FOREIGN KEY ( TAXONOBSERVATION_ID ) + REFERENCES taxonObservation (TAXONOBSERVATION_ID); + +ALTER TABLE taxonInterpretation + ADD CONSTRAINT stemLocation_ID FOREIGN KEY ( stemLocation_ID ) + REFERENCES stemLocation (STEMLOCATION_ID); + +ALTER TABLE taxonInterpretation + ADD CONSTRAINT PLANTCONCEPT_ID FOREIGN KEY ( PLANTCONCEPT_ID ) + REFERENCES plantConcept (PLANTCONCEPT_ID); + +ALTER TABLE taxonInterpretation + ADD CONSTRAINT PLANTNAME_ID FOREIGN KEY ( PLANTNAME_ID ) + REFERENCES plantName (PLANTNAME_ID); + +ALTER TABLE taxonInterpretation + ADD CONSTRAINT PARTY_ID FOREIGN KEY ( PARTY_ID ) + REFERENCES party (PARTY_ID); + +ALTER TABLE taxonInterpretation + ADD CONSTRAINT ROLE_ID FOREIGN KEY ( ROLE_ID ) + REFERENCES aux_Role (ROLE_ID); + +ALTER TABLE taxonInterpretation + ADD CONSTRAINT reference_ID FOREIGN KEY ( reference_ID ) + REFERENCES reference (reference_ID); + +ALTER TABLE taxonInterpretation + ADD CONSTRAINT collector_ID FOREIGN KEY ( collector_ID ) + REFERENCES party (PARTY_ID); + +ALTER TABLE taxonInterpretation + ADD CONSTRAINT museum_ID FOREIGN KEY ( museum_ID ) + REFERENCES party (PARTY_ID); + +---------------------------------------------------------------------------- +-- ALTER taxonObservation +---------------------------------------------------------------------------- + + +ALTER TABLE taxonObservation + ADD CONSTRAINT OBSERVATION_ID FOREIGN KEY ( OBSERVATION_ID ) + REFERENCES observation (OBSERVATION_ID); + +ALTER TABLE taxonObservation + ADD CONSTRAINT reference_ID FOREIGN KEY ( reference_ID ) + REFERENCES reference (reference_ID); + +---------------------------------------------------------------------------- +-- ALTER taxonAlt +---------------------------------------------------------------------------- + + +ALTER TABLE taxonAlt + ADD CONSTRAINT taxonInterpretation_ID FOREIGN KEY ( taxonInterpretation_ID ) + REFERENCES taxonInterpretation (TAXONINTERPRETATION_ID); + +ALTER TABLE taxonAlt + ADD CONSTRAINT plantConcept_ID FOREIGN KEY ( plantConcept_ID ) + REFERENCES plantConcept (PLANTCONCEPT_ID); + +---------------------------------------------------------------------------- +-- ALTER telephone +---------------------------------------------------------------------------- + + +ALTER TABLE telephone + ADD CONSTRAINT PARTY_ID FOREIGN KEY ( PARTY_ID ) + REFERENCES party (PARTY_ID); + +---------------------------------------------------------------------------- +-- ALTER userDefined +---------------------------------------------------------------------------- + + +---------------------------------------------------------------------------- +-- ALTER embargo +---------------------------------------------------------------------------- + + +ALTER TABLE embargo + ADD CONSTRAINT plot_ID FOREIGN KEY ( plot_ID ) + REFERENCES plot (PLOT_ID); + +---------------------------------------------------------------------------- +-- ALTER usr +---------------------------------------------------------------------------- + + +ALTER TABLE usr + ADD CONSTRAINT party_ID FOREIGN KEY ( party_ID ) + REFERENCES party (PARTY_ID); + +---------------------------------------------------------------------------- +-- ALTER userCertification +---------------------------------------------------------------------------- + + +ALTER TABLE userCertification + ADD CONSTRAINT usr_ID FOREIGN KEY ( usr_ID ) + REFERENCES usr (usr_ID); + +---------------------------------------------------------------------------- +-- ALTER userRegionalExp +---------------------------------------------------------------------------- + + +ALTER TABLE userRegionalExp + ADD CONSTRAINT userCertification_ID FOREIGN KEY ( userCertification_ID ) + REFERENCES userCertification (userCertification_ID); + +---------------------------------------------------------------------------- +-- ALTER userDataset +---------------------------------------------------------------------------- + + +ALTER TABLE userDataset + ADD CONSTRAINT usr_ID FOREIGN KEY ( usr_ID ) + REFERENCES usr (usr_ID); + +---------------------------------------------------------------------------- +-- ALTER userDatasetItem +---------------------------------------------------------------------------- + + +ALTER TABLE userDatasetItem + ADD CONSTRAINT userDataset_ID FOREIGN KEY ( userDataset_ID ) + REFERENCES userDataset (userDataset_ID); + +---------------------------------------------------------------------------- +-- ALTER userNotify +---------------------------------------------------------------------------- + + +ALTER TABLE userNotify + ADD CONSTRAINT usr_ID FOREIGN KEY ( usr_ID ) + REFERENCES usr (usr_ID); + +---------------------------------------------------------------------------- +-- ALTER userPermission +---------------------------------------------------------------------------- + + +ALTER TABLE userPermission + ADD CONSTRAINT embargo_ID FOREIGN KEY ( embargo_ID ) + REFERENCES embargo (embargo_ID); + +ALTER TABLE userPermission + ADD CONSTRAINT usr_ID FOREIGN KEY ( usr_ID ) + REFERENCES usr (usr_ID); + +---------------------------------------------------------------------------- +-- ALTER userQuery +---------------------------------------------------------------------------- + + +ALTER TABLE userQuery + ADD CONSTRAINT usr_ID FOREIGN KEY ( usr_ID ) + REFERENCES usr (usr_ID); + +---------------------------------------------------------------------------- +-- ALTER userPreference +---------------------------------------------------------------------------- + + +ALTER TABLE userPreference + ADD CONSTRAINT usr_ID FOREIGN KEY ( usr_ID ) + REFERENCES usr (usr_ID); + +---------------------------------------------------------------------------- +-- ALTER userRecordOwner +---------------------------------------------------------------------------- + + +ALTER TABLE userRecordOwner + ADD CONSTRAINT usr_ID FOREIGN KEY ( usr_ID ) + REFERENCES usr (usr_ID); + +---------------------------------------------------------------------------- +-- ALTER keywords +---------------------------------------------------------------------------- + + +---------------------------------------------------------------------------- +-- ALTER keywords_extra +---------------------------------------------------------------------------- + + +---------------------------------------------------------------------------- +-- ALTER dba_confidentialitystatus +---------------------------------------------------------------------------- + + +---------------------------------------------------------------------------- +-- ALTER dba_cookie +---------------------------------------------------------------------------- + + +---------------------------------------------------------------------------- +-- ALTER dba_cookielabels +---------------------------------------------------------------------------- + + +---------------------------------------------------------------------------- +-- ALTER dba_dbstatstime +---------------------------------------------------------------------------- + + +---------------------------------------------------------------------------- +-- ALTER dba_preassignacccode +---------------------------------------------------------------------------- + + +---------------------------------------------------------------------------- +-- ALTER dba_onerow +---------------------------------------------------------------------------- + + +---------------------------------------------------------------------------- +-- ALTER dba_datamodelversion +---------------------------------------------------------------------------- + + +---------------------------------------------------------------------------- +-- ALTER dba_xmlCache +---------------------------------------------------------------------------- + + +---------------------------------------------------------------------------- +-- ALTER temptbl_std_commnames +---------------------------------------------------------------------------- + + +---------------------------------------------------------------------------- +-- ALTER temptbl_std_plantnames +---------------------------------------------------------------------------- + + +---------------------------------------------------------------------------- +-- ALTER dba_tableDescription +---------------------------------------------------------------------------- + + +---------------------------------------------------------------------------- +-- ALTER dba_fieldDescription +---------------------------------------------------------------------------- + + +---------------------------------------------------------------------------- +-- ALTER dba_fieldList +---------------------------------------------------------------------------- + + +---------------------------------------------------------------------------- +-- ALTER dba_dataCache +---------------------------------------------------------------------------- + + + --CREATE ANY NAMED SEQUENCES: + -- + + + CREATE SEQUENCE dba_preassignacccode_dba_requestnumber_seq ; + + \ No newline at end of file diff --git a/migrations/1_create_aggregrates.sql b/migrations/1_create_aggregrates.sql new file mode 100644 index 0000000..d78d62a --- /dev/null +++ b/migrations/1_create_aggregrates.sql @@ -0,0 +1,6 @@ +CREATE AGGREGATE concat ( + BASETYPE = text, + SFUNC = textcat, + STYPE = text, + INITCOND = '' + ); diff --git a/migrations/2_create_extras.sql b/migrations/2_create_extras.sql new file mode 100644 index 0000000..f9fdc8f --- /dev/null +++ b/migrations/2_create_extras.sql @@ -0,0 +1,8 @@ +-- $Id: create_extras.sql,v 1.6 2006-06-29 04:27:16 mlee Exp $ +-- +-- Runs extra SQL on the data model after it is created to make things as they need to be +-- CHIEFLY default values and extra things like custom sequences +-- POPULATION of tables is NOT handled here, neither are triggers +-- NO TABLES ARE CREATED HERE -- they should all be created from db_model_vegbank.xml ! + +-- default values moved to main db model document, as were sequences, so there's nothing left that's needed here. \ No newline at end of file diff --git a/migrations/3_createIndices.sql b/migrations/3_createIndices.sql new file mode 100644 index 0000000..6b30a09 --- /dev/null +++ b/migrations/3_createIndices.sql @@ -0,0 +1,518 @@ + +-- Create indexes for vegbank. drops them before adding them. +-- The db needs to be vacummed and analyzed before any impact .e.g. "vacuumdb -z -f vegbank" +-- Those commented with a -- t mean that they are tested and work in our favor + +-- plantusage + +DROP INDEX plantusage_plantname_x ; +CREATE INDEX plantusage_plantname_x on plantusage ( plantname ); -- t +DROP INDEX plantusage_plantname_id_x ; +CREATE INDEX plantusage_plantname_id_x on plantusage ( plantname_id ); -- t +DROP INDEX plantusage_plantconcept_id_x ; +CREATE INDEX plantusage_plantconcept_id_x on plantusage ( plantconcept_id ); -- t +DROP INDEX plantusage_classsystem_x ; +CREATE INDEX plantusage_classsystem_x on plantusage ( classsystem ); -- t +DROP INDEX plantusage_party_id_x ; +CREATE INDEX plantusage_party_id_x ON plantusage (party_id); +DROP INDEX plantusage_plantstatus_id_x ; +CREATE INDEX plantusage_plantstatus_id_x ON plantusage (plantstatus_id); + +-- plantname +DROP INDEX plantname_plantname_x ; +CREATE INDEX plantname_plantname_x on plantname ( plantname ); -- t +DROP INDEX plantname_reference_id_x ; +CREATE INDEX plantname_reference_id_x ON plantname (reference_id); + +-- plantconcept +DROP INDEX plantconcept_plantname_id_x ; +CREATE INDEX plantconcept_plantname_id_x on plantconcept ( plantname_id ); -- t +DROP INDEX plantconcept_reference_id_x ; +CREATE INDEX plantconcept_reference_id_x ON plantconcept (reference_id); + +DROP INDEX plantconcept_dobscount_x ; +CREATE INDEX plantconcept_dobscount_x ON plantconcept (d_obscount); + + +-- plantstatus +DROP INDEX plantstatus_plantlevel_x ; +CREATE INDEX plantstatus_plantlevel_x ON plantstatus (plantlevel); -- t +DROP INDEX plantstatus_plantconcept_id_x ; +CREATE INDEX plantstatus_plantconcept_id_x ON plantstatus (plantconcept_id); -- t +DROP INDEX plantstatus_reference_id_x ; +CREATE INDEX plantstatus_reference_id_x ON plantstatus (reference_id); +DROP INDEX plantstatus_plantparent_id_x ; +CREATE INDEX plantstatus_plantparent_id_x ON plantstatus (plantparent_id); +DROP INDEX plantstatus_party_id_x ; +CREATE INDEX plantstatus_party_id_x ON plantstatus (party_id); + +-- userregionalexp +DROP INDEX userregionalexp_usercertification_id_x ; +CREATE INDEX userregionalexp_usercertification_id_x ON userregionalexp (usercertification_id); + +-- userdatasetitem +DROP INDEX userdatasetitem_userdataset_id_x ; +CREATE INDEX userdatasetitem_userdataset_id_x ON userdatasetitem (userdataset_id); + +-- userdataset +DROP INDEX userdataset_usr_id_x ; +CREATE INDEX userdataset_usr_id_x ON userdataset (usr_id); + +-- usernotify +DROP INDEX usernotify_usr_id_x ; +CREATE INDEX usernotify_usr_id_x ON usernotify (usr_id); + +-- embargo +DROP INDEX embargo_plot_id_x ; +CREATE INDEX embargo_plot_id_x ON embargo (plot_id); + +-- userpermission +DROP INDEX userpermission_embargo_id_x ; +CREATE INDEX userpermission_embargo_id_x ON userpermission (embargo_id); +DROP INDEX userpermission_usr_id_x ; +CREATE INDEX userpermission_usr_id_x ON userpermission (usr_id); + +-- userquery +DROP INDEX userquery_usr_id_x ; +CREATE INDEX userquery_usr_id_x ON userquery (usr_id); + +-- userpreference +DROP INDEX userpreference_usr_id_x ; +CREATE INDEX userpreference_usr_id_x ON userpreference (usr_id); + +-- userrecordowner +DROP INDEX userrecordowner_usr_id_x ; +CREATE INDEX userrecordowner_usr_id_x ON userrecordowner (usr_id); + +-- usr +DROP INDEX usr_party_id_x ; +CREATE INDEX usr_party_id_x ON usr (party_id); + +-- aux_role + +-- covermethod +DROP INDEX covermethod_reference_id_x ; +CREATE INDEX covermethod_reference_id_x ON covermethod (reference_id); + +-- stratummethod +DROP INDEX stratummethod_reference_id_x ; +CREATE INDEX stratummethod_reference_id_x ON stratummethod (reference_id); + +-- usercertification +DROP INDEX usercertification_usr_id_x ; +CREATE INDEX usercertification_usr_id_x ON usercertification (usr_id); + +-- stratum +DROP INDEX stratum_observation_id_x ; +CREATE INDEX stratum_observation_id_x ON stratum (observation_id); +DROP INDEX stratum_stratumtype_id_x ; +CREATE INDEX stratum_stratumtype_id_x ON stratum (stratumtype_id); +DROP INDEX stratum_stratummethod_id_x ; +CREATE INDEX stratum_stratummethod_id_x ON stratum (stratummethod_id); + +-- stemlocation +DROP INDEX stemlocation_stemcount_id_x ; +CREATE INDEX stemlocation_stemcount_id_x ON stemlocation (stemcount_id); + + +-- observation +DROP INDEX observation_previousobs_id_x ; +CREATE INDEX observation_previousobs_id_x ON observation (previousobs_id); +DROP INDEX observation_previousobs_id_x ; +CREATE INDEX observation_previousobs_id_x ON observation (previousobs_id); +DROP INDEX observation_previousobs_id_x ; +CREATE INDEX observation_previousobs_id_x ON observation (previousobs_id); +DROP INDEX observation_plot_id_x ; +CREATE INDEX observation_plot_id_x ON observation (plot_id); +DROP INDEX observation_project_id_x ; +CREATE INDEX observation_project_id_x ON observation (project_id); +DROP INDEX observation_covermethod_id_x ; +CREATE INDEX observation_covermethod_id_x ON observation (covermethod_id); +DROP INDEX observation_stratummethod_id_x ; +CREATE INDEX observation_stratummethod_id_x ON observation (stratummethod_id); +DROP INDEX observation_soiltaxon_id_x ; +CREATE INDEX observation_soiltaxon_id_x ON observation (soiltaxon_id); + +-- taxonobservation +DROP INDEX taxonobservation_observation_id_x ; +CREATE INDEX taxonobservation_observation_id_x ON taxonobservation (observation_id); +DROP INDEX taxonobservation_reference_id_x ; +CREATE INDEX taxonobservation_reference_id_x ON taxonobservation (reference_id); + +-- reference +DROP INDEX reference_referencejournal_id_x ; +CREATE INDEX reference_referencejournal_id_x ON reference (referencejournal_id); + +-- taxoninterpretation +DROP INDEX taxoninterpretation_taxonobservation_id_x ; +CREATE INDEX taxoninterpretation_taxonobservation_id_x ON taxoninterpretation (taxonobservation_id); +DROP INDEX taxoninterpretation_stemlocation_id_x ; +CREATE INDEX taxoninterpretation_stemlocation_id_x ON taxoninterpretation (stemlocation_id); +DROP INDEX taxoninterpretation_plantconcept_id_x ; +CREATE INDEX taxoninterpretation_plantconcept_id_x ON taxoninterpretation (plantconcept_id); +DROP INDEX taxoninterpretation_plantname_id_x ; +CREATE INDEX taxoninterpretation_plantname_id_x ON taxoninterpretation (plantname_id); +DROP INDEX taxoninterpretation_party_id_x ; +CREATE INDEX taxoninterpretation_party_id_x ON taxoninterpretation (party_id); +DROP INDEX taxoninterpretation_role_id_x ; +CREATE INDEX taxoninterpretation_role_id_x ON taxoninterpretation (role_id); +DROP INDEX taxoninterpretation_reference_id_x ; +CREATE INDEX taxoninterpretation_reference_id_x ON taxoninterpretation (reference_id); +DROP INDEX taxoninterpretation_collector_id_x ; +CREATE INDEX taxoninterpretation_collector_id_x ON taxoninterpretation (collector_id); +DROP INDEX taxoninterpretation_museum_id_x ; +CREATE INDEX taxoninterpretation_museum_id_x ON taxoninterpretation (museum_id); + +-- taxonalt +DROP INDEX taxonalt_taxoninterpretation_id_x ; +CREATE INDEX taxonalt_taxoninterpretation_id_x ON taxonalt (taxoninterpretation_id); +DROP INDEX taxonalt_plantconcept_id_x ; +CREATE INDEX taxonalt_plantconcept_id_x ON taxonalt (plantconcept_id); + + +-- telephone +DROP INDEX telephone_party_id_x ; +CREATE INDEX telephone_party_id_x ON telephone (party_id); + +-- plot +DROP INDEX plot_reference_id_x ; +CREATE INDEX plot_reference_id_x ON plot (reference_id); +DROP INDEX plot_parent_id_x ; +CREATE INDEX plot_parent_id_x ON plot (parent_id); +DROP INDEX plot_parent_id_x ; +CREATE INDEX plot_parent_id_x ON plot (parent_id); +DROP INDEX plot_parent_id_x ; +CREATE INDEX plot_parent_id_x ON plot (parent_id); + +-- party +DROP INDEX party_currentname_id_x ; +CREATE INDEX party_currentname_id_x ON party (currentname_id); +DROP INDEX party_currentname_id_x ; +CREATE INDEX party_currentname_id_x ON party (currentname_id); +DROP INDEX party_currentname_id_x ; +CREATE INDEX party_currentname_id_x ON party (currentname_id); + +-- place +DROP INDEX place_plot_id_x ; +CREATE INDEX place_plot_id_x ON place (plot_id); +DROP INDEX place_namedplace_id_x ; +CREATE INDEX place_namedplace_id_x ON place (namedplace_id); + +-- namedplace +DROP INDEX namedplace_reference_id_x ; +CREATE INDEX namedplace_reference_id_x ON namedplace (reference_id); + +-- project + +-- projectcontributor +DROP INDEX projectcontributor_project_id_x ; +CREATE INDEX projectcontributor_project_id_x ON projectcontributor (project_id); +DROP INDEX projectcontributor_party_id_x ; +CREATE INDEX projectcontributor_party_id_x ON projectcontributor (party_id); +DROP INDEX projectcontributor_role_id_x ; +CREATE INDEX projectcontributor_role_id_x ON projectcontributor (role_id); + +-- revision +DROP INDEX revision_previousrevision_id_x ; +CREATE INDEX revision_previousrevision_id_x ON revision (previousrevision_id); +DROP INDEX revision_previousrevision_id_x ; +CREATE INDEX revision_previousrevision_id_x ON revision (previousrevision_id); +DROP INDEX revision_previousrevision_id_x ; +CREATE INDEX revision_previousrevision_id_x ON revision (previousrevision_id); + +-- soilobs +DROP INDEX soilobs_observation_id_x ; +CREATE INDEX soilobs_observation_id_x ON soilobs (observation_id); + +-- soiltaxon +DROP INDEX soiltaxon_soilparent_id_x ; +CREATE INDEX soiltaxon_soilparent_id_x ON soiltaxon (soilparent_id); +DROP INDEX soiltaxon_soilparent_id_x ; +CREATE INDEX soiltaxon_soilparent_id_x ON soiltaxon (soilparent_id); +DROP INDEX soiltaxon_soilparent_id_x ; +CREATE INDEX soiltaxon_soilparent_id_x ON soiltaxon (soilparent_id); + +-- stemcount +DROP INDEX stemcount_taxonimportance_id_x ; +CREATE INDEX stemcount_taxonimportance_id_x ON stemcount (taxonimportance_id); + +-- stratumtype +DROP INDEX stratumtype_stratummethod_id_x ; +CREATE INDEX stratumtype_stratummethod_id_x ON stratumtype (stratummethod_id); + +-- taxonimportance +DROP INDEX taxonimportance_taxonobservation_id_x ; +CREATE INDEX taxonimportance_taxonobservation_id_x ON taxonimportance (taxonobservation_id); +DROP INDEX taxonimportance_stratum_id_x ; +CREATE INDEX taxonimportance_stratum_id_x ON taxonimportance (stratum_id); + +-- observationcontributor +DROP INDEX observationcontributor_observation_id_x ; +CREATE INDEX observationcontributor_observation_id_x ON observationcontributor (observation_id); +DROP INDEX observationcontributor_party_id_x ; +CREATE INDEX observationcontributor_party_id_x ON observationcontributor (party_id); +DROP INDEX observationcontributor_role_id_x ; +CREATE INDEX observationcontributor_role_id_x ON observationcontributor (role_id); + +-- observationsynonym +DROP INDEX observationsynonym_synonymobservation_id_x ; +CREATE INDEX observationsynonym_synonymobservation_id_x ON observationsynonym (synonymobservation_id); +DROP INDEX observationsynonym_primaryobservation_id_x ; +CREATE INDEX observationsynonym_primaryobservation_id_x ON observationsynonym (primaryobservation_id); +DROP INDEX observationsynonym_party_id_x ; +CREATE INDEX observationsynonym_party_id_x ON observationsynonym (party_id); +DROP INDEX observationsynonym_role_id_x ; +CREATE INDEX observationsynonym_role_id_x ON observationsynonym (role_id); + +-- partymember +DROP INDEX partymember_parentparty_id_x ; +CREATE INDEX partymember_parentparty_id_x ON partymember (parentparty_id); +DROP INDEX partymember_childparty_id_x ; +CREATE INDEX partymember_childparty_id_x ON partymember (childparty_id); +DROP INDEX partymember_role_id_x ; +CREATE INDEX partymember_role_id_x ON partymember (role_id); + +-- referenceparty +DROP INDEX referenceparty_currentparty_id_x ; +CREATE INDEX referenceparty_currentparty_id_x ON referenceparty (currentparty_id); +DROP INDEX referenceparty_currentparty_id_x ; +CREATE INDEX referenceparty_currentparty_id_x ON referenceparty (currentparty_id); +DROP INDEX referenceparty_currentparty_id_x ; +CREATE INDEX referenceparty_currentparty_id_x ON referenceparty (currentparty_id); + +-- classcontributor +DROP INDEX classcontributor_commclass_id_x ; +CREATE INDEX classcontributor_commclass_id_x ON classcontributor (commclass_id); +DROP INDEX classcontributor_party_id_x ; +CREATE INDEX classcontributor_party_id_x ON classcontributor (party_id); +DROP INDEX classcontributor_role_id_x ; +CREATE INDEX classcontributor_role_id_x ON classcontributor (role_id); + +-- commclass +DROP INDEX commclass_observation_id_x ; +CREATE INDEX commclass_observation_id_x ON commclass (observation_id); +DROP INDEX commclass_classpublication_id_x ; +CREATE INDEX commclass_classpublication_id_x ON commclass (classpublication_id); + +-- commconcept +DROP INDEX commconcept_commname_id_x ; +CREATE INDEX commconcept_commname_id_x ON commconcept (commname_id); +DROP INDEX commconcept_reference_id_x ; +CREATE INDEX commconcept_reference_id_x ON commconcept (reference_id); + +DROP INDEX commconcept_dobscount_x ; +CREATE INDEX commconcept_dobscount_x ON commconcept (d_obscount); + + +-- comminterpretation +DROP INDEX comminterpretation_commclass_id_x ; +CREATE INDEX comminterpretation_commclass_id_x ON comminterpretation (commclass_id); +DROP INDEX comminterpretation_commconcept_id_x ; +CREATE INDEX comminterpretation_commconcept_id_x ON comminterpretation (commconcept_id); +DROP INDEX comminterpretation_commauthority_id_x ; +CREATE INDEX comminterpretation_commauthority_id_x ON comminterpretation (commauthority_id); + +-- coverindex +DROP INDEX coverindex_covermethod_id_x ; +CREATE INDEX coverindex_covermethod_id_x ON coverindex (covermethod_id); + +-- definedvalue +DROP INDEX definedvalue_userdefined_id_x ; +CREATE INDEX definedvalue_userdefined_id_x ON definedvalue (userdefined_id); + +-- userdefined + +-- disturbanceobs +DROP INDEX disturbanceobs_observation_id_x ; +CREATE INDEX disturbanceobs_observation_id_x ON disturbanceobs (observation_id); + +-- graphic +DROP INDEX graphic_observation_id_x ; +CREATE INDEX graphic_observation_id_x ON graphic (observation_id); + +-- notelink + +-- note +DROP INDEX note_notelink_id_x ; +CREATE INDEX note_notelink_id_x ON note (notelink_id); +DROP INDEX note_party_id_x ; +CREATE INDEX note_party_id_x ON note (party_id); +DROP INDEX note_role_id_x ; +CREATE INDEX note_role_id_x ON note (role_id); + +-- plantlineage +DROP INDEX plantlineage_childplantstatus_id_x ; +CREATE INDEX plantlineage_childplantstatus_id_x ON plantlineage (childplantstatus_id); +DROP INDEX plantlineage_parentplantstatus_id_x ; +CREATE INDEX plantlineage_parentplantstatus_id_x ON plantlineage (parentplantstatus_id); + + + +-- address +DROP INDEX address_party_id_x ; +CREATE INDEX address_party_id_x ON address (party_id); +DROP INDEX address_organization_id_x ; +CREATE INDEX address_organization_id_x ON address (organization_id); + +-- referencejournal + +-- referencealtident +DROP INDEX referencealtident_reference_id_x ; +CREATE INDEX referencealtident_reference_id_x ON referencealtident (reference_id); + +-- referencecontributor +DROP INDEX referencecontributor_reference_id_x ; +CREATE INDEX referencecontributor_reference_id_x ON referencecontributor (reference_id); +DROP INDEX referencecontributor_referenceparty_id_x ; +CREATE INDEX referencecontributor_referenceparty_id_x ON referencecontributor (referenceparty_id); + +-- commcorrelation +DROP INDEX commcorrelation_commstatus_id_x ; +CREATE INDEX commcorrelation_commstatus_id_x ON commcorrelation (commstatus_id); +DROP INDEX commcorrelation_commconcept_id_x ; +CREATE INDEX commcorrelation_commconcept_id_x ON commcorrelation (commconcept_id); + +-- commlineage +DROP INDEX commlineage_parentcommstatus_id_x ; +CREATE INDEX commlineage_parentcommstatus_id_x ON commlineage (parentcommstatus_id); +DROP INDEX commlineage_childcommstatus_id_x ; +CREATE INDEX commlineage_childcommstatus_id_x ON commlineage (childcommstatus_id); + +-- commname +DROP INDEX commname_reference_id_x ; +CREATE INDEX commname_reference_id_x ON commname (reference_id); + +-- commusage +DROP INDEX commusage_commname_id_x ; +CREATE INDEX commusage_commname_id_x ON commusage (commname_id); +DROP INDEX commusage_commconcept_id_x ; +CREATE INDEX commusage_commconcept_id_x ON commusage (commconcept_id); +DROP INDEX commusage_party_id_x ; +CREATE INDEX commusage_party_id_x ON commusage (party_id); +DROP INDEX commusage_commstatus_id_x ; +CREATE INDEX commusage_commstatus_id_x ON commusage (commstatus_id); +DROP INDEX commusage_commname_x ; +CREATE INDEX commusage_commname_x on commusage ( commname ); -- t +DROP INDEX commusage_classsystem_x ; +CREATE INDEX commusage_classsystem_x on commusage ( classsystem ); -- t + +-- commstatus +DROP INDEX commstatus_commconcept_id_x ; +CREATE INDEX commstatus_commconcept_id_x ON commstatus (commconcept_id); +DROP INDEX commstatus_reference_id_x ; +CREATE INDEX commstatus_reference_id_x ON commstatus (reference_id); +DROP INDEX commstatus_commparent_id_x ; +CREATE INDEX commstatus_commparent_id_x ON commstatus (commparent_id); +DROP INDEX commstatus_party_id_x ; +CREATE INDEX commstatus_party_id_x ON commstatus (party_id); +DROP INDEX commstatus_commlevel_x ; +CREATE INDEX commstatus_commlevel_x ON commstatus (commlevel); -- t + +-- plantcorrelation +DROP INDEX plantcorrelation_plantstatus_id_x ; +CREATE INDEX plantcorrelation_plantstatus_id_x ON plantcorrelation (plantstatus_id); +DROP INDEX plantcorrelation_plantconcept_id_x ; +CREATE INDEX plantcorrelation_plantconcept_id_x ON plantcorrelation (plantconcept_id); + +-- keywords +DROP INDEX keywords_table_id_entity_key ; +CREATE INDEX keywords_table_id_entity_key ON keywords (table_id,entity); + +--embargo denorm fields +DROP INDEX emb_classContributor_idx ; +CREATE INDEX emb_classContributor_idx ON classContributor (emb_classContributor); +DROP INDEX emb_commClass_idx ; +CREATE INDEX emb_commClass_idx ON commClass (emb_commClass); +DROP INDEX emb_commInterpretation_idx ; +CREATE INDEX emb_commInterpretation_idx ON commInterpretation (emb_commInterpretation); +DROP INDEX emb_disturbanceObs_idx ; +CREATE INDEX emb_disturbanceObs_idx ON disturbanceObs (emb_disturbanceObs); +DROP INDEX emb_observation_idx ; +CREATE INDEX emb_observation_idx ON observation (emb_observation); +DROP INDEX emb_plot_idx ; +CREATE INDEX emb_plot_idx ON plot (emb_plot); +DROP INDEX emb_soilObs_idx ; +CREATE INDEX emb_soilObs_idx ON soilObs (emb_soilObs); +DROP INDEX emb_stemCount_idx ; +CREATE INDEX emb_stemCount_idx ON stemCount (emb_stemCount); +DROP INDEX emb_stemLocation_idx ; +CREATE INDEX emb_stemLocation_idx ON stemLocation (emb_stemLocation); +DROP INDEX emb_taxonAlt_idx ; +CREATE INDEX emb_taxonAlt_idx ON taxonAlt (emb_taxonAlt); +DROP INDEX emb_taxonImportance_idx ; +CREATE INDEX emb_taxonImportance_idx ON taxonImportance (emb_taxonImportance); +DROP INDEX emb_taxonInterpretation_idx ; +CREATE INDEX emb_taxonInterpretation_idx ON taxonInterpretation (emb_taxonInterpretation); +DROP INDEX emb_taxonObservation_idx ; +CREATE INDEX emb_taxonObservation_idx ON taxonObservation (emb_taxonObservation); + +--taxonobservation ID fields: +DROP INDEX taxonobservation_int_origPlantConcept_ID_x ; +CREATE INDEX taxonobservation_int_origPlantConcept_ID_x on taxonobservation ( int_origPlantConcept_ID ); + +DROP INDEX taxonobservation_int_currPlantConcept_ID_x ; +CREATE INDEX taxonobservation_int_currPlantConcept_ID_x on taxonobservation ( int_currPlantConcept_ID ); + +--accessionCode indices: +-- non unique (reference accession codes) +drop index userDatasetItem_accessioncode_index; +create index userDatasetItem_accessioncode_index on userDatasetItem (itemAccessionCode); +drop index userDatasetItem2_accessioncode_index; +create index userDatasetItem2_accessioncode_index on userDatasetItem (externalAccessionCode); + +--unique indexes: + +drop index reference_accessioncode_index; +create unique index reference_accessioncode_index on reference (accessionCode); +drop index referenceParty_accessioncode_index; +create unique index referenceParty_accessioncode_index on referenceParty (accessionCode); +drop index referenceJournal_accessioncode_index; +create unique index referenceJournal_accessioncode_index on referenceJournal (accessionCode); +drop index commclass_accessioncode_index; +create unique index commclass_accessioncode_index on commClass (accessionCode); +drop index coverMethod_accessioncode_index; +create unique index coverMethod_accessioncode_index on coverMethod (accessionCode); +drop index namedPlace_accessioncode_index; +create unique index namedPlace_accessioncode_index on namedPlace (accessionCode); +drop index observation_accessioncode_index; +create unique index observation_accessioncode_index on observation (accessionCode); +drop index party_accessioncode_index; +create unique index party_accessioncode_index on party (accessionCode); +drop index plot_accessioncode_index; +create unique index plot_accessioncode_index on plot (accessionCode); +drop index project_accessioncode_index; +create unique index project_accessioncode_index on project (accessionCode); +drop index soilTaxon_accessioncode_index; +create unique index soilTaxon_accessioncode_index on soilTaxon (accessionCode); +drop index stratumMethod_accessioncode_index; +create unique index stratumMethod_accessioncode_index on stratumMethod (accessionCode); +drop index taxonObservation_accessioncode_index; +create unique index taxonObservation_accessioncode_index on taxonObservation (accessionCode); +drop index userDefined_accessioncode_index; +create unique index userDefined_accessioncode_index on userDefined (accessioncode); +drop index userDataset_accessioncode_index; +create unique index userDataset_accessioncode_index on userDataset (accessioncode); + +drop index userQuery_accessioncode_index; +create unique index userQuery_accessioncode_index on userQuery (accessioncode); +drop index commConcept_accessioncode_index; +create unique index commConcept_accessioncode_index on commConcept (accessioncode); +drop index plantConcept_accessioncode_index; +create unique index plantConcept_accessioncode_index on plantConcept (accessioncode); +drop index aux_Role_accessioncode_index; +create unique index aux_Role_accessioncode_index on aux_Role (accessioncode); + +drop index taxonInterpretation_accessioncode_index; +create unique index taxonInterpretation_accessioncode_index on taxonInterpretation (accessioncode); +drop index observationSynonym_accessioncode_index; +create unique index observationSynonym_accessioncode_index on observationSynonym (accessioncode); +drop index observation_accessioncode_index; +create unique index observation_accessioncode_index on observation (accessioncode); +drop index note_accessioncode_index; +create unique index note_accessioncode_index on note (accessioncode); +drop index graphic_accessioncode_index; +create unique index graphic_accessioncode_index on graphic (accessioncode); +drop index plantStatus_accessioncode_index; +create unique index plantStatus_accessioncode_index on plantStatus (accessioncode); +drop index commStatus_accessioncode_index; +create unique index commStatus_accessioncode_index on commStatus (accessioncode); diff --git a/migrations/4_drop_vegbank_views.sql b/migrations/4_drop_vegbank_views.sql new file mode 100644 index 0000000..949561e --- /dev/null +++ b/migrations/4_drop_vegbank_views.sql @@ -0,0 +1,104 @@ +drop view view_busRule_plotsizeshape; +DROP view view_busRule_duplStratumType; +DROP view view_busRule_duplcovercode; + +drop view view_emb_embargo_complete; +drop view view_emb_embargo_currentfullonly; + + +drop view view_export_classcontributor; +drop view view_export_commclass; +drop view view_export_comminterpretation; +drop view view_export_disturbanceobs; +drop view view_export_observation; +drop view view_export_observationcontributor; +drop view view_export_plot; +drop view view_export_plot_pre; +drop view view_export_soilobs; +drop view view_export_stemcount; +drop view view_export_stemlocation; +drop view view_export_taxonalt; +drop view view_export_taxonimportance; +drop view view_export_taxoninterpretation; +drop view view_export_taxonobservation; + + +DROP VIEW view_dbafielddesc_notimpl; +DROP VIEW view_plotall_withembargo; + +DROP VIEW view_taxonobs_distinctid_curr_counts_plants; + +DROP VIEW view_taxonobs_distinctid_curr_counts; +DROP VIEW view_taxonobs_distinctid_curr; +--DROP VIEW view_taxonobs_distinctid_orig; + + +DROP VIEW view_taxonobs_withmaxcover; +DROP VIEW view_csv_taxonimportance; +DROP VIEW view_csv_taxonimportance_pre; +DROP VIEW view_browseparty_all_count_combined; + +DROP VIEW view_browseparty_classcontrib_count; +DROP VIEW view_browseparty_obscontrib_count; +DROP VIEW view_browseparty_projectcontrib_count; + +DROP VIEW view_browseparty_all_count; +DROP VIEW view_browseparty_all; +DROP VIEW view_browseparty_obscontrib; +DROP VIEW view_browseparty_classcontrib; +DROP VIEW view_browseparty_projectcontrib; + +DROP VIEW view_comminterp_more; +DROP VIEW view_taxoninterp_more; +DROP VIEW view_observation_transl; + + +DROP VIEW view_notemb_classContributor; +DROP VIEW view_notemb_commInterpretation; +DROP VIEW view_notemb_commClass; + +DROP VIEW view_notemb_disturbanceObs; +DROP VIEW view_notemb_soilObs; +DROP VIEW view_notemb_stemCount; +DROP VIEW view_notemb_stemLocation; +DROP VIEW view_notemb_taxonAlt; +DROP VIEW view_notemb_taxonImportance; +DROP VIEW view_notemb_taxonInterpretation; +DROP VIEW view_notemb_taxonObservation; +DROP VIEW view_notemb_observation; +DROP VIEW view_notemb_observationcontributor; +DROP VIEW view_notemb_plot; + + +DROP VIEW view_plantconcept_transl; +DROP VIEW view_commconcept_transl; +DROP VIEW view_reference_transl ; +DROP VIEW view_party_transl ; +drop view view_party_public; + +DROP VIEW view_keywProjPlaces ; +DROP VIEW view_kwhelper_projcontrib; +DROP VIEW view_kwhelper_refparty; +DROP VIEW view_kwhelper_refjournal; + + + + DROP VIEW view_all_commnames_code; + DROP VIEW view_all_commnames_sciname; + DROP VIEW view_all_commnames_translated; + DROP VIEW view_all_commnames_common; + + DROP VIEW view_std_commnames_code; + DROP VIEW view_std_commnames_sciname; + DROP VIEW view_std_commnames_translated; + DROP VIEW view_std_commnames_common; + +drop view view_all_plantnames_code; +drop view view_all_plantnames_common ; +drop view view_all_plantnames_sciname ; +drop view view_all_plantnames_scinamenoauth; +drop view view_std_plantnames_code ; +drop view view_std_plantnames_common ; +drop view view_std_plantnames_sciname ; +drop view view_std_plantnames_scinamenoauth; + diff --git a/migrations/5_create_vegbank_views.sql b/migrations/5_create_vegbank_views.sql new file mode 100644 index 0000000..97ee832 --- /dev/null +++ b/migrations/5_create_vegbank_views.sql @@ -0,0 +1,426 @@ +--- VIEWS MUST BE DROPPED in drop_vegbank_views first! + + +CREATE VIEW view_party_public AS + SELECT party.party_id, accessioncode, salutation, surname, + givenname, middlename,organizationname, + contactinstructions, email + FROM party LEFT JOIN usr ON party.party_ID=usr.party_ID + WHERE + usr.usr_id is NULL OR usr.permission_type>1 + ; + + +drop view view_busRule_plotsizeshape; +CREATE VIEW view_busRule_plotsizeshape AS + + SELECT (project_id), (select projectName from project where project.project_ID=observation.projecT_ID) as projectName, + count(1) as plotcount + from plot inner join observation on plot.plot_ID=observation.plot_ID + where ((area is null) and (shape is null or (((shape)<>'Plotless') and (upper(shape) not like 'RELEV%')))) group by project_ID; + + +DROP view view_busRule_duplStratumType; + CREATE VIEW view_busRule_duplStratumType AS + SELECT count(1), stratummethod_id, stratumindex FROM stratumType GROUP BY stratummethod_id, stratumindex HAVING count(1) > 1; + +DROP view view_busRule_duplcovercode; + CREATE VIEW view_busRule_duplcovercode AS + SELECT count(1), covermethod_id, covercode FROM coverIndex GROUP BY covermethod_id, covercode HAVING count(1) > 1; + +-- EMBARGO views +drop view view_emb_embargo_complete; +drop view view_emb_embargo_currentfullonly; + +CREATE VIEW view_emb_embargo_currentfullonly AS + SELECT * FROM embargo WHERE (((defaultStatus)=6) AND ((embargoStart)Now())); + + + +CREATE VIEW view_emb_embargo_complete AS + SELECT Coalesce(emb.defaultStatus,0) AS currentEmb, plot.plot_id + FROM plot LEFT JOIN view_emb_embargo_currentfullonly AS emb ON plot.PLOT_ID = emb.plot_ID; + + + + CREATE VIEW view_notEmb_classContributor AS SELECT * FROM classContributor where emb_classContributor<6; + CREATE VIEW view_notEmb_commClass AS SELECT * FROM commClass where emb_commClass<6; + CREATE VIEW view_notEmb_commInterpretation AS SELECT * FROM commInterpretation where emb_commInterpretation<6; + CREATE VIEW view_notEmb_disturbanceObs AS SELECT * FROM disturbanceObs where emb_disturbanceObs<6; + CREATE VIEW view_notEmb_observation AS SELECT * FROM observation where emb_observation<6; + CREATE VIEW view_notEmb_observationContributor AS SELECT observationContributor.* FROM observationContributor inner join observation on observationContributor.observation_ID=observation.observation_ID where observation.emb_observation<6; + + CREATE VIEW view_notEmb_plot AS SELECT * FROM plot where emb_plot<6; + CREATE VIEW view_notEmb_soilObs AS SELECT * FROM soilObs where emb_soilObs<6; + CREATE VIEW view_notEmb_stemCount AS SELECT * FROM stemCount where emb_stemCount<6; + CREATE VIEW view_notEmb_stemLocation AS SELECT * FROM stemLocation where emb_stemLocation<6; + CREATE VIEW view_notEmb_taxonAlt AS SELECT * FROM taxonAlt where emb_taxonAlt<6; + CREATE VIEW view_notEmb_taxonImportance AS SELECT * FROM taxonImportance where emb_taxonImportance<6; + CREATE VIEW view_notEmb_taxonInterpretation AS SELECT * FROM taxonInterpretation where emb_taxonInterpretation<6; + CREATE VIEW view_notEmb_taxonObservation AS SELECT * FROM taxonObservation where emb_taxonObservation<6; + + CREATE VIEW view_export_classContributor AS SELECT * FROM view_notemb_classContributor; + CREATE VIEW view_export_commClass AS SELECT * FROM view_notemb_commClass; + CREATE VIEW view_export_commInterpretation AS SELECT * FROM view_notemb_commInterpretation; + CREATE VIEW view_export_disturbanceObs AS SELECT * FROM view_notemb_disturbanceObs; + + CREATE VIEW view_export_observation AS SELECT * FROM view_notemb_observation; + CREATE VIEW view_export_observationcontributor AS SELECT * FROM view_notemb_observationcontributor; + -- PLOT requires shifting field names to remove some fields for confidential plots + + CREATE VIEW view_export_plot_pre AS SELECT plot_id, authorplotcode, reference_id, parent_id, locationaccuracy, confidentialitystatus, latitude, longitude, CASE WHEN confidentialitystatus>0 THEN null ELSE authorlocation END as authorlocation_emb, CASE WHEN confidentialitystatus>0 THEN null ELSE locationnarrative END as locationnarrative_emb, azimuth, dsgpoly, shape, area, standsize, placementmethod, permanence, layoutnarrative, elevation, elevationaccuracy, elevationrange, slopeaspect, minslopeaspect, maxslopeaspect, slopegradient, minslopegradient, maxslopegradient, topoposition, landform, surficialdeposits, rocktype, stateprovince, country, submitter_surname, submitter_givenname, submitter_email, notespublic, notesmgt, revisions, dateentered, emb_plot, plotrationalenarrative, accessioncode FROM view_notemb_plot; + CREATE VIEW view_export_plot AS SELECT plot_id, authorplotcode, reference_id, parent_id, locationaccuracy, confidentialitystatus, latitude, longitude, authorlocation_emb as authorlocation, locationnarrative_emb as locationnarrative, azimuth, dsgpoly, shape, area, standsize, placementmethod, permanence, layoutnarrative, elevation, elevationaccuracy, elevationrange, slopeaspect, minslopeaspect, maxslopeaspect, slopegradient, minslopegradient, maxslopegradient, topoposition, landform, surficialdeposits, rocktype, stateprovince, country, submitter_surname, submitter_givenname, submitter_email, notespublic, notesmgt, revisions, dateentered, emb_plot, plotrationalenarrative, accessioncode FROM view_export_plot_pre; + + CREATE VIEW view_export_soilObs AS SELECT * FROM view_notemb_soilObs; + CREATE VIEW view_export_stemCount AS SELECT * FROM view_notemb_stemCount; + CREATE VIEW view_export_stemLocation AS SELECT * FROM view_notemb_stemLocation; + CREATE VIEW view_export_taxonAlt AS SELECT * FROM view_notemb_taxonAlt; + CREATE VIEW view_export_taxonImportance AS SELECT * FROM view_notemb_taxonImportance; + CREATE VIEW view_export_taxonInterpretation AS SELECT * FROM view_notemb_taxonInterpretation; + CREATE VIEW view_export_taxonObservation AS SELECT * FROM view_notemb_taxonObservation; + +------------------ +-- END EMBARGO VIEWS +------------------- + + + CREATE VIEW view_reference_transl AS + SELECT CASE WHEN shortName IS NULL + THEN CASE WHEN title IS NULL + THEN CASE WHEN fulltext IS NULL + THEN '[poorly documented reference]' + ELSE CASE WHEN length(fulltext)>35 + THEN substr(fulltext,1,32) || '...' + ELSE fulltext + END + END + ELSE title + END + ELSE shortName + END + AS reference_id_transl, reference_id from reference; + +CREATE VIEW view_plantconcept_transl AS + SELECT plantconcept_id, plantname_id, plantname, reference_id, + plantname || ' [' || (select reference_id_transl + FROM view_reference_transl + where view_reference_transl.reference_id=plantconcept.reference_id) || ']' as plantconcept_id_transl + FROM plantconcept; + +CREATE VIEW view_commconcept_transl AS + SELECT commconcept_id, commname_id, commname, reference_id, + commname || ' [' || (select reference_id_transl + FROM view_reference_transl + where view_reference_transl.reference_id=commconcept.reference_id) || ']' as commconcept_id_transl + FROM commconcept; + + + + + CREATE VIEW view_party_transl AS + SELECT CASE WHEN surname is null + THEN CASE WHEN organizationname IS NULL + THEN '[poorly documented party]' + ELSE organizationname || ' (organization)' + END + ELSE surname || CASE WHEN givenname IS NULL + THEN '' + ELSE ', ' || COALESCE(givenname,'') + END + END + AS party_id_transl, party_id + FROM party ; + + +--- browsing by party views: ----- + +CREATE VIEW view_browseparty_obscontrib AS + SELECT observationContributor.PARTY_ID, observationContributor.OBSERVATION_ID + FROM view_notemb_observation as observation INNER JOIN observationContributor ON observation.OBSERVATION_ID = observationContributor.OBSERVATION_ID + GROUP BY observationContributor.PARTY_ID, observationContributor.OBSERVATION_ID; + +CREATE VIEW view_browseparty_projectcontrib AS + SELECT observation_1.OBSERVATION_ID, projectContributor.PARTY_ID + FROM (project INNER JOIN view_notemb_observation AS observation_1 ON project.PROJECT_ID = observation_1.PROJECT_ID) INNER JOIN projectContributor ON project.PROJECT_ID = projectContributor.PROJECT_ID + GROUP BY observation_1.OBSERVATION_ID, projectContributor.PARTY_ID; + +CREATE VIEW view_browseparty_classcontrib AS + SELECT observation_2.OBSERVATION_ID, classContributor.PARTY_ID + FROM view_notemb_observation AS observation_2 INNER JOIN (commClass INNER JOIN classContributor ON commClass.COMMCLASS_ID = classContributor.COMMCLASS_ID) ON observation_2.OBSERVATION_ID = commClass.OBSERVATION_ID + GROUP BY observation_2.OBSERVATION_ID, classContributor.PARTY_ID; + + + +CREATE VIEW view_browseparty_all AS + SELECT OBSERVATION_ID, PARTY_ID + FROM view_browseparty_classcontrib + union SELECT OBSERVATION_ID, PARTY_ID + FROM view_browseparty_projectcontrib + UNION SELECT OBSERVATION_ID, PARTY_ID + FROM view_browseparty_obscontrib; + + +CREATE VIEW view_browseparty_all_count AS SELECT count(1) AS countallcontrib, party_ID +FROM view_browseparty_all +GROUP BY party_ID; + + +CREATE VIEW view_browseparty_classcontrib_count AS SELECT count(1) AS countclasscontrib, party_ID +FROM view_browseparty_classcontrib +GROUP BY party_ID; + + +CREATE VIEW view_browseparty_obscontrib_count AS SELECT count(1) AS countobscontrib, party_ID +FROM view_browseparty_obscontrib +GROUP BY party_ID; + + +CREATE VIEW view_browseparty_projectcontrib_count AS SELECT count(1) AS countprojectcontrib, party_ID +FROM view_browseparty_projectcontrib +GROUP BY party_ID; + + +CREATE VIEW view_browseparty_all_count_combined AS + SELECT view_browseparty_all_count.party_ID, view_browseparty_all_count.countallcontrib, view_browseparty_classcontrib_count.countclasscontrib, view_browseparty_obscontrib_count.countobscontrib, view_browseparty_projectcontrib_count.countprojectcontrib + FROM ((view_browseparty_all_count LEFT JOIN view_browseparty_classcontrib_count ON view_browseparty_all_count.party_ID = view_browseparty_classcontrib_count.party_ID) LEFT JOIN view_browseparty_obscontrib_count ON view_browseparty_all_count.party_ID = view_browseparty_obscontrib_count.party_ID) LEFT JOIN view_browseparty_projectcontrib_count ON view_browseparty_all_count.party_ID = view_browseparty_projectcontrib_count.party_ID + ORDER BY countallcontrib DESC; + + +CREATE view view_csv_taxonimportance_pre AS +SELECT taxonobservation.observation_id AS observation_ID, + authorplantname AS plant, + (CASE WHEN (taxonimportance.stratum_id is null) THEN '-all-' ELSE (SELECT stratumtype.stratumname FROM stratumtype, stratum + WHERE stratum.stratumtype_id=stratumtype.stratumtype_id AND stratum.stratum_id=taxonimportance.stratum_id) END) AS stratum, + cover, + (select min(coverIndex.coverCode) from coverIndex where coverPercent=taxonimportance.cover + AND coverIndex.coverMethod_ID=observation.coverMethod_ID and observation.observation_ID=taxonobservation.observation_ID) + as coverCode_exact, + (select min(coverIndex.coverCode) from coverIndex where upperlimit>=taxonimportance.cover and lowerlimit<=taxonimportance.cover + AND coverIndex.coverMethod_ID=observation.coverMethod_ID and observation.observation_ID=taxonobservation.observation_ID) + as coverCode_byrange, + taxonimportance.basalarea, taxonobservation.accessioncode + FROM taxonobservation, taxonimportance, view_notemb_observation AS observation + WHERE taxonobservation.taxonobservation_id=taxonimportance.taxonobservation_id AND + taxonobservation.observation_ID=observation.observation_ID ; + +CREATE view view_csv_taxonimportance AS + SELECT observation_ID, plant, stratum, cover, CASE WHEN (covercode_exact is null) THEN covercode_byrange ELSE covercode_exact END as covercode, + basalarea, accessioncode + FROM view_csv_taxonimportance_pre; + + + + + + -- the following views create "standard" names for plantconcepts, based on usages of preferred party and classsystems: + DROP VIEW view_std_plantnames_code; + CREATE VIEW view_std_plantnames_code AS + SELECT plantconcept_id, plantname FROM plantusage WHERE classsystem = 'Code' AND party_id = + (SELECT party_id FROM party WHERE accessioncode='VB.Py.511.USDANRCSPLANTS2') AND usagestop IS NULL; + + DROP VIEW view_std_plantnames_sciname; + CREATE VIEW view_std_plantnames_sciname AS + SELECT plantconcept_id, plantname FROM plantusage WHERE classsystem = 'Scientific' AND party_id = + (SELECT party_id FROM party WHERE accessioncode='VB.Py.511.USDANRCSPLANTS2') AND usagestop IS NULL; + + DROP VIEW view_std_plantnames_scinamenoauth; + CREATE VIEW view_std_plantnames_scinamenoauth AS + SELECT plantconcept_id, plantname FROM plantusage WHERE classsystem = 'Scientific without authors' AND party_id = + (SELECT party_id FROM party WHERE accessioncode='VB.Py.511.USDANRCSPLANTS2') AND usagestop IS NULL; + + DROP VIEW view_std_plantnames_common; + CREATE VIEW view_std_plantnames_common AS + SELECT plantconcept_id, plantname FROM plantusage WHERE classsystem = 'English Common' AND party_id = + (SELECT party_id FROM party WHERE accessioncode='VB.Py.511.USDANRCSPLANTS2') AND usagestop IS NULL; + + --the following views are same as above, but not party specific, to catch "other concepts": + DROP VIEW view_all_plantnames_code; + CREATE VIEW view_all_plantnames_code AS + SELECT plantconcept_id, plantname FROM plantusage WHERE classsystem = 'Code' ; + + DROP VIEW view_all_plantnames_sciname; + CREATE VIEW view_all_plantnames_sciname AS + SELECT plantconcept_id, plantname FROM plantusage WHERE classsystem = 'Scientific' ; + + DROP VIEW view_all_plantnames_scinamenoauth; + CREATE VIEW view_all_plantnames_scinamenoauth AS + SELECT plantconcept_id, plantname FROM plantusage WHERE classsystem = 'Scientific without authors' ; + + DROP VIEW view_all_plantnames_common; + CREATE VIEW view_all_plantnames_common AS + SELECT plantconcept_id, plantname FROM plantusage WHERE classsystem = 'English Common' ; + + + -- the following views create "standard" names for commconcepts, based on usages of preferred party and classsystems: + DROP VIEW view_std_commnames_code; + CREATE VIEW view_std_commnames_code AS + SELECT commconcept_id, commname FROM commusage WHERE classsystem = 'Code' AND party_id = + (SELECT party_id FROM party WHERE accessioncode='VB.Py.512.NATURESERVE') AND usagestop IS NULL; + + DROP VIEW view_std_commnames_sciname; + CREATE VIEW view_std_commnames_sciname AS + SELECT commconcept_id, commname FROM commusage WHERE classsystem = 'Scientific' AND party_id = + (SELECT party_id FROM party WHERE accessioncode='VB.Py.512.NATURESERVE') AND usagestop IS NULL; + + DROP VIEW view_std_commnames_translated; + CREATE VIEW view_std_commnames_translated AS + SELECT commconcept_id, commname FROM commusage WHERE classsystem = 'Translated' AND party_id = + (SELECT party_id FROM party WHERE accessioncode='VB.Py.512.NATURESERVE') AND usagestop IS NULL; + + DROP VIEW view_std_commnames_common; + CREATE VIEW view_std_commnames_common AS + SELECT commconcept_id, commname FROM commusage WHERE classsystem = 'Common' AND party_id = + (SELECT party_id FROM party WHERE accessioncode='VB.Py.512.NATURESERVE') AND usagestop IS NULL; + + + DROP VIEW view_all_commnames_code; + CREATE VIEW view_all_commnames_code AS + SELECT commconcept_id, commname FROM commusage WHERE classsystem = 'Code' ; + + DROP VIEW view_all_commnames_sciname; + CREATE VIEW view_all_commnames_sciname AS + SELECT commconcept_id, commname FROM commusage WHERE classsystem = 'Scientific' ; + + DROP VIEW view_all_commnames_translated; + CREATE VIEW view_all_commnames_translated AS + SELECT commconcept_id, commname FROM commusage WHERE classsystem = 'Translated' ; + + DROP VIEW view_all_commnames_common; + CREATE VIEW view_all_commnames_common AS + SELECT commconcept_id, commname FROM commusage WHERE classsystem = 'Common' ; + + + CREATE VIEW view_comminterp_more AS + SELECT commClass.observation_ID, + inspection,tableanalysis,multivariateanalysis,expertsystem,classpublication_id,classnotes,accessioncode,classstartdate,classstopdate, + comminterpretation.* , + (CASE + WHEN classfit='Absolutely wrong' THEN 6 + WHEN classfit='Understandable but wrong' THEN 4 + WHEN classfit='Reasonable or acceptable answer' THEN 3 + WHEN classfit='Good answer' THEN 2 + WHEN classfit='Absolutely correct' THEN 1 + ELSE 5 END) as classfitnum, + (CASE + WHEN classconfidence='High' THEN 1 + WHEN classconfidence='Medium' THEN 2 + WHEN classconfidence='Low' THEN 3 + ELSE 4 END) as classconfidencenum + FROM view_notemb_commClass as commclass, comminterpretation WHERE commclass.commclass_ID = comminterpretation.commclass_ID; + +CREATE VIEW view_taxonInterp_more AS + SELECT taxonInterpretation.*, plantconcept.accessionCode AS pc_accessioncode, plantconcept.plantname as pc_plantname, + taxonobservation.observation_ID + FROM view_notEmb_taxonInterpretation as taxonInterpretation, taxonobservation, plantconcept + WHERE taxonobservation.taxonobservation_ID=taxonInterpretation.taxonobservation_ID + AND plantconcept.plantconcept_id=taxonInterpretation.plantconcept_id; + +CREATE VIEW view_observation_transl AS + SELECT observation_ID, + COALESCE(authorObsCode,authorPlotCode) AS observation_id_transl + FROM view_notemb_observation as observation, plot + WHERE observation.plot_ID = plot.plot_ID; + +-- CREATE VIEW view_taxonobs_distinctid_curr AS SELECT observation_id, int_currplantconcept_id as plantconcept_id, max(cover) as maxplantcover FROM view_notEmb_taxonObservation as taxonobservation, taxonimportance where taxonimportance.taxonobservation_id=taxonobservation.taxonobservation_id GROUP BY plantconcept_id,observation_id; + +-- this view needed in the event there are no taxonimportance records for a taxonobservation. +-- drop view view_taxonobs_withmaxcover; +CREATE VIEW view_taxonobs_withmaxcover AS + SELECT taxonobservation.*, + (select max(cover) from taxonimportance where taxonimportance.taxonobservation_ID=taxonobservation.taxonobservation_ID) as maxcover + FROM view_notEmb_taxonObservation as taxonobservation; + +-- drop view view_taxonobs_distinctid_curr; +CREATE VIEW view_taxonobs_distinctid_curr AS + SELECT userdataset_id, observation_id, int_currplantconcept_id as plantconcept_id, max(maxcover) as maxplantcover + FROM view_taxonobs_withmaxcover as taxonobservation, userdatasetitem + WHERE observation_id = itemrecord AND itemtable='observation' + GROUP BY plantconcept_id,userdataset_id,observation_id; + +-- drop view view_taxonobs_distinctid_curr_counts; +CREATE VIEW view_taxonobs_distinctid_curr_counts AS + SELECT userdataset_id, plantconcept_id, count(1) AS countObs, avg(maxplantcover) AS avgcovernoround, + min(maxplantcover) AS mincovernoround, max(maxplantcover) AS maxcovernoround + FROM view_taxonobs_distinctid_curr + GROUP BY userdataset_id, plantconcept_id; + +-- drop view view_taxonobs_distinctid_curr_counts_plants; +CREATE VIEW view_taxonobs_distinctid_curr_counts_plants AS + SELECT view_taxonobs_distinctid_curr_counts.*, round(CAST (view_taxonobs_distinctid_curr_counts.avgcovernoround as numeric),3) AS avgcover, + round(CAST (view_taxonobs_distinctid_curr_counts.mincovernoround as numeric),3) AS mincover, + round(CAST (view_taxonobs_distinctid_curr_counts.maxcovernoround as numeric),3) AS maxcover, + temptbl_std_plantnames.plantname, temptbl_std_plantnames.sciname, temptbl_std_plantnames.scinamenoauth, + temptbl_std_plantnames.code,temptbl_std_plantnames.common FROM temptbl_std_plantnames, view_taxonobs_distinctid_curr_counts + WHERE view_taxonobs_distinctid_curr_counts.plantconcept_ID=temptbl_std_plantnames.plantconcept_ID; +--DROP VIEW view_plotall_withembargo; +CREATE VIEW view_plotall_withembargo +AS SELECT plot.*, embargo_id, embargoreason,defaultstatus,embargostart,embargostop, (defaultstatus + CASE WHEN embargostop 'implementation' and lower(fieldmodel) <> 'denorm' + ORDER BY dba_fielddescription_id ; + + +create view stratumtype_x_stratummethod AS select stratumType.*, stratumMethod.accessionCode as sm_accCode from stratumType inner join stratummethod on stratumType.stratummethod_id=stratummethod.stratummethod_id; + +create view stratumtype_x_observation AS SELECT stratum.stratum_id, + stratum.stratumname, + observation.accessioncode + FROM observation + JOIN stratum ON observation.observation_id = stratum.observation_id; + \ No newline at end of file diff --git a/migrations/6_vegbank_populate_configtables.sql b/migrations/6_vegbank_populate_configtables.sql new file mode 100644 index 0000000..909bcf8 --- /dev/null +++ b/migrations/6_vegbank_populate_configtables.sql @@ -0,0 +1,110 @@ + +------------------------------------------------------------------------------------------ +---- THIS FILE ASSUMES THAT THE MODEL HAS BEEN COMPLETELY BUILT +---- IT ADDS CRUCIAL DATA TO TABLES THAT NEED IT, FIRST DELETING ANY DATA IN THEM +---- CAN BE RUN AT ANY TIME +------------------------------------------------------------------------------------------ + + +DELETE FROM dba_cookie; +DELETE FROM dba_cookieLabels; + +insert into dba_cookie ( cookieName , defaultvalue, viewname, examplePK, description, sortorder) values ( 'table_stemsize','hide','observation_comprehensive',3062,'show table of stem sizes on this view',1) ; +insert into dba_cookie ( cookieName , defaultvalue, viewname, examplePK, description, sortorder) values ( 'table_stemsize','show','observation_taxa',3062,'show table of stem sizes on this view' ,3) ; +insert into dba_cookie ( cookieName , defaultvalue, viewname, examplePK, description, sortorder) values ( 'graphic_stemsize','show','observation_comprehensive',3062,'show graphic of stem sizes on this view' ,4) ; +insert into dba_cookie ( cookieName , defaultvalue, viewname, examplePK, description, sortorder) values ( 'graphic_stemsize','show','observation_taxa',3062,'show graphic of stem sizes on this view',6 ) ; + +insert into dba_cookie ( cookieName , defaultvalue, viewname, examplePK, sortorder) values ( 'table_stemsize','show','taxonobservation_detail',68777,8) ; +insert into dba_cookie ( cookieName , defaultvalue, viewname, examplePK, sortorder) values ( 'graphic_stemsize','show','taxonobservation_detail',68777,9) ; + +insert into dba_cookie ( cookieName , defaultvalue, viewname, examplePK, sortorder) values ( 'taxonimportance_covercode','show','global',68777,10) ; + +insert into dba_cookie ( cookieName , defaultvalue, viewname, examplePK, sortorder) values ( 'taxonimportance_basalarea','show','global',68777,12) ; +insert into dba_cookie ( cookieName , defaultvalue, viewname, examplePK, sortorder) values ( 'taxonimportance_biomass','show','global',68777,13) ; +insert into dba_cookie ( cookieName , defaultvalue, viewname, examplePK, sortorder) values ( 'taxonimportance_inferencearea','show','global',68777,14) ; + + +insert into dba_cookie ( cookieName , defaultvalue, viewname, examplePK, sortorder,startGroup) values ( 'plant_concept_name','hide','global',68777,14,true) ; +insert into dba_cookie ( cookieName , defaultvalue, viewname, examplePK, sortorder) values ( 'plant_full_scientific_name','hide','global',68777,15) ; +insert into dba_cookie ( cookieName , defaultvalue, viewname, examplePK, sortorder) values ( 'plant_scientific_name_noauthors','show','global',68777,16) ; +insert into dba_cookie ( cookieName , defaultvalue, viewname, examplePK, sortorder) values ( 'plant_common_name','hide','global',68777,17) ; +insert into dba_cookie ( cookieName , defaultvalue, viewname, examplePK, sortorder) values ( 'plant_code','hide','global',68777,18) ; + +--help bits +insert into dba_cookie ( cookieName , defaultvalue, viewname, examplePK, sortorder) values ( 'ddlink','hide','global',0,0 ) ; +insert into dba_cookie ( cookieName , defaultvalue, viewname, examplePK, sortorder) values ( 'dd_showlabels_notnames','show','global',0,0 ) ; + + +--userdefined +insert into dba_cookie ( cookieName , defaultvalue, viewname, examplePK, sortorder,startGroup) values ( 'user_defined_data','show','global',0,20,true ) ; + +-- mapping +insert into dba_cookie ( cookieName , defaultvalue, viewname, examplePK, sortorder,startGroup) values ( 'mapping_icons_not_colored','hide','global',0,25,true ) ; + +insert into dba_cookieLabels ( viewOrCookie , description) values ('graphic_stemsize','A graphical representation of tree stems, using DBH size'); +insert into dba_cookieLabels ( viewOrCookie , description) values ('table_stemsize','A tabular overview of stems for each taxon'); +insert into dba_cookieLabels ( viewOrCookie , description) values ('observation_comprehensive','The Comprehensive Plot View'); +insert into dba_cookieLabels ( viewOrCookie , description) values ('observation_taxa','View of plot(s) showing plants only'); + +insert into dba_cookieLabels ( viewOrCookie , description) values ('global','Global Settings'); +insert into dba_cookieLabels ( viewOrCookie , description) values ('ddlink','Links to Field Definitions with Red Question Marks'); +insert into dba_cookieLabels ( viewOrCookie , description) values ('dd_showlabels_notnames','Show human-readable field labels instead of database names'); + + +insert into dba_cookieLabels ( viewOrCookie , description) values ('taxonobservation_detail','View of a one species on a plot, with importance values and interpretations.'); + +insert into dba_cookieLabels ( viewOrCookie , description) values ('taxonimportance_covercode','Cover Code used for a Cover Class to estimate cover'); +insert into dba_cookieLabels ( viewOrCookie , description) values ('taxonimportance_basalarea','Basal Area for a species'); +insert into dba_cookieLabels ( viewOrCookie , description) values ('taxonimportance_biomass','Biomass for a species'); +insert into dba_cookieLabels ( viewOrCookie , description) values ('taxonimportance_inferencearea','Inference Area used to determine importance values (cover, biomass, basal area, etc.) for a species.'); + + +insert into dba_cookieLabels (viewOrCookie , description) values ('plant_concept_name','The plant name the concept is based on'); +insert into dba_cookieLabels (viewOrCookie , description) values ('plant_full_scientific_name','The full scientific name, including authors, of the plant concept'); +insert into dba_cookieLabels (viewOrCookie , description) values ('plant_scientific_name_noauthors','The scientific name without authors of the plant concept'); +insert into dba_cookieLabels (viewOrCookie , description) values ('plant_common_name','The common name for the plant concept, if available'); +insert into dba_cookieLabels (viewOrCookie , description) values ('plant_code','The Code for the plant concept, if available'); + +insert into dba_cookieLabels (viewOrCookie , description) values ('user_defined_data','Display User Defined Data for plots, if available'); + +insert into dba_cookieLabels (viewOrCookie , description) values ('mapping_icons_not_colored','Do not use colors to differentiate mapping icons (much easier to read for those who are color-blind).'); + + + +DELETE FROM dba_confidentialityStatus ; + +insert into dba_confidentialityStatus (confidentialityStatus,confidentialityText,confidentialityShortText) values (0,'exact location','exact'); +insert into dba_confidentialityStatus (confidentialityStatus,confidentialityText,confidentialityShortText) values (1,'1 km radius (nearest 0.01 degree)','1 km'); +insert into dba_confidentialityStatus (confidentialityStatus,confidentialityText,confidentialityShortText) values (2,'10 km radius (nearest 0.1 degree)','10 km'); +insert into dba_confidentialityStatus (confidentialityStatus,confidentialityText,confidentialityShortText) values (3,'100 km radius (nearest degree)','100 km'); +insert into dba_confidentialityStatus (confidentialityStatus,confidentialityText,confidentialityShortText) values (4,'NOT IMPLEMENTED: location embargo','location'); +insert into dba_confidentialityStatus (confidentialityStatus,confidentialityText,confidentialityShortText) values (5,'NOT IMPLEMENTED: public embargo','public emb.'); +insert into dba_confidentialityStatus (confidentialityStatus,confidentialityText,confidentialityShortText) values (6,'complete embargo','complete'); +-- the following is a "pseudo value" in that it is not stored in the database this way, but is calculated. +insert into dba_confidentialityStatus (confidentialityStatus,confidentialityText,confidentialityShortText) values (106,'expired embargo','expired'); + + + +-- data required for aux_role : only inserts this data if it isn't already there. +INSERT INTO aux_role ( rolecode , roledescription , accessioncode , roleproject , roleobservation , roletaxonint , roleclassint ) SELECT 'Author',null,'VB.AR.16.AUTHOR','2','2',null,null WHERE (select count(1) from aux_role where accessionCode='VB.AR.16.AUTHOR')=0;; +INSERT INTO aux_role ( rolecode , roledescription , accessioncode , roleproject , roleobservation , roletaxonint , roleclassint ) SELECT 'Contact','VegBankContactParty','VB.AR.17.CONTACT','2','2',null,null WHERE (select count(1) from aux_role where accessionCode='VB.AR.17.CONTACT')=0; +INSERT INTO aux_role ( rolecode , roledescription , accessioncode , roleproject , roleobservation , roletaxonint , roleclassint ) SELECT 'PI','PrimaryInvestigator','VB.AR.18.PI','1','1',null,null WHERE (select count(1) from aux_role where accessionCode='VB.AR.18.PI')=0; +INSERT INTO aux_role ( rolecode , roledescription , accessioncode , roleproject , roleobservation , roletaxonint , roleclassint ) SELECT 'DataManager',null,'VB.AR.19.DATAMANAGER',null,null,'2',null WHERE (select count(1) from aux_role where accessionCode='VB.AR.19.DATAMANAGER')=0; +INSERT INTO aux_role ( rolecode , roledescription , accessioncode , roleproject , roleobservation , roletaxonint , roleclassint ) SELECT 'Classifier',null,'VB.AR.34.CLASSIFIER',null,null,null,'1' WHERE (select count(1) from aux_role where accessionCode='VB.AR.34.CLASSIFIER')=0; +INSERT INTO aux_role ( rolecode , roledescription , accessioncode , roleproject , roleobservation , roletaxonint , roleclassint ) SELECT 'Plotauthor',null,'VB.AR.36.PLOTAUTHOR',null,null,'1',null WHERE (select count(1) from aux_role where accessionCode='VB.AR.36.PLOTAUTHOR')=0; +INSERT INTO aux_role ( rolecode , roledescription , accessioncode , roleproject , roleobservation , roletaxonint , roleclassint ) SELECT 'Co-PI',null,'VB.AR.38.COPI','2','2',null,null WHERE (select count(1) from aux_role where accessionCode='VB.AR.38.COPI')=0; +INSERT INTO aux_role ( rolecode , roledescription , accessioncode , roleproject , roleobservation , roletaxonint , roleclassint ) SELECT 'Computer(automated)',null,'VB.AR.39.COMPUTERAUTOMAT',null,null,'2',null WHERE (select count(1) from aux_role where accessionCode='VB.AR.39.COMPUTERAUTOMAT')=0; +INSERT INTO aux_role ( rolecode , roledescription , accessioncode , roleproject , roleobservation , roletaxonint , roleclassint ) SELECT 'Consultant',null,'VB.AR.40.CONSULTANT',null,null,null,'2' WHERE (select count(1) from aux_role where accessionCode='VB.AR.40.CONSULTANT')=0; +INSERT INTO aux_role ( rolecode , roledescription , accessioncode , roleproject , roleobservation , roletaxonint , roleclassint ) SELECT 'Fieldassistant',null,'VB.AR.43.FIELDASSISTANT',null,'2',null,null WHERE (select count(1) from aux_role where accessionCode='VB.AR.43.FIELDASSISTANT')=0; +INSERT INTO aux_role ( rolecode , roledescription , accessioncode , roleproject , roleobservation , roletaxonint , roleclassint ) SELECT 'Guide',null,'VB.AR.44.GUIDE',null,'2',null,null WHERE (select count(1) from aux_role where accessionCode='VB.AR.44.GUIDE')=0; +INSERT INTO aux_role ( rolecode , roledescription , accessioncode , roleproject , roleobservation , roletaxonint , roleclassint ) SELECT 'Landowner',null,'VB.AR.45.LANDOWNER',null,'2',null,null WHERE (select count(1) from aux_role where accessionCode='VB.AR.45.LANDOWNER')=0; +INSERT INTO aux_role ( rolecode , roledescription , accessioncode , roleproject , roleobservation , roletaxonint , roleclassint ) SELECT 'Unknown','NotSpecifiedorUnknown','VB.AR.47.NOTSPECIFIEDUNK','2','2','2','2' WHERE (select count(1) from aux_role where accessionCode='VB.AR.47.NOTSPECIFIEDUNK')=0; +INSERT INTO aux_role ( rolecode , roledescription , accessioncode , roleproject , roleobservation , roletaxonint , roleclassint ) SELECT 'Passiveobserver',null,'VB.AR.48.PASSIVEOBSERVER',null,'2',null,null WHERE (select count(1) from aux_role where accessionCode='VB.AR.48.PASSIVEOBSERVER')=0; +INSERT INTO aux_role ( rolecode , roledescription , accessioncode , roleproject , roleobservation , roletaxonint , roleclassint ) SELECT 'Plotcontributor',null,'VB.AR.50.PLOTCONTRIBUTOR',null,null,'2',null WHERE (select count(1) from aux_role where accessionCode='VB.AR.50.PLOTCONTRIBUTOR')=0; +INSERT INTO aux_role ( rolecode , roledescription , accessioncode , roleproject , roleobservation , roletaxonint , roleclassint ) SELECT 'Publicationauthor',null,'VB.AR.51.PUBLICATIONAUTH',null,null,'2','2' WHERE (select count(1) from aux_role where accessionCode='VB.AR.51.PUBLICATIONAUTH')=0; +INSERT INTO aux_role ( rolecode , roledescription , accessioncode , roleproject , roleobservation , roletaxonint , roleclassint ) SELECT 'Researchadvisor',null,'VB.AR.53.RESEARCHADVISOR','2','2',null,'2' WHERE (select count(1) from aux_role where accessionCode='VB.AR.53.RESEARCHADVISOR')=0; +INSERT INTO aux_role ( rolecode , roledescription , accessioncode , roleproject , roleobservation , roletaxonint , roleclassint ) SELECT 'Systemmanager',null,'VB.AR.54.SYSTEMMANAGER',null,null,null,null WHERE (select count(1) from aux_role where accessionCode='VB.AR.54.SYSTEMMANAGER')=0; +INSERT INTO aux_role ( rolecode , roledescription , accessioncode , roleproject , roleobservation , roletaxonint , roleclassint ) SELECT 'Taxonomist',null,'VB.AR.55.TAXONOMIST',null,'2',null,null WHERE (select count(1) from aux_role where accessionCode='VB.AR.55.TAXONOMIST')=0; + +-- only adds data if there is currently none in this table. + insert into dba_onerow (dba_onerow_id) select (1) where (select count(1) from dba_onerow)=0; \ No newline at end of file diff --git a/migrations/7_create_temp_tbls.sql b/migrations/7_create_temp_tbls.sql new file mode 100644 index 0000000..f4eaa1f --- /dev/null +++ b/migrations/7_create_temp_tbls.sql @@ -0,0 +1,110 @@ +--creates and populates temporary tables in VegBank: +-- MUST START WITH temptbl_ to be ignored by verify script + + +--handled in model creation! +--DROP TABLE temptbl_std_plantnames; +--CREATE TABLE temptbl_std_plantnames +--( +--PLANTCONCEPT_ID serial , +--plantname varchar(255), +--sciname varchar (255), +--scinamenoauth varchar (255), +--code varchar (255), +--common varchar (255), +--PRIMARY KEY ( PLANTCONCEPT_ID ) +--); + +delete from temptbl_std_plantnames; + +INSERT INTO temptbl_std_plantnames (plantConcept_ID, sciname, scinamenoauth,code,common, plantname) + SELECT plantConcept_ID, + (select (plantname) from view_std_plantnames_sciname as newnames + WHERE newnames.plantconcept_ID = plantconcept.plantconcept_id limit 1), + (select (plantname) from view_std_plantnames_scinamenoauth as newnames + WHERE newnames.plantconcept_ID = plantconcept.plantconcept_id limit 1), + (select (plantname) from view_std_plantnames_code as newnames + WHERE newnames.plantconcept_ID = plantconcept.plantconcept_id limit 1), + (select (plantname) from view_std_plantnames_common as newnames + WHERE newnames.plantconcept_ID = plantconcept.plantconcept_id limit 1) , plantname FROM plantConcept; + +--populate systems: +--UPDATE temptbl_std_plantnames SET sciname=(select min(plantname) from view_std_plantnames_sciname as newnames +-- WHERE newnames.plantconcept_ID = temptbl_std_plantnames.plantconcept_id); + +--UPDATE temptbl_std_plantnames SET scinamenoauth=(select min(plantname) from view_std_plantnames_scinamenoauth as newnames +-- WHERE newnames.plantconcept_ID = plantconcept.plantconcept_id); + +--UPDATE temptbl_std_plantnames SET code=(select min(plantname) from view_std_plantnames_code as newnames +-- WHERE newnames.plantconcept_ID = plantconcept.plantconcept_id); + +--UPDATE temptbl_std_plantnames SET common=(select min(plantname) from view_std_plantnames_common as newnames +-- WHERE newnames.plantconcept_ID = plantconcept.plantconcept_id); + +--get any that aren't std: +UPDATE temptbl_std_plantnames SET sciname=(select min(plantname) from view_all_plantnames_sciname as newnames + WHERE newnames.plantconcept_ID = temptbl_std_plantnames.plantconcept_id) WHERE sciname is null; + +UPDATE temptbl_std_plantnames SET scinamenoauth=(select min(plantname) from view_all_plantnames_scinamenoauth as newnames + WHERE newnames.plantconcept_ID = temptbl_std_plantnames.plantconcept_id) WHERE scinamenoauth is null; + +-- not code, that leaves only to USDA : UPDATE temptbl_std_plantnames SET code=(select min(plantname) from view_all_plantnames_code as newnames +-- WHERE newnames.plantconcept_ID = temptbl_std_plantnames.plantconcept_id) WHERE code is null; + +UPDATE temptbl_std_plantnames SET common=(select min(plantname) from view_all_plantnames_common as newnames + WHERE newnames.plantconcept_ID = temptbl_std_plantnames.plantconcept_id) WHERE common is null; + + + + + +-- HANDLED ELSEWHERE! +--DROP TABLE temptbl_std_commnames; +--CREATE TABLE temptbl_std_commnames +--( +--COMMCONCEPT_ID serial , +--sciname varchar (255), +--translated varchar (255), +--code varchar (255), +--common varchar (255), +--PRIMARY KEY ( commCONCEPT_ID ) +--); + +delete from temptbl_std_commnames; + +INSERT INTO temptbl_std_commnames (commConcept_ID, sciname, translated,code,common) + SELECT commConcept_ID, + (select (commname) from view_std_commnames_sciname as newnames + WHERE newnames.commconcept_ID = commconcept.commconcept_id limit 1), + (select (commname) from view_std_commnames_translated as newnames + WHERE newnames.commconcept_ID = commconcept.commconcept_id limit 1), + (select (commname) from view_std_commnames_code as newnames + WHERE newnames.commconcept_ID = commconcept.commconcept_id limit 1), + (select (commname) from view_std_commnames_common as newnames + WHERE newnames.commconcept_ID = commconcept.commconcept_id limit 1) FROM commConcept ; + +--populate systems: +--UPDATE temptbl_std_commnames SET sciname=(select min(commname) from view_std_commnames_sciname as newnames +-- WHERE newnames.commconcept_ID = temptbl_std_commnames.commconcept_id); + +--UPDATE temptbl_std_commnames SET translated=(select min(commname) from view_std_commnames_translated as newnames +-- WHERE newnames.commconcept_ID = commconcept.commconcept_id); + +--UPDATE temptbl_std_commnames SET code=(select min(commname) from view_std_commnames_code as newnames +-- WHERE newnames.commconcept_ID = commconcept.commconcept_id); + +--UPDATE temptbl_std_commnames SET common=(select min(commname) from view_std_commnames_common as newnames +-- WHERE newnames.commconcept_ID = commconcept.commconcept_id); + +--get any that aren't std: +UPDATE temptbl_std_commnames SET sciname=(select min(commname) from view_all_commnames_sciname as newnames + WHERE newnames.commconcept_ID = temptbl_std_commnames.commconcept_id) WHERE sciname is null; + +UPDATE temptbl_std_commnames SET translated=(select min(commname) from view_all_commnames_translated as newnames + WHERE newnames.commconcept_ID = temptbl_std_commnames.commconcept_id) WHERE translated is null; + +UPDATE temptbl_std_commnames SET code=(select min(commname) from view_all_commnames_code as newnames + WHERE newnames.commconcept_ID = temptbl_std_commnames.commconcept_id) WHERE code is null; + +UPDATE temptbl_std_commnames SET common=(select min(commname) from view_all_commnames_common as newnames + WHERE newnames.commconcept_ID = temptbl_std_commnames.commconcept_id) WHERE common is null; \ No newline at end of file diff --git a/migrations/8_create_vegbank_views copy.sql b/migrations/8_create_vegbank_views copy.sql new file mode 100644 index 0000000..97ee832 --- /dev/null +++ b/migrations/8_create_vegbank_views copy.sql @@ -0,0 +1,426 @@ +--- VIEWS MUST BE DROPPED in drop_vegbank_views first! + + +CREATE VIEW view_party_public AS + SELECT party.party_id, accessioncode, salutation, surname, + givenname, middlename,organizationname, + contactinstructions, email + FROM party LEFT JOIN usr ON party.party_ID=usr.party_ID + WHERE + usr.usr_id is NULL OR usr.permission_type>1 + ; + + +drop view view_busRule_plotsizeshape; +CREATE VIEW view_busRule_plotsizeshape AS + + SELECT (project_id), (select projectName from project where project.project_ID=observation.projecT_ID) as projectName, + count(1) as plotcount + from plot inner join observation on plot.plot_ID=observation.plot_ID + where ((area is null) and (shape is null or (((shape)<>'Plotless') and (upper(shape) not like 'RELEV%')))) group by project_ID; + + +DROP view view_busRule_duplStratumType; + CREATE VIEW view_busRule_duplStratumType AS + SELECT count(1), stratummethod_id, stratumindex FROM stratumType GROUP BY stratummethod_id, stratumindex HAVING count(1) > 1; + +DROP view view_busRule_duplcovercode; + CREATE VIEW view_busRule_duplcovercode AS + SELECT count(1), covermethod_id, covercode FROM coverIndex GROUP BY covermethod_id, covercode HAVING count(1) > 1; + +-- EMBARGO views +drop view view_emb_embargo_complete; +drop view view_emb_embargo_currentfullonly; + +CREATE VIEW view_emb_embargo_currentfullonly AS + SELECT * FROM embargo WHERE (((defaultStatus)=6) AND ((embargoStart)Now())); + + + +CREATE VIEW view_emb_embargo_complete AS + SELECT Coalesce(emb.defaultStatus,0) AS currentEmb, plot.plot_id + FROM plot LEFT JOIN view_emb_embargo_currentfullonly AS emb ON plot.PLOT_ID = emb.plot_ID; + + + + CREATE VIEW view_notEmb_classContributor AS SELECT * FROM classContributor where emb_classContributor<6; + CREATE VIEW view_notEmb_commClass AS SELECT * FROM commClass where emb_commClass<6; + CREATE VIEW view_notEmb_commInterpretation AS SELECT * FROM commInterpretation where emb_commInterpretation<6; + CREATE VIEW view_notEmb_disturbanceObs AS SELECT * FROM disturbanceObs where emb_disturbanceObs<6; + CREATE VIEW view_notEmb_observation AS SELECT * FROM observation where emb_observation<6; + CREATE VIEW view_notEmb_observationContributor AS SELECT observationContributor.* FROM observationContributor inner join observation on observationContributor.observation_ID=observation.observation_ID where observation.emb_observation<6; + + CREATE VIEW view_notEmb_plot AS SELECT * FROM plot where emb_plot<6; + CREATE VIEW view_notEmb_soilObs AS SELECT * FROM soilObs where emb_soilObs<6; + CREATE VIEW view_notEmb_stemCount AS SELECT * FROM stemCount where emb_stemCount<6; + CREATE VIEW view_notEmb_stemLocation AS SELECT * FROM stemLocation where emb_stemLocation<6; + CREATE VIEW view_notEmb_taxonAlt AS SELECT * FROM taxonAlt where emb_taxonAlt<6; + CREATE VIEW view_notEmb_taxonImportance AS SELECT * FROM taxonImportance where emb_taxonImportance<6; + CREATE VIEW view_notEmb_taxonInterpretation AS SELECT * FROM taxonInterpretation where emb_taxonInterpretation<6; + CREATE VIEW view_notEmb_taxonObservation AS SELECT * FROM taxonObservation where emb_taxonObservation<6; + + CREATE VIEW view_export_classContributor AS SELECT * FROM view_notemb_classContributor; + CREATE VIEW view_export_commClass AS SELECT * FROM view_notemb_commClass; + CREATE VIEW view_export_commInterpretation AS SELECT * FROM view_notemb_commInterpretation; + CREATE VIEW view_export_disturbanceObs AS SELECT * FROM view_notemb_disturbanceObs; + + CREATE VIEW view_export_observation AS SELECT * FROM view_notemb_observation; + CREATE VIEW view_export_observationcontributor AS SELECT * FROM view_notemb_observationcontributor; + -- PLOT requires shifting field names to remove some fields for confidential plots + + CREATE VIEW view_export_plot_pre AS SELECT plot_id, authorplotcode, reference_id, parent_id, locationaccuracy, confidentialitystatus, latitude, longitude, CASE WHEN confidentialitystatus>0 THEN null ELSE authorlocation END as authorlocation_emb, CASE WHEN confidentialitystatus>0 THEN null ELSE locationnarrative END as locationnarrative_emb, azimuth, dsgpoly, shape, area, standsize, placementmethod, permanence, layoutnarrative, elevation, elevationaccuracy, elevationrange, slopeaspect, minslopeaspect, maxslopeaspect, slopegradient, minslopegradient, maxslopegradient, topoposition, landform, surficialdeposits, rocktype, stateprovince, country, submitter_surname, submitter_givenname, submitter_email, notespublic, notesmgt, revisions, dateentered, emb_plot, plotrationalenarrative, accessioncode FROM view_notemb_plot; + CREATE VIEW view_export_plot AS SELECT plot_id, authorplotcode, reference_id, parent_id, locationaccuracy, confidentialitystatus, latitude, longitude, authorlocation_emb as authorlocation, locationnarrative_emb as locationnarrative, azimuth, dsgpoly, shape, area, standsize, placementmethod, permanence, layoutnarrative, elevation, elevationaccuracy, elevationrange, slopeaspect, minslopeaspect, maxslopeaspect, slopegradient, minslopegradient, maxslopegradient, topoposition, landform, surficialdeposits, rocktype, stateprovince, country, submitter_surname, submitter_givenname, submitter_email, notespublic, notesmgt, revisions, dateentered, emb_plot, plotrationalenarrative, accessioncode FROM view_export_plot_pre; + + CREATE VIEW view_export_soilObs AS SELECT * FROM view_notemb_soilObs; + CREATE VIEW view_export_stemCount AS SELECT * FROM view_notemb_stemCount; + CREATE VIEW view_export_stemLocation AS SELECT * FROM view_notemb_stemLocation; + CREATE VIEW view_export_taxonAlt AS SELECT * FROM view_notemb_taxonAlt; + CREATE VIEW view_export_taxonImportance AS SELECT * FROM view_notemb_taxonImportance; + CREATE VIEW view_export_taxonInterpretation AS SELECT * FROM view_notemb_taxonInterpretation; + CREATE VIEW view_export_taxonObservation AS SELECT * FROM view_notemb_taxonObservation; + +------------------ +-- END EMBARGO VIEWS +------------------- + + + CREATE VIEW view_reference_transl AS + SELECT CASE WHEN shortName IS NULL + THEN CASE WHEN title IS NULL + THEN CASE WHEN fulltext IS NULL + THEN '[poorly documented reference]' + ELSE CASE WHEN length(fulltext)>35 + THEN substr(fulltext,1,32) || '...' + ELSE fulltext + END + END + ELSE title + END + ELSE shortName + END + AS reference_id_transl, reference_id from reference; + +CREATE VIEW view_plantconcept_transl AS + SELECT plantconcept_id, plantname_id, plantname, reference_id, + plantname || ' [' || (select reference_id_transl + FROM view_reference_transl + where view_reference_transl.reference_id=plantconcept.reference_id) || ']' as plantconcept_id_transl + FROM plantconcept; + +CREATE VIEW view_commconcept_transl AS + SELECT commconcept_id, commname_id, commname, reference_id, + commname || ' [' || (select reference_id_transl + FROM view_reference_transl + where view_reference_transl.reference_id=commconcept.reference_id) || ']' as commconcept_id_transl + FROM commconcept; + + + + + CREATE VIEW view_party_transl AS + SELECT CASE WHEN surname is null + THEN CASE WHEN organizationname IS NULL + THEN '[poorly documented party]' + ELSE organizationname || ' (organization)' + END + ELSE surname || CASE WHEN givenname IS NULL + THEN '' + ELSE ', ' || COALESCE(givenname,'') + END + END + AS party_id_transl, party_id + FROM party ; + + +--- browsing by party views: ----- + +CREATE VIEW view_browseparty_obscontrib AS + SELECT observationContributor.PARTY_ID, observationContributor.OBSERVATION_ID + FROM view_notemb_observation as observation INNER JOIN observationContributor ON observation.OBSERVATION_ID = observationContributor.OBSERVATION_ID + GROUP BY observationContributor.PARTY_ID, observationContributor.OBSERVATION_ID; + +CREATE VIEW view_browseparty_projectcontrib AS + SELECT observation_1.OBSERVATION_ID, projectContributor.PARTY_ID + FROM (project INNER JOIN view_notemb_observation AS observation_1 ON project.PROJECT_ID = observation_1.PROJECT_ID) INNER JOIN projectContributor ON project.PROJECT_ID = projectContributor.PROJECT_ID + GROUP BY observation_1.OBSERVATION_ID, projectContributor.PARTY_ID; + +CREATE VIEW view_browseparty_classcontrib AS + SELECT observation_2.OBSERVATION_ID, classContributor.PARTY_ID + FROM view_notemb_observation AS observation_2 INNER JOIN (commClass INNER JOIN classContributor ON commClass.COMMCLASS_ID = classContributor.COMMCLASS_ID) ON observation_2.OBSERVATION_ID = commClass.OBSERVATION_ID + GROUP BY observation_2.OBSERVATION_ID, classContributor.PARTY_ID; + + + +CREATE VIEW view_browseparty_all AS + SELECT OBSERVATION_ID, PARTY_ID + FROM view_browseparty_classcontrib + union SELECT OBSERVATION_ID, PARTY_ID + FROM view_browseparty_projectcontrib + UNION SELECT OBSERVATION_ID, PARTY_ID + FROM view_browseparty_obscontrib; + + +CREATE VIEW view_browseparty_all_count AS SELECT count(1) AS countallcontrib, party_ID +FROM view_browseparty_all +GROUP BY party_ID; + + +CREATE VIEW view_browseparty_classcontrib_count AS SELECT count(1) AS countclasscontrib, party_ID +FROM view_browseparty_classcontrib +GROUP BY party_ID; + + +CREATE VIEW view_browseparty_obscontrib_count AS SELECT count(1) AS countobscontrib, party_ID +FROM view_browseparty_obscontrib +GROUP BY party_ID; + + +CREATE VIEW view_browseparty_projectcontrib_count AS SELECT count(1) AS countprojectcontrib, party_ID +FROM view_browseparty_projectcontrib +GROUP BY party_ID; + + +CREATE VIEW view_browseparty_all_count_combined AS + SELECT view_browseparty_all_count.party_ID, view_browseparty_all_count.countallcontrib, view_browseparty_classcontrib_count.countclasscontrib, view_browseparty_obscontrib_count.countobscontrib, view_browseparty_projectcontrib_count.countprojectcontrib + FROM ((view_browseparty_all_count LEFT JOIN view_browseparty_classcontrib_count ON view_browseparty_all_count.party_ID = view_browseparty_classcontrib_count.party_ID) LEFT JOIN view_browseparty_obscontrib_count ON view_browseparty_all_count.party_ID = view_browseparty_obscontrib_count.party_ID) LEFT JOIN view_browseparty_projectcontrib_count ON view_browseparty_all_count.party_ID = view_browseparty_projectcontrib_count.party_ID + ORDER BY countallcontrib DESC; + + +CREATE view view_csv_taxonimportance_pre AS +SELECT taxonobservation.observation_id AS observation_ID, + authorplantname AS plant, + (CASE WHEN (taxonimportance.stratum_id is null) THEN '-all-' ELSE (SELECT stratumtype.stratumname FROM stratumtype, stratum + WHERE stratum.stratumtype_id=stratumtype.stratumtype_id AND stratum.stratum_id=taxonimportance.stratum_id) END) AS stratum, + cover, + (select min(coverIndex.coverCode) from coverIndex where coverPercent=taxonimportance.cover + AND coverIndex.coverMethod_ID=observation.coverMethod_ID and observation.observation_ID=taxonobservation.observation_ID) + as coverCode_exact, + (select min(coverIndex.coverCode) from coverIndex where upperlimit>=taxonimportance.cover and lowerlimit<=taxonimportance.cover + AND coverIndex.coverMethod_ID=observation.coverMethod_ID and observation.observation_ID=taxonobservation.observation_ID) + as coverCode_byrange, + taxonimportance.basalarea, taxonobservation.accessioncode + FROM taxonobservation, taxonimportance, view_notemb_observation AS observation + WHERE taxonobservation.taxonobservation_id=taxonimportance.taxonobservation_id AND + taxonobservation.observation_ID=observation.observation_ID ; + +CREATE view view_csv_taxonimportance AS + SELECT observation_ID, plant, stratum, cover, CASE WHEN (covercode_exact is null) THEN covercode_byrange ELSE covercode_exact END as covercode, + basalarea, accessioncode + FROM view_csv_taxonimportance_pre; + + + + + + -- the following views create "standard" names for plantconcepts, based on usages of preferred party and classsystems: + DROP VIEW view_std_plantnames_code; + CREATE VIEW view_std_plantnames_code AS + SELECT plantconcept_id, plantname FROM plantusage WHERE classsystem = 'Code' AND party_id = + (SELECT party_id FROM party WHERE accessioncode='VB.Py.511.USDANRCSPLANTS2') AND usagestop IS NULL; + + DROP VIEW view_std_plantnames_sciname; + CREATE VIEW view_std_plantnames_sciname AS + SELECT plantconcept_id, plantname FROM plantusage WHERE classsystem = 'Scientific' AND party_id = + (SELECT party_id FROM party WHERE accessioncode='VB.Py.511.USDANRCSPLANTS2') AND usagestop IS NULL; + + DROP VIEW view_std_plantnames_scinamenoauth; + CREATE VIEW view_std_plantnames_scinamenoauth AS + SELECT plantconcept_id, plantname FROM plantusage WHERE classsystem = 'Scientific without authors' AND party_id = + (SELECT party_id FROM party WHERE accessioncode='VB.Py.511.USDANRCSPLANTS2') AND usagestop IS NULL; + + DROP VIEW view_std_plantnames_common; + CREATE VIEW view_std_plantnames_common AS + SELECT plantconcept_id, plantname FROM plantusage WHERE classsystem = 'English Common' AND party_id = + (SELECT party_id FROM party WHERE accessioncode='VB.Py.511.USDANRCSPLANTS2') AND usagestop IS NULL; + + --the following views are same as above, but not party specific, to catch "other concepts": + DROP VIEW view_all_plantnames_code; + CREATE VIEW view_all_plantnames_code AS + SELECT plantconcept_id, plantname FROM plantusage WHERE classsystem = 'Code' ; + + DROP VIEW view_all_plantnames_sciname; + CREATE VIEW view_all_plantnames_sciname AS + SELECT plantconcept_id, plantname FROM plantusage WHERE classsystem = 'Scientific' ; + + DROP VIEW view_all_plantnames_scinamenoauth; + CREATE VIEW view_all_plantnames_scinamenoauth AS + SELECT plantconcept_id, plantname FROM plantusage WHERE classsystem = 'Scientific without authors' ; + + DROP VIEW view_all_plantnames_common; + CREATE VIEW view_all_plantnames_common AS + SELECT plantconcept_id, plantname FROM plantusage WHERE classsystem = 'English Common' ; + + + -- the following views create "standard" names for commconcepts, based on usages of preferred party and classsystems: + DROP VIEW view_std_commnames_code; + CREATE VIEW view_std_commnames_code AS + SELECT commconcept_id, commname FROM commusage WHERE classsystem = 'Code' AND party_id = + (SELECT party_id FROM party WHERE accessioncode='VB.Py.512.NATURESERVE') AND usagestop IS NULL; + + DROP VIEW view_std_commnames_sciname; + CREATE VIEW view_std_commnames_sciname AS + SELECT commconcept_id, commname FROM commusage WHERE classsystem = 'Scientific' AND party_id = + (SELECT party_id FROM party WHERE accessioncode='VB.Py.512.NATURESERVE') AND usagestop IS NULL; + + DROP VIEW view_std_commnames_translated; + CREATE VIEW view_std_commnames_translated AS + SELECT commconcept_id, commname FROM commusage WHERE classsystem = 'Translated' AND party_id = + (SELECT party_id FROM party WHERE accessioncode='VB.Py.512.NATURESERVE') AND usagestop IS NULL; + + DROP VIEW view_std_commnames_common; + CREATE VIEW view_std_commnames_common AS + SELECT commconcept_id, commname FROM commusage WHERE classsystem = 'Common' AND party_id = + (SELECT party_id FROM party WHERE accessioncode='VB.Py.512.NATURESERVE') AND usagestop IS NULL; + + + DROP VIEW view_all_commnames_code; + CREATE VIEW view_all_commnames_code AS + SELECT commconcept_id, commname FROM commusage WHERE classsystem = 'Code' ; + + DROP VIEW view_all_commnames_sciname; + CREATE VIEW view_all_commnames_sciname AS + SELECT commconcept_id, commname FROM commusage WHERE classsystem = 'Scientific' ; + + DROP VIEW view_all_commnames_translated; + CREATE VIEW view_all_commnames_translated AS + SELECT commconcept_id, commname FROM commusage WHERE classsystem = 'Translated' ; + + DROP VIEW view_all_commnames_common; + CREATE VIEW view_all_commnames_common AS + SELECT commconcept_id, commname FROM commusage WHERE classsystem = 'Common' ; + + + CREATE VIEW view_comminterp_more AS + SELECT commClass.observation_ID, + inspection,tableanalysis,multivariateanalysis,expertsystem,classpublication_id,classnotes,accessioncode,classstartdate,classstopdate, + comminterpretation.* , + (CASE + WHEN classfit='Absolutely wrong' THEN 6 + WHEN classfit='Understandable but wrong' THEN 4 + WHEN classfit='Reasonable or acceptable answer' THEN 3 + WHEN classfit='Good answer' THEN 2 + WHEN classfit='Absolutely correct' THEN 1 + ELSE 5 END) as classfitnum, + (CASE + WHEN classconfidence='High' THEN 1 + WHEN classconfidence='Medium' THEN 2 + WHEN classconfidence='Low' THEN 3 + ELSE 4 END) as classconfidencenum + FROM view_notemb_commClass as commclass, comminterpretation WHERE commclass.commclass_ID = comminterpretation.commclass_ID; + +CREATE VIEW view_taxonInterp_more AS + SELECT taxonInterpretation.*, plantconcept.accessionCode AS pc_accessioncode, plantconcept.plantname as pc_plantname, + taxonobservation.observation_ID + FROM view_notEmb_taxonInterpretation as taxonInterpretation, taxonobservation, plantconcept + WHERE taxonobservation.taxonobservation_ID=taxonInterpretation.taxonobservation_ID + AND plantconcept.plantconcept_id=taxonInterpretation.plantconcept_id; + +CREATE VIEW view_observation_transl AS + SELECT observation_ID, + COALESCE(authorObsCode,authorPlotCode) AS observation_id_transl + FROM view_notemb_observation as observation, plot + WHERE observation.plot_ID = plot.plot_ID; + +-- CREATE VIEW view_taxonobs_distinctid_curr AS SELECT observation_id, int_currplantconcept_id as plantconcept_id, max(cover) as maxplantcover FROM view_notEmb_taxonObservation as taxonobservation, taxonimportance where taxonimportance.taxonobservation_id=taxonobservation.taxonobservation_id GROUP BY plantconcept_id,observation_id; + +-- this view needed in the event there are no taxonimportance records for a taxonobservation. +-- drop view view_taxonobs_withmaxcover; +CREATE VIEW view_taxonobs_withmaxcover AS + SELECT taxonobservation.*, + (select max(cover) from taxonimportance where taxonimportance.taxonobservation_ID=taxonobservation.taxonobservation_ID) as maxcover + FROM view_notEmb_taxonObservation as taxonobservation; + +-- drop view view_taxonobs_distinctid_curr; +CREATE VIEW view_taxonobs_distinctid_curr AS + SELECT userdataset_id, observation_id, int_currplantconcept_id as plantconcept_id, max(maxcover) as maxplantcover + FROM view_taxonobs_withmaxcover as taxonobservation, userdatasetitem + WHERE observation_id = itemrecord AND itemtable='observation' + GROUP BY plantconcept_id,userdataset_id,observation_id; + +-- drop view view_taxonobs_distinctid_curr_counts; +CREATE VIEW view_taxonobs_distinctid_curr_counts AS + SELECT userdataset_id, plantconcept_id, count(1) AS countObs, avg(maxplantcover) AS avgcovernoround, + min(maxplantcover) AS mincovernoround, max(maxplantcover) AS maxcovernoround + FROM view_taxonobs_distinctid_curr + GROUP BY userdataset_id, plantconcept_id; + +-- drop view view_taxonobs_distinctid_curr_counts_plants; +CREATE VIEW view_taxonobs_distinctid_curr_counts_plants AS + SELECT view_taxonobs_distinctid_curr_counts.*, round(CAST (view_taxonobs_distinctid_curr_counts.avgcovernoround as numeric),3) AS avgcover, + round(CAST (view_taxonobs_distinctid_curr_counts.mincovernoround as numeric),3) AS mincover, + round(CAST (view_taxonobs_distinctid_curr_counts.maxcovernoround as numeric),3) AS maxcover, + temptbl_std_plantnames.plantname, temptbl_std_plantnames.sciname, temptbl_std_plantnames.scinamenoauth, + temptbl_std_plantnames.code,temptbl_std_plantnames.common FROM temptbl_std_plantnames, view_taxonobs_distinctid_curr_counts + WHERE view_taxonobs_distinctid_curr_counts.plantconcept_ID=temptbl_std_plantnames.plantconcept_ID; +--DROP VIEW view_plotall_withembargo; +CREATE VIEW view_plotall_withembargo +AS SELECT plot.*, embargo_id, embargoreason,defaultstatus,embargostart,embargostop, (defaultstatus + CASE WHEN embargostop 'implementation' and lower(fieldmodel) <> 'denorm' + ORDER BY dba_fielddescription_id ; + + +create view stratumtype_x_stratummethod AS select stratumType.*, stratumMethod.accessionCode as sm_accCode from stratumType inner join stratummethod on stratumType.stratummethod_id=stratummethod.stratummethod_id; + +create view stratumtype_x_observation AS SELECT stratum.stratum_id, + stratum.stratumname, + observation.accessioncode + FROM observation + JOIN stratum ON observation.observation_id = stratum.observation_id; + \ No newline at end of file From 39300efef200b11e9694b8999909a41a2bb1fc89 Mon Sep 17 00:00:00 2001 From: Dou Mok Date: Mon, 5 Aug 2024 07:31:49 -0700 Subject: [PATCH 05/49] Rename migration file, add additional context for 'INSTALL.md' regarding migration files --- ...e_vegbank_views copy.sql => 8_create_vegbank_views.sql} | 0 sql-transformations/INSTALL.md | 7 ++++++- 2 files changed, 6 insertions(+), 1 deletion(-) rename migrations/{8_create_vegbank_views copy.sql => 8_create_vegbank_views.sql} (100%) diff --git a/migrations/8_create_vegbank_views copy.sql b/migrations/8_create_vegbank_views.sql similarity index 100% rename from migrations/8_create_vegbank_views copy.sql rename to migrations/8_create_vegbank_views.sql diff --git a/sql-transformations/INSTALL.md b/sql-transformations/INSTALL.md index cae5457..a67a893 100644 --- a/sql-transformations/INSTALL.md +++ b/sql-transformations/INSTALL.md @@ -36,4 +36,9 @@ Missing SQL Files that were declared in 'db_model_vegbank' and cannot be found: ## The remaining migrations -The other migration sqls were obtained by following the 'build.xml' structure. \ No newline at end of file +The other migration sqls (Steps 1 to 8) were obtained by following the 'build.xml' structure in the [Vegbank repo](https://github.com/NCEAS/vegbank/). + + +## Other Notes/Comments + +When reviewing Vegbank's 'db_model_vegbank.xml', there appears to be specific update versions to attributes for vegbank changes 1.0.*, which leads me to believe we can safely omit the respective `vegbank-changes-1.0.*.sql` files. \ No newline at end of file From 8ad27daf62e84cafa38c8fa6dc311ce67e6aa2d4 Mon Sep 17 00:00:00 2001 From: Dou Mok Date: Mon, 5 Aug 2024 07:45:10 -0700 Subject: [PATCH 06/49] Add additional context to 'INSTALL.md' for clarity --- sql-transformations/INSTALL.md | 71 ++++++++++++++++++++++++++++++---- 1 file changed, 63 insertions(+), 8 deletions(-) diff --git a/sql-transformations/INSTALL.md b/sql-transformations/INSTALL.md index a67a893..8638359 100644 --- a/sql-transformations/INSTALL.md +++ b/sql-transformations/INSTALL.md @@ -1,20 +1,76 @@ # VegBank PostGres Migration Notes -## 0_vegbank.sql +This install document outlines how to generate the Vegbank schema from scratch to reproduce the migration files found in `/migrations` -This is the first migration sql file to create the database tables +## Step 1: 0_vegbank.sql +This is the first migration sql file to create the relations. Run the following bash script in 'sql-transformations': ```sh ./getvegbanksql.sh ``` -Note: there is an issue with the syntax relating to the `dba_preassignacccode` table, so the equivalent 'migrations' file has been modified. +### Deprecated Code +There is an issue with the syntax relating to the formatting of time, so the equivalent 'migrations' file `0_vegbank.sql` has been modified. +So if you are generating this initial `0_vegbank.sql` file from scratch, you will need to fix the deprecated code. + +For example, RE: `dba_preassignacccode` was previously: + +``` +CREATE TABLE dba_preassignacccode +( + dba_preassignacccode_id integer + NOT NULL PRIMARY KEY default nextval('dba_preassignacccode_dba_preassignacccode_id_seq') + , + dba_requestnumber Integer NOT NULL, + databasekey varchar (20) NOT NULL, + tableabbrev varchar (10) NOT NULL, + confirmcode varchar (70) NOT NULL DEFAULT (replace(replace(replace(replace(now(),' ','T'),'-',''),':',''),'.','d') || 'R' || floor(random()*1000000)), + accessioncode varchar (255), + codeIsUsed Boolean + +); +``` + +And has been amended to: + +``` +CREATE TABLE dba_preassignacccode +( + dba_preassignacccode_id integer + NOT NULL PRIMARY KEY default nextval('dba_preassignacccode_dba_preassignacccode_id_seq') + , + dba_requestnumber Integer NOT NULL, + databasekey varchar (20) NOT NULL, + tableabbrev varchar (10) NOT NULL, + confirmcode varchar (70) NOT NULL DEFAULT ( + replace( + replace( + replace( + replace(to_char(now(), 'YYYY-MM-DD"T"HH24:MI:SS'), ' ', 'T'), '-', '' + ), ':', '' + ), '.', 'd' + ) || 'R' || floor(random() * 1000000) + ), + accessioncode varchar (255), + codeIsUsed Boolean +); +``` + +### UpdateSQL & Missing Files Missing SQL Files that were declared in 'db_model_vegbank' and cannot be found: - add_versionTable.sql - create_andPopulate_configTables.sql +Note: The `db_model_vegbank.xml` found in this repo has been modified to address the backward slashes to be forward slashes so that they can properly be referenced. +``` +throwAways\alterTaxObsDenormRenameSciNameToFull.sql +throwAways\createTable_dba_stats.sql +``` + +To find all the different updates, you can perform the following: + ```sh % grep "" db_model_vegbank.xml > updateSQLFileList.txt % sort db_model_vegbank_updateSQLFileList.txt| uniq > unique_rows.txt @@ -34,11 +90,10 @@ Missing SQL Files that were declared in 'db_model_vegbank' and cannot be found: throwAways\createTable_dba_stats.sql ``` -## The remaining migrations - -The other migration sqls (Steps 1 to 8) were obtained by following the 'build.xml' structure in the [Vegbank repo](https://github.com/NCEAS/vegbank/). +### Other Comments +When reviewing Vegbank's 'db_model_vegbank.xml', there appears to be specific update versions to attributes for vegbank changes 1.0.*, which leads me to believe we can safely omit the respective `vegbank-changes-1.0.*.sql` files. -## Other Notes/Comments +## The remaining migrations -When reviewing Vegbank's 'db_model_vegbank.xml', there appears to be specific update versions to attributes for vegbank changes 1.0.*, which leads me to believe we can safely omit the respective `vegbank-changes-1.0.*.sql` files. \ No newline at end of file +The other migration sqls (Steps 1 to 8) were obtained by following the 'build.xml' structure in the [Vegbank repo](https://github.com/NCEAS/vegbank/). From 3acdc7252471dea10136b09b07b5ae7a3e3aa3e0 Mon Sep 17 00:00:00 2001 From: Dou Mok Date: Mon, 5 Aug 2024 14:04:11 -0700 Subject: [PATCH 07/49] Add 'populate-datadictionary.sql' doc to migrations, update INSTALL.RST, add required dependencies to execute bash script --- migrations/9_populate-datadictionary.sql | 19560 ++++++++++++++++ sql-transformations/INSTALL.md | 13 +- sql-transformations/csvtools.xsl | 66 + sql-transformations/dbmodel-to-ddtables.xsl | 131 + .../getvegbanksql_datadictionary.sh | 29 + 5 files changed, 19798 insertions(+), 1 deletion(-) create mode 100644 migrations/9_populate-datadictionary.sql create mode 100644 sql-transformations/csvtools.xsl create mode 100644 sql-transformations/dbmodel-to-ddtables.xsl create mode 100755 sql-transformations/getvegbanksql_datadictionary.sh diff --git a/migrations/9_populate-datadictionary.sql b/migrations/9_populate-datadictionary.sql new file mode 100644 index 0000000..83fbbb7 --- /dev/null +++ b/migrations/9_populate-datadictionary.sql @@ -0,0 +1,19560 @@ + + -- + -- This is a generated SQL script for postgresql + -- + + -- first delete any info out of the tables + DELETE FROM dba_tableDescription; + DELETE FROM dba_fieldDescription; + DELETE FROM dba_fieldList; + + + INSERT INTO dba_tableDescription ( tableName , tableLabel , tableNotes , tableDescription , tableKeywords ) values ( + 'commConcept', + 'Community Concept', + 'This table store the concepts (assertions) that are linked to community names through the commUsage table.', + null, + ' commConcept Community Concept This table store the concepts (assertions) that are linked to community names through the commUsage table. COMMCONCEPT_ID ID COMMNAME_ID Community Name commName Community Name reference_ID Reference commDescription Community Description accessionCode Accession Code d_obscount Plot Count d_currentaccepted Currently Accepted by Someone ' + ); + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'commConcept', + 'COMMCONCEPT_ID', + 'ID', + 'logical', + 'yes', + 'serial', + 'PK', + 'n/a', + 'no', + 'n/a', + 'Database assigned value to each unique record in the commConcept table.', + + ' commConcept Community Concept COMMCONCEPT_ID ID logical serial PK n/a no n/a Database assigned value to each unique record in the commConcept table. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'commConcept', + 'COMMNAME_ID', + 'Community Name', + 'logical', + 'no', + 'Integer', + 'FK', + 'commName.COMMNAME_ID', + 'no', + 'na', + 'Foreign key into the commName table providing the name used for the community when it was defined by usage in a publication (which could be this database).', + + ' commConcept Community Concept COMMNAME_ID Community Name logical required Integer FK commName.COMMNAME_ID no na Foreign key into the commName table providing the name used for the community when it was defined by usage in a publication (which could be this database). ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'commConcept', + 'commName', + 'Community Name', + 'denorm', + 'yes', + 'text', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'The name the community is based on, denorm of commName_ID', + + ' commConcept Community Concept commName Community Name denorm text n/a n/a no n/a The name the community is based on, denorm of commName_ID ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'commConcept', + 'reference_ID', + 'Reference', + 'logical', + 'yes', + 'Integer', + 'FK', + 'reference.reference_ID', + 'no', + 'n/a', + 'Foreign key into the Reference table to identify a reference in which the community was identified by a name. This could be a regular publication, or a self reference created by completing the commDescription field in reference', + + ' commConcept Community Concept reference_ID Reference logical Integer FK reference.reference_ID no n/a Foreign key into the Reference table to identify a reference in which the community was identified by a name. This could be a regular publication, or a self reference created by completing the commDescription field in reference ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'commConcept', + 'commDescription', + 'Community Description', + 'logical', + 'yes', + 'text', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'The commDescription is a description of the community concept by the party that contributed the concept.', + + ' commConcept Community Concept commDescription Community Description logical text n/a n/a no n/a The commDescription is a description of the community concept by the party that contributed the concept. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'commConcept', + 'accessionCode', + 'Accession Code', + 'logical', + 'yes', + 'varchar (255)', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'Code that uniquely references this record, allowing reference to this record for this version of this database. Better than a primary key, which is automatically generated by a database and not globally unique. VegBank Accession codes are only generated by VegBank, and therefore data integrity can be guaranteed, unlike with a primary key (number).', + + ' commConcept Community Concept accessionCode Accession Code logical varchar (255) n/a n/a no n/a Code that uniquely references this record, allowing reference to this record for this version of this database. Better than a primary key, which is automatically generated by a database and not globally unique. VegBank Accession codes are only generated by VegBank, and therefore data integrity can be guaranteed, unlike with a primary key (number). ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'commConcept', + 'd_obscount', + 'Plot Count', + 'denorm', + 'yes', + 'Integer', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'Number of observations associated with this entity.', + + ' commConcept Community Concept d_obscount Plot Count denorm Integer n/a n/a no n/a Number of observations associated with this entity. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'commConcept', + 'd_currentaccepted', + 'Currently Accepted by Someone', + 'denorm', + 'yes', + 'Boolean', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'Currently accepted by at least one party.', + + ' commConcept Community Concept d_currentaccepted Currently Accepted by Someone denorm Boolean n/a n/a no n/a Currently accepted by at least one party. ' + + ); + + + INSERT INTO dba_tableDescription ( tableName , tableLabel , tableNotes , tableDescription , tableKeywords ) values ( + 'commCorrelation', + 'Community Correlation', + 'This table correlates multiple community concepts as they change through time in the perception of a party', + null, + ' commCorrelation Community Correlation This table correlates multiple community concepts as they change through time in the perception of a party COMMCORRELATION_ID ID COMMSTATUS_ID Community Status COMMCONCEPT_ID Community Concept commConvergence Community Convergence correlationStart Correlation Start correlationStop Correlation Stop ' + ); + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'commCorrelation', + 'COMMCORRELATION_ID', + 'ID', + 'logical', + 'yes', + 'serial', + 'PK', + 'n/a', + 'no', + 'n/a', + 'Database assigned value to each unique record in the communityCorrelation table.', + + ' commCorrelation Community Correlation COMMCORRELATION_ID ID logical serial PK n/a no n/a Database assigned value to each unique record in the communityCorrelation table. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'commCorrelation', + 'COMMSTATUS_ID', + 'Community Status', + 'logical', + 'no', + 'Integer', + 'FK', + 'commStatus.COMMSTATUS_ID', + 'no', + 'n/a', + 'This is the foreign key into the CommStatus table "pointing" to a concept no longer viewed as standard by the party.', + + ' commCorrelation Community Correlation COMMSTATUS_ID Community Status logical required Integer FK commStatus.COMMSTATUS_ID no n/a This is the foreign key into the CommStatus table "pointing" to a concept no longer viewed as standard by the party. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'commCorrelation', + 'COMMCONCEPT_ID', + 'Community Concept', + 'logical', + 'no', + 'Integer', + 'FK', + 'commConcept.COMMCONCEPT_ID', + 'no', + 'n/a', + 'This is the foreign key into the communityConcept table "pointing" to a concept recognized by the party as a "standard" concept.', + + ' commCorrelation Community Correlation COMMCONCEPT_ID Community Concept logical required Integer FK commConcept.COMMCONCEPT_ID no n/a This is the foreign key into the communityConcept table "pointing" to a concept recognized by the party as a "standard" concept. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'commCorrelation', + 'commConvergence', + 'Community Convergence', + 'logical', + 'no', + 'varchar (20)', + 'n/a', + 'n/a', + 'closed', + 'n/a', + 'This is the descriptive attribute that is used to relate the congruence between two concepts.', + + ' commCorrelation Community Correlation commConvergence Community Convergence logical required varchar (20) n/a n/a closed n/a This is the descriptive attribute that is used to relate the congruence between two concepts. equal The two concepts are exactly the same. greater than The reference concept (referenced in table:Status) fully contains the correlated concept (referenced in table:Concept), but also includes additional entities. less than The reference concept is fully included in the correlated concept, but the latter concept contains additional entities. not equal The two concepts are not exactly the same. This leaves the possibilities that the reference concept is greater than, less than, overlapping, similar, or disjunct relative to the correlated concept. overlapping The two concepts contain at least one common entity, and each concept also contains at least one entity that the other does not contain. Neither concept is fully contained in the other. similar The two concepts contain at least one common individual. disjunct The two concepts in question contain no common entities. undetermined Although some correlation is likely, the party responsible for the this correlation has not made a determination. ' + + ); + + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'commCorrelation', + 'commConvergence', + 'equal', + 'The two concepts are exactly the same.', + '1' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'commCorrelation', + 'commConvergence', + 'greater than', + 'The reference concept (referenced in table:Status) fully contains the correlated concept (referenced in table:Concept), but also includes additional entities.', + '2' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'commCorrelation', + 'commConvergence', + 'less than', + 'The reference concept is fully included in the correlated concept, but the latter concept contains additional entities.', + '3' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'commCorrelation', + 'commConvergence', + 'not equal', + 'The two concepts are not exactly the same. This leaves the possibilities that the reference concept is greater than, less than, overlapping, similar, or disjunct relative to the correlated concept.', + '4' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'commCorrelation', + 'commConvergence', + 'overlapping', + 'The two concepts contain at least one common entity, and each concept also contains at least one entity that the other does not contain. Neither concept is fully contained in the other.', + '5' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'commCorrelation', + 'commConvergence', + 'similar', + 'The two concepts contain at least one common individual.', + '6' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'commCorrelation', + 'commConvergence', + 'disjunct', + 'The two concepts in question contain no common entities.', + '7' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'commCorrelation', + 'commConvergence', + 'undetermined', + 'Although some correlation is likely, the party responsible for the this correlation has not made a determination.', + '8' + ); + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'commCorrelation', + 'correlationStart', + 'Correlation Start', + 'logical', + 'no', + 'Date', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'This is the start date for recognition by a party of a correlation between two concepts.', + + ' commCorrelation Community Correlation correlationStart Correlation Start logical required Date n/a n/a no n/a This is the start date for recognition by a party of a correlation between two concepts. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'commCorrelation', + 'correlationStop', + 'Correlation Stop', + 'logical', + 'yes', + 'Date', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'This is the stop date for recognition by a party of a correlation between two concepts.', + + ' commCorrelation Community Correlation correlationStop Correlation Stop logical Date n/a n/a no n/a This is the stop date for recognition by a party of a correlation between two concepts. ' + + ); + + + INSERT INTO dba_tableDescription ( tableName , tableLabel , tableNotes , tableDescription , tableKeywords ) values ( + 'commLineage', + 'Community Lineage', + 'This table stores tracks the lineage of vegetation community concepts.', + null, + ' commLineage Community Lineage This table stores tracks the lineage of vegetation community concepts. COMMLINEAGE_ID ID parentCommStatus_ID Parent Community Status childCommStatus_ID Child Community Status ' + ); + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'commLineage', + 'COMMLINEAGE_ID', + 'ID', + 'logical', + 'yes', + 'serial', + 'PK', + 'n/a', + 'no', + 'n/a', + 'Database assigned value to each unique record in the commLineage table.', + + ' commLineage Community Lineage COMMLINEAGE_ID ID logical serial PK n/a no n/a Database assigned value to each unique record in the commLineage table. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'commLineage', + 'parentCommStatus_ID', + 'Parent Community Status', + 'logical', + 'no', + 'Integer', + 'FK', + 'commStatus.COMMSTATUS_ID', + 'no', + 'n/a', + 'This is the foreign key into the commStatus table "pointing" to a parent concept.', + + ' commLineage Community Lineage parentCommStatus_ID Parent Community Status logical required Integer FK commStatus.COMMSTATUS_ID no n/a This is the foreign key into the commStatus table "pointing" to a parent concept. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'commLineage', + 'childCommStatus_ID', + 'Child Community Status', + 'logical', + 'no', + 'Integer', + 'FK', + 'commStatus.COMMSTATUS_ID', + 'no', + 'n/a', + 'This is the foreign key into the commStatus table "pointing" to a child concept.', + + ' commLineage Community Lineage childCommStatus_ID Child Community Status logical required Integer FK commStatus.COMMSTATUS_ID no n/a This is the foreign key into the commStatus table "pointing" to a child concept. ' + + ); + + + INSERT INTO dba_tableDescription ( tableName , tableLabel , tableNotes , tableDescription , tableKeywords ) values ( + 'commName', + 'Community Name', + 'This table stores vegetation community names', + null, + ' commName Community Name This table stores vegetation community names COMMNAME_ID ID commName Community Name reference_ID Reference dateEntered Date Entered ' + ); + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'commName', + 'COMMNAME_ID', + 'ID', + 'logical', + 'yes', + 'serial', + 'PK', + 'n/a', + 'no', + 'n/a', + 'Database assigned value to each unique record in the commName table.', + + ' commName Community Name COMMNAME_ID ID logical serial PK n/a no n/a Database assigned value to each unique record in the commName table. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'commName', + 'commName', + 'Community Name', + 'logical', + 'no', + 'text', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'The community name.', + + ' commName Community Name commName Community Name logical required text n/a n/a no n/a The community name. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'commName', + 'reference_ID', + 'Reference', + 'logical', + 'yes', + 'Integer', + 'FK', + 'reference.reference_ID', + 'no', + 'n/a', + 'Foreign key into reference to identify the source of the name.', + + ' commName Community Name reference_ID Reference logical Integer FK reference.reference_ID no n/a Foreign key into reference to identify the source of the name. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'commName', + 'dateEntered', + 'Date Entered', + 'logical', + 'yes', + 'Date', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'Field stores the date that the name was entered into the database.', + + ' commName Community Name dateEntered Date Entered logical Date n/a n/a no n/a Field stores the date that the name was entered into the database. ' + + ); + + + INSERT INTO dba_tableDescription ( tableName , tableLabel , tableNotes , tableDescription , tableKeywords ) values ( + 'commStatus', + 'Community Status', + 'This table store the status of a community concept as perceived by a party at a time.', + null, + ' commStatus Community Status This table store the status of a community concept as perceived by a party at a time. COMMSTATUS_ID ID COMMCONCEPT_ID Community Concept reference_ID Reference commConceptStatus Community Concept Status commParent_ID Community Parent commLevel Community Level startDate Start Date stopDate Stop Date commPartyComments Community Party Comments PARTY_ID Party accessionCode Accession Code ' + ); + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'commStatus', + 'COMMSTATUS_ID', + 'ID', + 'logical', + 'yes', + 'serial', + 'PK', + 'n/a', + 'no', + 'n/a', + 'Database assigned value to each unique record in the commStatus table.', + + ' commStatus Community Status COMMSTATUS_ID ID logical serial PK n/a no n/a Database assigned value to each unique record in the commStatus table. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'commStatus', + 'COMMCONCEPT_ID', + 'Community Concept', + 'logical', + 'no', + 'Integer', + 'FK', + 'commConcept.COMMCONCEPT_ID', + 'no', + 'n/a', + 'Foreign key to identify the concept to which a party assigns a status', + + ' commStatus Community Status COMMCONCEPT_ID Community Concept logical required Integer FK commConcept.COMMCONCEPT_ID no n/a Foreign key to identify the concept to which a party assigns a status ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'commStatus', + 'reference_ID', + 'Reference', + 'logical', + 'yes', + 'Integer', + 'FK', + 'reference.reference_ID', + 'no', + 'n/a', + 'Link to a reference where the status was reported', + + ' commStatus Community Status reference_ID Reference logical Integer FK reference.reference_ID no n/a Link to a reference where the status was reported ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'commStatus', + 'commConceptStatus', + 'Community Concept Status', + 'logical', + 'no', + 'varchar (20)', + 'n/a', + 'n/a', + 'closed', + 'closed list', + 'Status of the concept by the party (accepted, not accepted, undetermined)', + + ' commStatus Community Status commConceptStatus Community Concept Status logical required varchar (20) n/a n/a closed closed list Status of the concept by the party (accepted, not accepted, undetermined) accepted not accepted undetermined ' + + ); + + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'commStatus', + 'commConceptStatus', + 'accepted', + null, + '1' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'commStatus', + 'commConceptStatus', + 'not accepted', + null, + '2' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'commStatus', + 'commConceptStatus', + 'undetermined', + null, + '3' + ); + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'commStatus', + 'commParent_ID', + 'Community Parent', + 'logical', + 'yes', + 'Integer', + 'FK', + 'commConcept.COMMCONCEPT_ID', + 'no', + 'n/a', + 'The commParent is a recursive key to the concept of the parent level in the classification hierarchy. For example, if this concept were at the association level, the parentClass would be a concept that is the parent alliance type.', + + ' commStatus Community Status commParent_ID Community Parent logical Integer FK commConcept.COMMCONCEPT_ID no n/a The commParent is a recursive key to the concept of the parent level in the classification hierarchy. For example, if this concept were at the association level, the parentClass would be a concept that is the parent alliance type. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'commStatus', + 'commLevel', + 'Community Level', + 'logical', + 'yes', + 'varchar (80)', + 'n/a', + 'n/a', + 'closed', + 'closed list', + 'The commLevel attribute specifies a level in the taxonomic hierarchy to which a class belongs. Field commLevel is an open list with the possible values defined by the classification system employed. If the party responsible for the record in the commStatus table is using the U.S. National Vegetation Classification, the acceptable levels are defined in the Vegetation Classification Standard of the Federal Geographic Data Committee as adopted June 1997. The standard is available at http://biology.usgs.gov/fgdc.veg/standards/vegstd.htm and the allowable entries for each of the physiognomic levels are listed in the appendix (see http://www.fgdc.gov/standards/documents/standards/vegetation/tables19-41.pdf). If the Braun-Blanquet classification system is employed, the acceptable values are defined in the International Code of Phytosociological Nomenclature (Weber, H.E., Moravec, J. Theurillat, J.-P. 2000. Journal of Vegetation Science. 11: 739-769).', + + ' commStatus Community Status commLevel Community Level logical varchar (80) n/a n/a closed closed list The commLevel attribute specifies a level in the taxonomic hierarchy to which a class belongs. Field commLevel is an open list with the possible values defined by the classification system employed. If the party responsible for the record in the commStatus table is using the U.S. National Vegetation Classification, the acceptable levels are defined in the Vegetation Classification Standard of the Federal Geographic Data Committee as adopted June 1997. The standard is available at http://biology.usgs.gov/fgdc.veg/standards/vegstd.htm and the allowable entries for each of the physiognomic levels are listed in the appendix (see http://www.fgdc.gov/standards/documents/standards/vegetation/tables19-41.pdf). If the Braun-Blanquet classification system is employed, the acceptable values are defined in the International Code of Phytosociological Nomenclature (Weber, H.E., Moravec, J. Theurillat, J.-P. 2000. Journal of Vegetation Science. 11: 739-769). alliance A grouping of associations with a characteristic physiognomy and habitat and which share one or more diagnostic species typically found in the uppermost or dominant stratum of the vegetation. (This definition includes both floristic and physiognomic criteria, in keeping with the integrated physiognomic-floristic hierarchy of the NVC. It is similar to the FGDC 1997 definition: a physiognomically uniform group of Associations sharing one or more diagnostic (dominant, differential, indicator, or character) species, which, as a rule, are found in the uppermost stratum of the vegetation.) association A recurring plant community with a characteristic range in species composition, specific diagnostic species, and a defined range in habitat conditions and physiognomy or structure. Physiognomic class the first physiognomic level in the NVC hierarchy; based on the structure of the vegetation and determined by the relative percentage of cover and the height of the dominant, life forms (Grossman et al. 1998). formation a level in the NVC based on physiognomic grouping of vegetation units with broadly defined environmental and additional physiognomic factors in common. (FGDC 1997). Grossman et al. (1998) clarified this definition as a level in the classification hierarchy below subgroup which represents vegetation types that share a definite physiognomy or structure within broadly defined environmental factors, relative landscape positions, or hydrologic regimes. Both of these definitions derive from Whittaker 1962: a "community type defined by dominance of a given growth form in the uppermost stratum of the community, or by a combination of dominant growth forms." Physiognomic group the level in the classification hierarchy below subclass based on leaf characters and identified and named in conjunction with broadly defined macroclimatic types to provide a structural-geographic orientation (Grossman et al. 1998). other phase Physiognomic subclass subassociation subgroup order ' + + ); + + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'commStatus', + 'commLevel', + 'Physiognomic class', + 'the first physiognomic level in the NVC hierarchy; based on the structure of the vegetation and determined by the relative percentage of cover and the height of the dominant, life forms (Grossman et al. 1998).', + '1' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'commStatus', + 'commLevel', + 'Physiognomic subclass', + null, + '2' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'commStatus', + 'commLevel', + 'Physiognomic group', + 'the level in the classification hierarchy below subclass based on leaf characters and identified and named in conjunction with broadly defined macroclimatic types to provide a structural-geographic orientation (Grossman et al. 1998).', + '3' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'commStatus', + 'commLevel', + 'subgroup', + null, + '4' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'commStatus', + 'commLevel', + 'formation', + 'a level in the NVC based on physiognomic grouping of vegetation units with broadly defined environmental and additional physiognomic factors in common. (FGDC 1997). Grossman et al. (1998) clarified this definition as a level in the classification hierarchy below subgroup which represents vegetation types that share a definite physiognomy or structure within broadly defined environmental factors, relative landscape positions, or hydrologic regimes. Both of these definitions derive from Whittaker 1962: a "community type defined by dominance of a given growth form in the uppermost stratum of the community, or by a combination of dominant growth forms."', + '5' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'commStatus', + 'commLevel', + 'alliance', + 'A grouping of associations with a characteristic physiognomy and habitat and which share one or more diagnostic species typically found in the uppermost or dominant stratum of the vegetation. (This definition includes both floristic and physiognomic criteria, in keeping with the integrated physiognomic-floristic hierarchy of the NVC. It is similar to the FGDC 1997 definition: a physiognomically uniform group of Associations sharing one or more diagnostic (dominant, differential, indicator, or character) species, which, as a rule, are found in the uppermost stratum of the vegetation.)', + '6' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'commStatus', + 'commLevel', + 'association', + 'A recurring plant community with a characteristic range in species composition, specific diagnostic species, and a defined range in habitat conditions and physiognomy or structure.', + '7' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'commStatus', + 'commLevel', + 'subassociation', + null, + '8' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'commStatus', + 'commLevel', + 'phase', + null, + '9' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'commStatus', + 'commLevel', + 'order', + null, + '10' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'commStatus', + 'commLevel', + 'other', + null, + '11' + ); + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'commStatus', + 'startDate', + 'Start Date', + 'logical', + 'no', + 'Date', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'This is the date for which the status assignment by the party started.', + + ' commStatus Community Status startDate Start Date logical required Date n/a n/a no n/a This is the date for which the status assignment by the party started. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'commStatus', + 'stopDate', + 'Stop Date', + 'logical', + 'yes', + 'Date', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'This is the date for which the status assignment by the party ended.', + + ' commStatus Community Status stopDate Stop Date logical Date n/a n/a no n/a This is the date for which the status assignment by the party ended. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'commStatus', + 'commPartyComments', + 'Community Party Comments', + 'logical', + 'yes', + 'text', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'Comments by party providing rationale for status assignment', + + ' commStatus Community Status commPartyComments Community Party Comments logical text n/a n/a no n/a Comments by party providing rationale for status assignment ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'commStatus', + 'PARTY_ID', + 'Party', + 'logical', + 'no', + 'Integer', + 'FK', + 'party.PARTY_ID', + 'no', + 'n/a', + 'Foreign key that identifies the party that made the status assignment', + + ' commStatus Community Status PARTY_ID Party logical required Integer FK party.PARTY_ID no n/a Foreign key that identifies the party that made the status assignment ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'commStatus', + 'accessionCode', + 'Accession Code', + 'logical', + 'yes', + 'varchar (255)', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'Code that uniquely references this record, allowing reference to this record for this version of this database. Better than a primary key, which is automatically generated by a database and not globally unique. VegBank Accession codes are only generated by VegBank, and therefore data integrity can be guaranteed, unlike with a primary key (number).', + + ' commStatus Community Status accessionCode Accession Code logical varchar (255) n/a n/a no n/a Code that uniquely references this record, allowing reference to this record for this version of this database. Better than a primary key, which is automatically generated by a database and not globally unique. VegBank Accession codes are only generated by VegBank, and therefore data integrity can be guaranteed, unlike with a primary key (number). ' + + ); + + + INSERT INTO dba_tableDescription ( tableName , tableLabel , tableNotes , tableDescription , tableKeywords ) values ( + 'commUsage', + 'Community Usage', + 'This table links a community name with a concept.', + null, + ' commUsage Community Usage This table links a community name with a concept. COMMUSAGE_ID ID COMMNAME_ID Community Name commName Community Name COMMCONCEPT_ID Community Concept usageStart Usage Start usageStop Usage Stop commNameStatus Community Name Status classSystem Class System PARTY_ID Party COMMSTATUS_ID Comm Status ' + ); + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'commUsage', + 'COMMUSAGE_ID', + 'ID', + 'logical', + 'yes', + 'serial', + 'PK', + 'n/a', + 'no', + 'n/a', + 'Database assigned value to each unique record in the communityUsage table.', + + ' commUsage Community Usage COMMUSAGE_ID ID logical serial PK n/a no n/a Database assigned value to each unique record in the communityUsage table. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'commUsage', + 'COMMNAME_ID', + 'Community Name', + 'logical', + 'no', + 'Integer', + 'FK', + 'commName.COMMNAME_ID', + 'no', + 'n/a', + 'This field is the foreign key into the commName table.', + + ' commUsage Community Usage COMMNAME_ID Community Name logical required Integer FK commName.COMMNAME_ID no n/a This field is the foreign key into the commName table. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'commUsage', + 'commName', + 'Community Name', + 'denorm', + 'yes', + 'text', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'This is the community Name that the party uses for this community, of the type indicated in classSystem.', + + ' commUsage Community Usage commName Community Name denorm text n/a n/a no n/a This is the community Name that the party uses for this community, of the type indicated in classSystem. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'commUsage', + 'COMMCONCEPT_ID', + 'Community Concept', + 'denorm', + 'yes', + 'Integer', + 'FK', + 'commConcept.COMMCONCEPT_ID', + 'no', + 'n/a', + 'This field is the foreign key into the commConcept table.', + + ' commUsage Community Usage COMMCONCEPT_ID Community Concept denorm Integer FK commConcept.COMMCONCEPT_ID no n/a This field is the foreign key into the commConcept table. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'commUsage', + 'usageStart', + 'Usage Start', + 'logical', + 'yes', + 'Date', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'This is the date on which the party applied the name to the concept.', + + ' commUsage Community Usage usageStart Usage Start logical Date n/a n/a no n/a This is the date on which the party applied the name to the concept. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'commUsage', + 'usageStop', + 'Usage Stop', + 'logical', + 'yes', + 'Date', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'This is the date on which the party ceased to apply the name to the concept.', + + ' commUsage Community Usage usageStop Usage Stop logical Date n/a n/a no n/a This is the date on which the party ceased to apply the name to the concept. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'commUsage', + 'commNameStatus', + 'Community Name Status', + 'logical', + 'yes', + 'varchar (20)', + 'n/a', + 'n/a', + 'closed', + 'closed list', + 'This field shows the status of the application of the name to the concept by the party (standard, not standard, undetermined).', + + ' commUsage Community Usage commNameStatus Community Name Status logical varchar (20) n/a n/a closed closed list This field shows the status of the application of the name to the concept by the party (standard, not standard, undetermined). not standard standard undetermined ' + + ); + + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'commUsage', + 'commNameStatus', + 'standard', + null, + '1' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'commUsage', + 'commNameStatus', + 'not standard', + null, + '2' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'commUsage', + 'commNameStatus', + 'undetermined', + null, + '3' + ); + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'commUsage', + 'classSystem', + 'Class System', + 'logical', + 'yes', + 'varchar (50)', + 'n/a', + 'n/a', + 'open', + 'Like FGDC of Forest Cover Class.', + 'This is the name of the classification system wherein the name is applied (e.g., Scientific, Spanish common).', + + ' commUsage Community Usage classSystem Class System logical varchar (50) n/a n/a open Like FGDC of Forest Cover Class. This is the name of the classification system wherein the name is applied (e.g., Scientific, Spanish common). Code Ecological Society of American Vegetation Classification Panel. 2003. Guidelines ver. 2 Common Ecological Society of American Vegetation Classification Panel. 2003. Guidelines ver. 2 Other Scientific Ecological Society of American Vegetation Classification Panel. 2003. Guidelines ver. 2 Translated Ecological Society of American Vegetation Classification Panel. 2003. Guidelines ver. 2 ' + + ); + + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'commUsage', + 'classSystem', + 'Scientific', + 'Ecological Society of American Vegetation Classification Panel. 2003. Guidelines ver. 2', + '1' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'commUsage', + 'classSystem', + 'Translated', + 'Ecological Society of American Vegetation Classification Panel. 2003. Guidelines ver. 2', + '2' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'commUsage', + 'classSystem', + 'Code', + 'Ecological Society of American Vegetation Classification Panel. 2003. Guidelines ver. 2', + '3' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'commUsage', + 'classSystem', + 'Common', + 'Ecological Society of American Vegetation Classification Panel. 2003. Guidelines ver. 2', + '4' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'commUsage', + 'classSystem', + 'Other', + null, + '6' + ); + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'commUsage', + 'PARTY_ID', + 'Party', + 'denorm', + 'yes', + 'Integer', + 'FK', + 'party.PARTY_ID', + 'no', + 'n/a', + 'Foreign key that identifies the party that used the class concept with the name.', + + ' commUsage Community Usage PARTY_ID Party denorm Integer FK party.PARTY_ID no n/a Foreign key that identifies the party that used the class concept with the name. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'commUsage', + 'COMMSTATUS_ID', + 'Comm Status', + 'logical', + 'yes', + 'Integer', + 'FK', + 'commStatus.COMMSTATUS_ID', + 'no', + 'n/a', + 'Comm Status which applies to this commUsage.', + + ' commUsage Community Usage COMMSTATUS_ID Comm Status logical Integer FK commStatus.COMMSTATUS_ID no n/a Comm Status which applies to this commUsage. ' + + ); + + + INSERT INTO dba_tableDescription ( tableName , tableLabel , tableNotes , tableDescription , tableKeywords ) values ( + 'plantConcept', + 'Plant Concept', + 'This table store the concepts that are linked to plant names through the plantUsage table.', + null, + ' plantConcept Plant Concept This table store the concepts that are linked to plant names through the plantUsage table. PLANTCONCEPT_ID ID PLANTNAME_ID Plant Name reference_ID Reference plantname Plant Name plantCode Plant Code plantDescription Plant Description accessionCode Accession Code d_obscount Plot Count d_currentaccepted Currently Accepted by Someone ' + ); + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'plantConcept', + 'PLANTCONCEPT_ID', + 'ID', + 'logical', + 'yes', + 'serial', + 'PK', + 'n/a', + 'no', + 'n/a', + 'Database assigned value to each unique record in the commConcept table.', + + ' plantConcept Plant Concept PLANTCONCEPT_ID ID logical serial PK n/a no n/a Database assigned value to each unique record in the commConcept table. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'plantConcept', + 'PLANTNAME_ID', + 'Plant Name', + 'logical', + 'no', + 'Integer', + 'FK', + 'plantName.PLANTNAME_ID', + 'no', + 'n/a', + 'This is a foreign key into the plant name list, the entry in which when combined with a reference constitutes a concept.', + + ' plantConcept Plant Concept PLANTNAME_ID Plant Name logical required Integer FK plantName.PLANTNAME_ID no n/a This is a foreign key into the plant name list, the entry in which when combined with a reference constitutes a concept. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'plantConcept', + 'reference_ID', + 'Reference', + 'logical', + 'no', + 'Integer', + 'FK', + 'reference.reference_ID', + 'no', + 'n/a', + 'This is a foreign key to the reference in which the name was used, thereby defining a concept.', + + ' plantConcept Plant Concept reference_ID Reference logical required Integer FK reference.reference_ID no n/a This is a foreign key to the reference in which the name was used, thereby defining a concept. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'plantConcept', + 'plantname', + 'Plant Name', + 'denorm', + 'yes', + 'varchar (200)', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'This is the name of the plant upon which the concept is based.', + + ' plantConcept Plant Concept plantname Plant Name denorm varchar (200) n/a n/a no n/a This is the name of the plant upon which the concept is based. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'plantConcept', + 'plantCode', + 'Plant Code', + 'implementation', + 'yes', + 'varchar (23)', + 'n/a', + 'n/a', + 'no', + null, + null, + + ' plantConcept Plant Concept plantCode Plant Code implementation varchar (23) n/a n/a no ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'plantConcept', + 'plantDescription', + 'Plant Description', + 'logical', + 'yes', + 'text', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'The plantDescription is a description of the plantConcept by the party contributing the plantConcept.', + + ' plantConcept Plant Concept plantDescription Plant Description logical text n/a n/a no n/a The plantDescription is a description of the plantConcept by the party contributing the plantConcept. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'plantConcept', + 'accessionCode', + 'Accession Code', + 'logical', + 'yes', + 'varchar (255)', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'Code that uniquely references this record, allowing reference to this record for this version of this database. Better than a primary key, which is automatically generated by a database and not globally unique. VegBank Accession codes are only generated by VegBank, and therefore data integrity can be guaranteed, unlike with a primary key (number).', + + ' plantConcept Plant Concept accessionCode Accession Code logical varchar (255) n/a n/a no n/a Code that uniquely references this record, allowing reference to this record for this version of this database. Better than a primary key, which is automatically generated by a database and not globally unique. VegBank Accession codes are only generated by VegBank, and therefore data integrity can be guaranteed, unlike with a primary key (number). ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'plantConcept', + 'd_obscount', + 'Plot Count', + 'denorm', + 'yes', + 'Integer', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'Number of observations associated with this entity.', + + ' plantConcept Plant Concept d_obscount Plot Count denorm Integer n/a n/a no n/a Number of observations associated with this entity. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'plantConcept', + 'd_currentaccepted', + 'Currently Accepted by Someone', + 'denorm', + 'yes', + 'Boolean', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'Currently accepted by at least one party.', + + ' plantConcept Plant Concept d_currentaccepted Currently Accepted by Someone denorm Boolean n/a n/a no n/a Currently accepted by at least one party. ' + + ); + + + INSERT INTO dba_tableDescription ( tableName , tableLabel , tableNotes , tableDescription , tableKeywords ) values ( + 'plantCorrelation', + 'Plant Correlation', + 'This table correlates multiple plant concepts as they change through time.', + null, + ' plantCorrelation Plant Correlation This table correlates multiple plant concepts as they change through time. PLANTCORRELATION_ID ID PLANTSTATUS_ID Plant Status PLANTCONCEPT_ID Plant Concept plantConvergence Plant Convergence correlationStart Correlation Start correlationStop Correlation Stop ' + ); + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'plantCorrelation', + 'PLANTCORRELATION_ID', + 'ID', + 'logical', + 'yes', + 'serial', + 'PK', + 'n/a', + 'no', + 'n/a', + 'Database assigned value to each unique record in the plantCorrelation table.', + + ' plantCorrelation Plant Correlation PLANTCORRELATION_ID ID logical serial PK n/a no n/a Database assigned value to each unique record in the plantCorrelation table. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'plantCorrelation', + 'PLANTSTATUS_ID', + 'Plant Status', + 'logical', + 'no', + 'Integer', + 'FK', + 'plantStatus.PLANTSTATUS_ID', + 'no', + 'n/a', + 'This is the foreign key into the plantStatus table "pointing" to a concept no longer viewed as standard by the party.', + + ' plantCorrelation Plant Correlation PLANTSTATUS_ID Plant Status logical required Integer FK plantStatus.PLANTSTATUS_ID no n/a This is the foreign key into the plantStatus table "pointing" to a concept no longer viewed as standard by the party. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'plantCorrelation', + 'PLANTCONCEPT_ID', + 'Plant Concept', + 'logical', + 'no', + 'Integer', + 'FK', + 'plantConcept.PLANTCONCEPT_ID', + 'no', + 'n/a', + 'This is the foreign key into the plantConcept table "pointing" to a concept recognized by the party as a "standard" concept.', + + ' plantCorrelation Plant Correlation PLANTCONCEPT_ID Plant Concept logical required Integer FK plantConcept.PLANTCONCEPT_ID no n/a This is the foreign key into the plantConcept table "pointing" to a concept recognized by the party as a "standard" concept. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'plantCorrelation', + 'plantConvergence', + 'Plant Convergence', + 'logical', + 'no', + 'varchar (20)', + 'n/a', + 'n/a', + 'closed', + 'closed list', + 'This is the descriptive attribute that is used to relate the congruence between two concepts. The concept that is represented in the party perspective, via the Status_ID field is [this field, i.e. <,>,=] the concept represented in Concept_ID field. As normally used, (no Longer Valid Concept) [convergence] (Valid Concept). For example, if a concept is split, the convergence would be ''greater than'' (The old concept is ''greater than'' the new concept).', + + ' plantCorrelation Plant Correlation plantConvergence Plant Convergence logical required varchar (20) n/a n/a closed closed list This is the descriptive attribute that is used to relate the congruence between two concepts. The concept that is represented in the party perspective, via the Status_ID field is [this field, i.e. <,>,=] the concept represented in Concept_ID field. As normally used, (no Longer Valid Concept) [convergence] (Valid Concept). For example, if a concept is split, the convergence would be ''greater than'' (The old concept is ''greater than'' the new concept). equal The two concepts are exactly the same. greater than The reference concept (referenced in table:Status) fully contains the correlated concept (referenced in table:Concept), but also includes additional entities. less than The reference concept is fully included in the correlated concept, but the latter concept contains additional entities. not equal The two concepts, are not exactly the same. This leaves the possibilities that the reference concept is greater than, less than, overlapping, similar, or disjunct relative to the correlated concept. overlapping The two concepts contain at least one common individual, and each concept also contains at least one individual that the other does not contain. Neither concept is fully contained in the other. similar The two concepts contain at least one common individual. disjunct The two concepts in question contain no common individuals. undetermined Although some correlation is likely, the party responsible for the this correlation has not made a determination. ' + + ); + + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plantCorrelation', + 'plantConvergence', + 'equal', + 'The two concepts are exactly the same.', + '1' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plantCorrelation', + 'plantConvergence', + 'greater than', + 'The reference concept (referenced in table:Status) fully contains the correlated concept (referenced in table:Concept), but also includes additional entities.', + '2' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plantCorrelation', + 'plantConvergence', + 'less than', + 'The reference concept is fully included in the correlated concept, but the latter concept contains additional entities.', + '3' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plantCorrelation', + 'plantConvergence', + 'not equal', + 'The two concepts, are not exactly the same. This leaves the possibilities that the reference concept is greater than, less than, overlapping, similar, or disjunct relative to the correlated concept.', + '4' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plantCorrelation', + 'plantConvergence', + 'overlapping', + 'The two concepts contain at least one common individual, and each concept also contains at least one individual that the other does not contain. Neither concept is fully contained in the other.', + '5' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plantCorrelation', + 'plantConvergence', + 'similar', + 'The two concepts contain at least one common individual.', + '6' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plantCorrelation', + 'plantConvergence', + 'disjunct', + 'The two concepts in question contain no common individuals.', + '7' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plantCorrelation', + 'plantConvergence', + 'undetermined', + 'Although some correlation is likely, the party responsible for the this correlation has not made a determination.', + '8' + ); + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'plantCorrelation', + 'correlationStart', + 'Correlation Start', + 'logical', + 'no', + 'Date', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'This is the start date for recognition by a party of a correlation between two concepts.', + + ' plantCorrelation Plant Correlation correlationStart Correlation Start logical required Date n/a n/a no n/a This is the start date for recognition by a party of a correlation between two concepts. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'plantCorrelation', + 'correlationStop', + 'Correlation Stop', + 'logical', + 'yes', + 'Date', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'This is the stop date for recognition by a party of a correlation between two concepts.', + + ' plantCorrelation Plant Correlation correlationStop Correlation Stop logical Date n/a n/a no n/a This is the stop date for recognition by a party of a correlation between two concepts. ' + + ); + + + INSERT INTO dba_tableDescription ( tableName , tableLabel , tableNotes , tableDescription , tableKeywords ) values ( + 'plantLineage', + 'Plant Lineage', + 'This table stores tracks the lineage of plant taxon concepts.', + null, + ' plantLineage Plant Lineage This table stores tracks the lineage of plant taxon concepts. PLANTLINEAGE_ID ID childPlantStatus_ID Child Plant Status parentPlantStatus_ID Parent Plant Status ' + ); + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'plantLineage', + 'PLANTLINEAGE_ID', + 'ID', + 'logical', + 'yes', + 'serial', + 'PK', + 'n/a', + 'no', + 'n/a', + 'Database assigned value to each unique record in the plantLineage table.', + + ' plantLineage Plant Lineage PLANTLINEAGE_ID ID logical serial PK n/a no n/a Database assigned value to each unique record in the plantLineage table. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'plantLineage', + 'childPlantStatus_ID', + 'Child Plant Status', + 'logical', + 'no', + 'Integer', + 'FK', + 'plantStatus.PLANTSTATUS_ID', + 'no', + 'n/a', + 'This is the foreign key into the plantStatus table "pointing" to a child concept.', + + ' plantLineage Plant Lineage childPlantStatus_ID Child Plant Status logical required Integer FK plantStatus.PLANTSTATUS_ID no n/a This is the foreign key into the plantStatus table "pointing" to a child concept. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'plantLineage', + 'parentPlantStatus_ID', + 'Parent Plant Status', + 'logical', + 'no', + 'Integer', + 'FK', + 'plantStatus.PLANTSTATUS_ID', + 'no', + 'n/a', + 'This is the foreign key into the plantStatus table "pointing" to a parent concept.', + + ' plantLineage Plant Lineage parentPlantStatus_ID Parent Plant Status logical required Integer FK plantStatus.PLANTSTATUS_ID no n/a This is the foreign key into the plantStatus table "pointing" to a parent concept. ' + + ); + + + INSERT INTO dba_tableDescription ( tableName , tableLabel , tableNotes , tableDescription , tableKeywords ) values ( + 'plantName', + 'Plant Name', + 'This table stores plant names', + null, + ' plantName Plant Name This table stores plant names PLANTNAME_ID ID plantName Plant Name reference_ID Reference dateEntered Date Entered ' + ); + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'plantName', + 'PLANTNAME_ID', + 'ID', + 'logical', + 'yes', + 'serial', + 'PK', + 'n/a', + 'no', + 'n/a', + 'Database assigned value to each unique record in the plantName table.', + + ' plantName Plant Name PLANTNAME_ID ID logical serial PK n/a no n/a Database assigned value to each unique record in the plantName table. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'plantName', + 'plantName', + 'Plant Name', + 'logical', + 'no', + 'varchar (255)', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'The plant name.', + + ' plantName Plant Name plantName Plant Name logical required varchar (255) n/a n/a no n/a The plant name. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'plantName', + 'reference_ID', + 'Reference', + 'logical', + 'yes', + 'Integer', + 'FK', + 'reference.reference_ID', + 'no', + 'n/a', + 'Foreign key into the reference table to identify the original source of the name (usually the type description).', + + ' plantName Plant Name reference_ID Reference logical Integer FK reference.reference_ID no n/a Foreign key into the reference table to identify the original source of the name (usually the type description). ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'plantName', + 'dateEntered', + 'Date Entered', + 'logical', + 'yes', + 'Date', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'Field stores the date that the name was entered into the database.', + + ' plantName Plant Name dateEntered Date Entered logical Date n/a n/a no n/a Field stores the date that the name was entered into the database. ' + + ); + + + INSERT INTO dba_tableDescription ( tableName , tableLabel , tableNotes , tableDescription , tableKeywords ) values ( + 'plantStatus', + 'Plant Status', + 'This table store the status of a community concept as perceived by a party at a time.', + null, + ' plantStatus Plant Status This table store the status of a community concept as perceived by a party at a time. PLANTSTATUS_ID ID PLANTCONCEPT_ID Plant Concept reference_ID Reference plantConceptStatus Plant Concept Status startDate Start Date stopDate Stop Date plantPartyComments Plant Party Comments plantParentName Plant Parent Name plantParentConcept_id Plant Parent Concept_id plantParent_ID Plant Parent plantLevel Plant Level PARTY_ID Party accessionCode Accession Code ' + ); + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'plantStatus', + 'PLANTSTATUS_ID', + 'ID', + 'logical', + 'yes', + 'serial', + 'PK', + 'n/a', + 'no', + 'n/a', + 'Database assigned value to each unique record in the plantStatus table.', + + ' plantStatus Plant Status PLANTSTATUS_ID ID logical serial PK n/a no n/a Database assigned value to each unique record in the plantStatus table. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'plantStatus', + 'PLANTCONCEPT_ID', + 'Plant Concept', + 'logical', + 'no', + 'Integer', + 'FK', + 'plantConcept.PLANTCONCEPT_ID', + 'no', + 'n/a', + 'Foreign key to identify the concept to which a party assigns a status', + + ' plantStatus Plant Status PLANTCONCEPT_ID Plant Concept logical required Integer FK plantConcept.PLANTCONCEPT_ID no n/a Foreign key to identify the concept to which a party assigns a status ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'plantStatus', + 'reference_ID', + 'Reference', + 'logical', + 'yes', + 'Integer', + 'FK', + 'reference.reference_ID', + 'no', + 'n/a', + 'Link to a reference where the status was reported', + + ' plantStatus Plant Status reference_ID Reference logical Integer FK reference.reference_ID no n/a Link to a reference where the status was reported ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'plantStatus', + 'plantConceptStatus', + 'Plant Concept Status', + 'logical', + 'no', + 'varchar (20)', + 'n/a', + 'n/a', + 'closed', + 'closed list', + 'Status of the concept by the party (accepted, not accepted, undetermined)', + + ' plantStatus Plant Status plantConceptStatus Plant Concept Status logical required varchar (20) n/a n/a closed closed list Status of the concept by the party (accepted, not accepted, undetermined) accepted not accepted undetermined ' + + ); + + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plantStatus', + 'plantConceptStatus', + 'accepted', + null, + '1' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plantStatus', + 'plantConceptStatus', + 'not accepted', + null, + '2' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plantStatus', + 'plantConceptStatus', + 'undetermined', + null, + '3' + ); + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'plantStatus', + 'startDate', + 'Start Date', + 'logical', + 'no', + 'Date', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'This is the date for which the status assignment by the party started.', + + ' plantStatus Plant Status startDate Start Date logical required Date n/a n/a no n/a This is the date for which the status assignment by the party started. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'plantStatus', + 'stopDate', + 'Stop Date', + 'logical', + 'yes', + 'Date', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'This is the date for which the status assignment by the party ended.', + + ' plantStatus Plant Status stopDate Stop Date logical Date n/a n/a no n/a This is the date for which the status assignment by the party ended. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'plantStatus', + 'plantPartyComments', + 'Plant Party Comments', + 'logical', + 'yes', + 'text', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'Comments by party providing rationale for status assignment', + + ' plantStatus Plant Status plantPartyComments Plant Party Comments logical text n/a n/a no n/a Comments by party providing rationale for status assignment ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'plantStatus', + 'plantParentName', + 'Plant Parent Name', + 'implementation', + 'yes', + 'varchar (200)', + 'n/a', + 'n/a', + 'no', + null, + null, + + ' plantStatus Plant Status plantParentName Plant Parent Name implementation varchar (200) n/a n/a no ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'plantStatus', + 'plantParentConcept_id', + 'Plant Parent Concept_id', + 'implementation', + 'yes', + 'Integer', + 'n/a', + 'n/a', + 'no', + null, + null, + + ' plantStatus Plant Status plantParentConcept_id Plant Parent Concept_id implementation Integer n/a n/a no ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'plantStatus', + 'plantParent_ID', + 'Plant Parent', + 'logical', + 'yes', + 'Integer', + 'FK', + 'plantConcept.PLANTCONCEPT_ID', + 'no', + 'n/a', + 'The plantParent is a recursive key to the concept of the parent level in the classification hierarchy. For example if this plantConcept were at the genus level the plantParent would be the plantConcept that is the family level (or subfamily level).', + + ' plantStatus Plant Status plantParent_ID Plant Parent logical Integer FK plantConcept.PLANTCONCEPT_ID no n/a The plantParent is a recursive key to the concept of the parent level in the classification hierarchy. For example if this plantConcept were at the genus level the plantParent would be the plantConcept that is the family level (or subfamily level). ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'plantStatus', + 'plantLevel', + 'Plant Level', + 'logical', + 'yes', + 'varchar (80)', + 'n/a', + 'n/a', + 'closed', + 'n/a', + 'The classLevel attribute specifies a level in the taxonomic hierarchy that a class belongs.', + + ' plantStatus Plant Status plantLevel Plant Level logical varchar (80) n/a n/a closed n/a The classLevel attribute specifies a level in the taxonomic hierarchy that a class belongs. Class Cultivar/Forma Division Family Genus Kingdom Order Section Species Species Aggregate Subclass Subfamily Subgenus Subkingdom Suborder Subspecies Subtribe Superdivision Tribe Variety ' + + ); + + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plantStatus', + 'plantLevel', + 'Kingdom', + null, + '1' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plantStatus', + 'plantLevel', + 'Subkingdom', + null, + '2' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plantStatus', + 'plantLevel', + 'Superdivision', + null, + '3' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plantStatus', + 'plantLevel', + 'Division', + null, + '4' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plantStatus', + 'plantLevel', + 'Class', + null, + '5' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plantStatus', + 'plantLevel', + 'Subclass', + null, + '6' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plantStatus', + 'plantLevel', + 'Order', + null, + '7' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plantStatus', + 'plantLevel', + 'Suborder', + null, + '8' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plantStatus', + 'plantLevel', + 'Family', + null, + '9' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plantStatus', + 'plantLevel', + 'Subfamily', + null, + '10' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plantStatus', + 'plantLevel', + 'Tribe', + null, + '11' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plantStatus', + 'plantLevel', + 'Subtribe', + null, + '12' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plantStatus', + 'plantLevel', + 'Genus', + null, + '13' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plantStatus', + 'plantLevel', + 'Subgenus', + null, + '14' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plantStatus', + 'plantLevel', + 'Section', + null, + '15' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plantStatus', + 'plantLevel', + 'Species Aggregate', + null, + '16' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plantStatus', + 'plantLevel', + 'Species', + null, + '17' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plantStatus', + 'plantLevel', + 'Subspecies', + null, + '18' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plantStatus', + 'plantLevel', + 'Variety', + null, + '19' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plantStatus', + 'plantLevel', + 'Cultivar/Forma', + null, + '20' + ); + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'plantStatus', + 'PARTY_ID', + 'Party', + 'logical', + 'no', + 'Integer', + 'FK', + 'party.PARTY_ID', + 'no', + 'n/a', + 'Foreign key that identifies the party that made the status assignment', + + ' plantStatus Plant Status PARTY_ID Party logical required Integer FK party.PARTY_ID no n/a Foreign key that identifies the party that made the status assignment ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'plantStatus', + 'accessionCode', + 'Accession Code', + 'logical', + 'yes', + 'varchar (255)', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'Code that uniquely references this record, allowing reference to this record for this version of this database. Better than a primary key, which is automatically generated by a database and not globally unique. VegBank Accession codes are only generated by VegBank, and therefore data integrity can be guaranteed, unlike with a primary key (number).', + + ' plantStatus Plant Status accessionCode Accession Code logical varchar (255) n/a n/a no n/a Code that uniquely references this record, allowing reference to this record for this version of this database. Better than a primary key, which is automatically generated by a database and not globally unique. VegBank Accession codes are only generated by VegBank, and therefore data integrity can be guaranteed, unlike with a primary key (number). ' + + ); + + + INSERT INTO dba_tableDescription ( tableName , tableLabel , tableNotes , tableDescription , tableKeywords ) values ( + 'plantUsage', + 'Plant Usage', + 'This table links a plant name with a concept.', + null, + ' plantUsage Plant Usage This table links a plant name with a concept. PLANTUSAGE_ID ID PLANTNAME_ID Plant Name PLANTCONCEPT_ID Plant Concept usageStart Usage Start usageStop Usage Stop plantNameStatus Plant Name Status plantName Plant Name classSystem Class System acceptedSynonym Accepted Synonym PARTY_ID Party PLANTSTATUS_ID Plant Status ' + ); + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'plantUsage', + 'PLANTUSAGE_ID', + 'ID', + 'logical', + 'yes', + 'serial', + 'PK', + 'n/a', + 'no', + 'n/a', + 'Database assigned value to each unique record in the plantUsage table.', + + ' plantUsage Plant Usage PLANTUSAGE_ID ID logical serial PK n/a no n/a Database assigned value to each unique record in the plantUsage table. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'plantUsage', + 'PLANTNAME_ID', + 'Plant Name', + 'logical', + 'no', + 'Integer', + 'FK', + 'plantName.PLANTNAME_ID', + 'no', + 'n/a', + 'This field is the foreign key into the plantName table.', + + ' plantUsage Plant Usage PLANTNAME_ID Plant Name logical required Integer FK plantName.PLANTNAME_ID no n/a This field is the foreign key into the plantName table. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'plantUsage', + 'PLANTCONCEPT_ID', + 'Plant Concept', + 'denorm', + 'yes', + 'Integer', + 'FK', + 'plantConcept.PLANTCONCEPT_ID', + 'no', + 'n/a', + 'This field is the foreign key into the plantConcept table.', + + ' plantUsage Plant Usage PLANTCONCEPT_ID Plant Concept denorm Integer FK plantConcept.PLANTCONCEPT_ID no n/a This field is the foreign key into the plantConcept table. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'plantUsage', + 'usageStart', + 'Usage Start', + 'logical', + 'yes', + 'Date', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'This is the date on which the party applied the name to the concept.', + + ' plantUsage Plant Usage usageStart Usage Start logical Date n/a n/a no n/a This is the date on which the party applied the name to the concept. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'plantUsage', + 'usageStop', + 'Usage Stop', + 'logical', + 'yes', + 'Date', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'This is the date on which the party ceased to apply the name to the concept.', + + ' plantUsage Plant Usage usageStop Usage Stop logical Date n/a n/a no n/a This is the date on which the party ceased to apply the name to the concept. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'plantUsage', + 'plantNameStatus', + 'Plant Name Status', + 'logical', + 'yes', + 'varchar (20)', + 'n/a', + 'n/a', + 'closed', + 'n/a', + 'This field shows the status of the application of the name to the concept by the party (standard, not standard, undetermined).', + + ' plantUsage Plant Usage plantNameStatus Plant Name Status logical varchar (20) n/a n/a closed n/a This field shows the status of the application of the name to the concept by the party (standard, not standard, undetermined). not standard standard undetermined ' + + ); + + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plantUsage', + 'plantNameStatus', + 'standard', + null, + '1' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plantUsage', + 'plantNameStatus', + 'not standard', + null, + '2' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plantUsage', + 'plantNameStatus', + 'undetermined', + null, + '3' + ); + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'plantUsage', + 'plantName', + 'Plant Name', + 'denorm', + 'yes', + 'varchar (220)', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'This is the plant name that the party uses for this plant concept, in the name system indicated in classSystem.', + + ' plantUsage Plant Usage plantName Plant Name denorm varchar (220) n/a n/a no n/a This is the plant name that the party uses for this plant concept, in the name system indicated in classSystem. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'plantUsage', + 'classSystem', + 'Class System', + 'logical', + 'yes', + 'varchar (50)', + 'n/a', + 'n/a', + 'open', + 'closed list', + 'This is the name of the classification system wherein the name is applied (e.g., EnglishCommon or Scientific).', + + ' plantUsage Plant Usage classSystem Class System logical varchar (50) n/a n/a open closed list This is the name of the classification system wherein the name is applied (e.g., EnglishCommon or Scientific). Code English Common Other Scientific Scientific without authors Spanish Common French Common ' + + ); + + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plantUsage', + 'classSystem', + 'Scientific', + null, + '1' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plantUsage', + 'classSystem', + 'Scientific without authors', + null, + '2' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plantUsage', + 'classSystem', + 'Code', + null, + '3' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plantUsage', + 'classSystem', + 'English Common', + null, + '4' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plantUsage', + 'classSystem', + 'Spanish Common', + null, + '5' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plantUsage', + 'classSystem', + 'Other', + null, + '6' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plantUsage', + 'classSystem', + 'French Common', + null, + '7' + ); + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'plantUsage', + 'acceptedSynonym', + 'Accepted Synonym', + 'implementation', + 'yes', + 'varchar (220)', + 'n/a', + 'n/a', + 'no', + null, + null, + + ' plantUsage Plant Usage acceptedSynonym Accepted Synonym implementation varchar (220) n/a n/a no ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'plantUsage', + 'PARTY_ID', + 'Party', + 'denorm', + 'yes', + 'Integer', + 'FK', + 'party.PARTY_ID', + 'no', + 'n/a', + 'Foreign key that identifies the party that uses the concept with the name.', + + ' plantUsage Plant Usage PARTY_ID Party denorm Integer FK party.PARTY_ID no n/a Foreign key that identifies the party that uses the concept with the name. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'plantUsage', + 'PLANTSTATUS_ID', + 'Plant Status', + 'logical', + 'yes', + 'Integer', + 'FK', + 'plantStatus.PLANTSTATUS_ID', + 'no', + 'n/a', + 'Plant Status which applies to this plantUsage.', + + ' plantUsage Plant Usage PLANTSTATUS_ID Plant Status logical Integer FK plantStatus.PLANTSTATUS_ID no n/a Plant Status which applies to this plantUsage. ' + + ); + + + INSERT INTO dba_tableDescription ( tableName , tableLabel , tableNotes , tableDescription , tableKeywords ) values ( + 'address', + 'Address', + 'This table contains the postal address, email address and/or organizational affiliation for a parties at the time of a plot event.', + null, + ' address Address This table contains the postal address, email address and/or organizational affiliation for a parties at the time of a plot event. ADDRESS_ID ID party_ID Party organization_ID Organization orgPosition Organization Position email Email deliveryPoint Delivery Point city City administrativeArea Administrative Area postalCode Postal Code country Country currentFlag Address is Current? addressStartDate Address Start Date ' + ); + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'address', + 'ADDRESS_ID', + 'ID', + 'logical', + 'yes', + 'serial', + 'PK', + 'n/a', + 'no', + 'Primary key for the address table.', + 'Database generated identifier assigned to each unique party address (note that a single party may have multiple addresses but that only one may be ''current'').', + + ' address Address ADDRESS_ID ID logical serial PK n/a no Primary key for the address table. Database generated identifier assigned to each unique party address (note that a single party may have multiple addresses but that only one may be ''current''). ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'address', + 'party_ID', + 'Party', + 'logical', + 'no', + 'Integer', + 'FK', + 'party.PARTY_ID', + 'no', + 'Foreign key into the party table.', + 'Link to the party to which this address applies', + + ' address Address party_ID Party logical required Integer FK party.PARTY_ID no Foreign key into the party table. Link to the party to which this address applies ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'address', + 'organization_ID', + 'Organization', + 'logical', + 'yes', + 'Integer', + 'FK', + 'party.PARTY_ID', + 'no', + 'Foreign key into the party table', + 'Link to an organization with which a party is affiliated', + + ' address Address organization_ID Organization logical Integer FK party.PARTY_ID no Foreign key into the party table Link to an organization with which a party is affiliated ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'address', + 'orgPosition', + 'Organization Position', + 'logical', + 'yes', + 'varchar (50)', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'Position of party within organization.', + + ' address Address orgPosition Organization Position logical varchar (50) n/a n/a no n/a Position of party within organization. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'address', + 'email', + 'Email', + 'logical', + 'yes', + 'varchar (100)', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'email address', + + ' address Address email Email logical varchar (100) n/a n/a no n/a email address ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'address', + 'deliveryPoint', + 'Delivery Point', + 'logical', + 'yes', + 'varchar (200)', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'Address line for the location (Street name, box number, suite).', + + ' address Address deliveryPoint Delivery Point logical varchar (200) n/a n/a no n/a Address line for the location (Street name, box number, suite). ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'address', + 'city', + 'City', + 'logical', + 'yes', + 'varchar (50)', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'City of the location.', + + ' address Address city City logical varchar (50) n/a n/a no n/a City of the location. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'address', + 'administrativeArea', + 'Administrative Area', + 'logical', + 'yes', + 'varchar (50)', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'State, province of the location.', + + ' address Address administrativeArea Administrative Area logical varchar (50) n/a n/a no n/a State, province of the location. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'address', + 'postalCode', + 'Postal Code', + 'logical', + 'yes', + 'varchar (10)', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'Zip code or other postal code.', + + ' address Address postalCode Postal Code logical varchar (10) n/a n/a no n/a Zip code or other postal code. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'address', + 'country', + 'Country', + 'logical', + 'yes', + 'varchar (50)', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'Country of the physical address.', + + ' address Address country Country logical varchar (50) n/a n/a no n/a Country of the physical address. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'address', + 'currentFlag', + 'Address is Current?', + 'logical', + 'yes', + 'Boolean', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'This flag signifies whether the address is the current address of the party.', + + ' address Address currentFlag Address is Current? logical Boolean n/a n/a no n/a This flag signifies whether the address is the current address of the party. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'address', + 'addressStartDate', + 'Address Start Date', + 'logical', + 'yes', + 'Date', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'The first database date on which the address/organization information applied (have a discrete date on which address is known to applied - not necessarily the first date on which the address applied).', + + ' address Address addressStartDate Address Start Date logical Date n/a n/a no n/a The first database date on which the address/organization information applied (have a discrete date on which address is known to applied - not necessarily the first date on which the address applied). ' + + ); + + + INSERT INTO dba_tableDescription ( tableName , tableLabel , tableNotes , tableDescription , tableKeywords ) values ( + 'aux_Role', + 'Role', + 'This table stores valid role codes for use in contributor tables', + null, + ' aux_Role Role This table stores valid role codes for use in contributor tables ROLE_ID ID roleCode Role Code roleDescription Role Description accessionCode Accession Code roleProject Role Allowed for Project Contributor roleObservation Role Allowed for Observation Contributor roleTaxonInt Role Allowed for Taxon Interpretation roleClassInt Role Allowed for Community Interpretation ' + ); + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'aux_Role', + 'ROLE_ID', + 'ID', + 'logical', + 'yes', + 'serial', + 'PK', + 'n/a', + 'no', + 'Primary key for the aux_Role table.', + 'Database assigned value for a unique role code', + + ' aux_Role Role ROLE_ID ID logical serial PK n/a no Primary key for the aux_Role table. Database assigned value for a unique role code ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'aux_Role', + 'roleCode', + 'Role Code', + 'logical', + 'no', + 'varchar (30)', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'constraining list of role codes for *Contributor tables', + + ' aux_Role Role roleCode Role Code logical required varchar (30) n/a n/a no n/a constraining list of role codes for *Contributor tables ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'aux_Role', + 'roleDescription', + 'Role Description', + 'logical', + 'yes', + 'varchar (200)', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'Description of the role', + + ' aux_Role Role roleDescription Role Description logical varchar (200) n/a n/a no n/a Description of the role ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'aux_Role', + 'accessionCode', + 'Accession Code', + 'logical', + 'yes', + 'varchar (255)', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'Code that uniquely references this record, allowing reference to this record for this version of this database. Better than a primary key, which is automatically generated by a database and not globally unique. VegBank Accession codes are only generated by VegBank, and therefore data integrity can be guaranteed, unlike with a primary key (number).', + + ' aux_Role Role accessionCode Accession Code logical varchar (255) n/a n/a no n/a Code that uniquely references this record, allowing reference to this record for this version of this database. Better than a primary key, which is automatically generated by a database and not globally unique. VegBank Accession codes are only generated by VegBank, and therefore data integrity can be guaranteed, unlike with a primary key (number). ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'aux_Role', + 'roleProject', + 'Role Allowed for Project Contributor', + 'implementation', + 'yes', + 'Integer', + 'n/a', + 'n/a', + 'no', + 'n/a', + '1=required, 2=allowed', + + ' aux_Role Role roleProject Role Allowed for Project Contributor implementation Integer n/a n/a no n/a 1=required, 2=allowed ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'aux_Role', + 'roleObservation', + 'Role Allowed for Observation Contributor', + 'implementation', + 'yes', + 'Integer', + 'n/a', + 'n/a', + 'no', + 'n/a', + '1=required, 2=allowed', + + ' aux_Role Role roleObservation Role Allowed for Observation Contributor implementation Integer n/a n/a no n/a 1=required, 2=allowed ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'aux_Role', + 'roleTaxonInt', + 'Role Allowed for Taxon Interpretation', + 'implementation', + 'yes', + 'Integer', + 'n/a', + 'n/a', + 'no', + 'n/a', + '1=required, 2=allowed', + + ' aux_Role Role roleTaxonInt Role Allowed for Taxon Interpretation implementation Integer n/a n/a no n/a 1=required, 2=allowed ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'aux_Role', + 'roleClassInt', + 'Role Allowed for Community Interpretation', + 'implementation', + 'yes', + 'Integer', + 'n/a', + 'n/a', + 'no', + 'n/a', + '1=required, 2=allowed', + + ' aux_Role Role roleClassInt Role Allowed for Community Interpretation implementation Integer n/a n/a no n/a 1=required, 2=allowed ' + + ); + + + INSERT INTO dba_tableDescription ( tableName , tableLabel , tableNotes , tableDescription , tableKeywords ) values ( + 'reference', + 'Reference', + 'This table stores information about references cited within the database', + null, + ' reference Reference This table stores information about references cited within the database reference_ID ID shortName Short Name fulltext Full Text referenceType Reference Type title Title titleSuperior Title Superior pubDate Publication Date accessDate Access Date conferenceDate Conference Date referenceJournal_ID Reference Journal volume Volume issue Issue pageRange Page Range totalPages Total Pages publisher Publisher publicationPlace Publication Place isbn ISBN edition Edition numberOfVolumes Number Of Volumes chapterNumber Chapter Number reportNumber Report Number communicationType Communication Type degree Degree url URL doi DOI additionalInfo Additional Information accessionCode Accession Code ' + ); + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'reference', + 'reference_ID', + 'ID', + 'logical', + 'no', + 'serial', + 'PK', + 'n/a', + 'no', + 'n/a', + 'Primary key for the reference table.', + + ' reference Reference reference_ID ID logical required serial PK n/a no n/a Primary key for the reference table. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'reference', + 'shortName', + 'Short Name', + 'logical', + 'yes', + 'varchar (250)', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'The ''shortName'' field provides a concise or abbreviated name that describes the resource that is being documented.', + + ' reference Reference shortName Short Name logical varchar (250) n/a n/a no n/a The ''shortName'' field provides a concise or abbreviated name that describes the resource that is being documented. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'reference', + 'fulltext', + 'Full Text', + 'logical', + 'yes', + 'text', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'Full Text of the reference citation.', + + ' reference Reference fulltext Full Text logical text n/a n/a no n/a Full Text of the reference citation. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'reference', + 'referenceType', + 'Reference Type', + 'logical', + 'yes', + 'varchar (250)', + 'n/a', + 'n/a', + 'closed', + 'n/a', + 'Describes the type of reference this generic type is being used to represent. Examples: book, journal article, web page.', + + ' reference Reference referenceType Reference Type logical varchar (250) n/a n/a closed n/a Describes the type of reference this generic type is being used to represent. Examples: book, journal article, web page. Article Book Chapter EditedBook Manuscript Report Thesis ConferenceProceedings PersonalCommunication Presentation Website Generic ' + + ); + + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'reference', + 'referenceType', + 'Article', + null, + '10' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'reference', + 'referenceType', + 'Book', + null, + '20' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'reference', + 'referenceType', + 'Chapter', + null, + '30' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'reference', + 'referenceType', + 'EditedBook', + null, + '40' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'reference', + 'referenceType', + 'Manuscript', + null, + '50' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'reference', + 'referenceType', + 'Report', + null, + '60' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'reference', + 'referenceType', + 'Thesis', + null, + '70' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'reference', + 'referenceType', + 'ConferenceProceedings', + null, + '80' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'reference', + 'referenceType', + 'PersonalCommunication', + null, + '90' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'reference', + 'referenceType', + 'Presentation', + null, + '100' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'reference', + 'referenceType', + 'Website', + null, + '110' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'reference', + 'referenceType', + 'Generic', + null, + '120' + ); + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'reference', + 'title', + 'Title', + 'logical', + 'yes', + 'varchar (250)', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'The formal title given to the work by its author or publisher. The ''title'' field provides a description of the resource that is being documented that is long enough to differentiate it from other similar resources.', + + ' reference Reference title Title logical varchar (250) n/a n/a no n/a The formal title given to the work by its author or publisher. The ''title'' field provides a description of the resource that is being documented that is long enough to differentiate it from other similar resources. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'reference', + 'titleSuperior', + 'Title Superior', + 'logical', + 'yes', + 'varchar (250)', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'A second, higher order title where appropriate, which in the case of a reference to a chapter is the Book title, and in the case of a Conference Presentation is the Name of the Conference.', + + ' reference Reference titleSuperior Title Superior logical varchar (250) n/a n/a no n/a A second, higher order title where appropriate, which in the case of a reference to a chapter is the Book title, and in the case of a Conference Presentation is the Name of the Conference. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'reference', + 'pubDate', + 'Publication Date', + 'logical', + 'yes', + 'Date', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'The ''pubDate'' field represents the date that the resource was published. The format should be represented as: CCYY, which represents a 4 digit year, or as CCYY-MM-DD, which denotes the full year, month, and day. Note that month and day are optional components. Formats must conform to ISO 8601. For example: 1999-10-26', + + ' reference Reference pubDate Publication Date logical Date n/a n/a no n/a The ''pubDate'' field represents the date that the resource was published. The format should be represented as: CCYY, which represents a 4 digit year, or as CCYY-MM-DD, which denotes the full year, month, and day. Note that month and day are optional components. Formats must conform to ISO 8601. For example: 1999-10-26 ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'reference', + 'accessDate', + 'Access Date', + 'logical', + 'yes', + 'Date', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'The date the resource being referenced was accessed. This is useful if the resource is could be changed after formal publication, such as web sites or databases.', + + ' reference Reference accessDate Access Date logical Date n/a n/a no n/a The date the resource being referenced was accessed. This is useful if the resource is could be changed after formal publication, such as web sites or databases. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'reference', + 'conferenceDate', + 'Conference Date', + 'logical', + 'yes', + 'Date', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'The date the conference was held.', + + ' reference Reference conferenceDate Conference Date logical Date n/a n/a no n/a The date the conference was held. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'reference', + 'referenceJournal_ID', + 'Reference Journal', + 'logical', + 'yes', + 'Integer', + 'FK', + 'referenceJournal.referenceJournal_ID', + 'no', + 'n/a', + 'Foreign key into the journal table to identify the journal of this reference.', + + ' reference Reference referenceJournal_ID Reference Journal logical Integer FK referenceJournal.referenceJournal_ID no n/a Foreign key into the journal table to identify the journal of this reference. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'reference', + 'volume', + 'Volume', + 'logical', + 'yes', + 'varchar (250)', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'The volume field is used to describe the volume of the journal in which the article appears.', + + ' reference Reference volume Volume logical varchar (250) n/a n/a no n/a The volume field is used to describe the volume of the journal in which the article appears. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'reference', + 'issue', + 'Issue', + 'logical', + 'yes', + 'varchar (250)', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'The issue field is used to describe the issue of the journal in which the article appears.', + + ' reference Reference issue Issue logical varchar (250) n/a n/a no n/a The issue field is used to describe the issue of the journal in which the article appears. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'reference', + 'pageRange', + 'Page Range', + 'logical', + 'yes', + 'varchar (250)', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'The page range field is used for the beginning and ending pages of the journal article that is being documented.', + + ' reference Reference pageRange Page Range logical varchar (250) n/a n/a no n/a The page range field is used for the beginning and ending pages of the journal article that is being documented. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'reference', + 'totalPages', + 'Total Pages', + 'logical', + 'yes', + 'Integer', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'The total pages field is used to describe the total number of pages in the book that is being described.', + + ' reference Reference totalPages Total Pages logical Integer n/a n/a no n/a The total pages field is used to describe the total number of pages in the book that is being described. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'reference', + 'publisher', + 'Publisher', + 'logical', + 'yes', + 'varchar (250)', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'The organization that physically put together the report and publishes it.', + + ' reference Reference publisher Publisher logical varchar (250) n/a n/a no n/a The organization that physically put together the report and publishes it. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'reference', + 'publicationPlace', + 'Publication Place', + 'logical', + 'yes', + 'varchar (250)', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'The location at which the work was published. This is usually the name of the city in which the publishing house produced the work.', + + ' reference Reference publicationPlace Publication Place logical varchar (250) n/a n/a no n/a The location at which the work was published. This is usually the name of the city in which the publishing house produced the work. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'reference', + 'isbn', + 'ISBN', + 'logical', + 'yes', + 'varchar (250)', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'The ISBN, or International Standard Book Number that has been assigned to this literature resource.', + + ' reference Reference isbn ISBN logical varchar (250) n/a n/a no n/a The ISBN, or International Standard Book Number that has been assigned to this literature resource. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'reference', + 'edition', + 'Edition', + 'logical', + 'yes', + 'varchar (250)', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'The edition field is to document the edition of the generic reference type that is being described.', + + ' reference Reference edition Edition logical varchar (250) n/a n/a no n/a The edition field is to document the edition of the generic reference type that is being described. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'reference', + 'numberOfVolumes', + 'Number Of Volumes', + 'logical', + 'yes', + 'Integer', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'Number of volumes in a collection', + + ' reference Reference numberOfVolumes Number Of Volumes logical Integer n/a n/a no n/a Number of volumes in a collection ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'reference', + 'chapterNumber', + 'Chapter Number', + 'logical', + 'yes', + 'Integer', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'The chapter number of the chapter of a book that is being described.', + + ' reference Reference chapterNumber Chapter Number logical Integer n/a n/a no n/a The chapter number of the chapter of a book that is being described. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'reference', + 'reportNumber', + 'Report Number', + 'logical', + 'yes', + 'Integer', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'The report number field is used to describe the unique identification number that has been issued by the report institution for the report being described.', + + ' reference Reference reportNumber Report Number logical Integer n/a n/a no n/a The report number field is used to describe the unique identification number that has been issued by the report institution for the report being described. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'reference', + 'communicationType', + 'Communication Type', + 'logical', + 'yes', + 'varchar (250)', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'The type of personal communication. Could be an email, letter, memo, transcript of conversation either hardcopy or online.', + + ' reference Reference communicationType Communication Type logical varchar (250) n/a n/a no n/a The type of personal communication. Could be an email, letter, memo, transcript of conversation either hardcopy or online. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'reference', + 'degree', + 'Degree', + 'logical', + 'yes', + 'varchar (250)', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'The degree field is used to describe the name or degree level for which the thesis was completed.', + + ' reference Reference degree Degree logical varchar (250) n/a n/a no n/a The degree field is used to describe the name or degree level for which the thesis was completed. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'reference', + 'url', + 'URL', + 'logical', + 'yes', + 'text', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'A URL (Uniform Resource Locator) from which this resource can be downloaded or additional information can be obtained.', + + ' reference Reference url URL logical text n/a n/a no n/a A URL (Uniform Resource Locator) from which this resource can be downloaded or additional information can be obtained. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'reference', + 'doi', + 'DOI', + 'logical', + 'yes', + 'text', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'A Digital Object Identifier - a digital identifier for any object of intellectual property. A DOI provides a means of persistently identifying a piece of intellectual property on a digital network and associating it with related current data. (www.doi.org)', + + ' reference Reference doi DOI logical text n/a n/a no n/a A Digital Object Identifier - a digital identifier for any object of intellectual property. A DOI provides a means of persistently identifying a piece of intellectual property on a digital network and associating it with related current data. (www.doi.org) ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'reference', + 'additionalInfo', + 'Additional Information', + 'logical', + 'yes', + 'text', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'This field provides any information that is not characterized by the other resource metadata fields. Example: Copyright 2001, Robert Warner', + + ' reference Reference additionalInfo Additional Information logical text n/a n/a no n/a This field provides any information that is not characterized by the other resource metadata fields. Example: Copyright 2001, Robert Warner ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'reference', + 'accessionCode', + 'Accession Code', + 'logical', + 'yes', + 'varchar (255)', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'Code that uniquely references this record, allowing reference to this record for this version of this database. Better than a primary key, which is automatically generated by a database and not globally unique. VegBank Accession codes are only generated by VegBank, and therefore data integrity can be guaranteed, unlike with a primary key (number).', + + ' reference Reference accessionCode Accession Code logical varchar (255) n/a n/a no n/a Code that uniquely references this record, allowing reference to this record for this version of this database. Better than a primary key, which is automatically generated by a database and not globally unique. VegBank Accession codes are only generated by VegBank, and therefore data integrity can be guaranteed, unlike with a primary key (number). ' + + ); + + + INSERT INTO dba_tableDescription ( tableName , tableLabel , tableNotes , tableDescription , tableKeywords ) values ( + 'referenceAltIdent', + 'Reference Alternate Identifier', + 'This table stores information about identifiers that can be used to indicate a particular reference.', + null, + ' referenceAltIdent Reference Alternate Identifier This table stores information about identifiers that can be used to indicate a particular reference. referenceAltIdent_ID ID reference_ID Reference system System identifier Identifier ' + ); + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'referenceAltIdent', + 'referenceAltIdent_ID', + 'ID', + 'logical', + 'no', + 'serial', + 'PK', + 'n/a', + 'no', + 'n/a', + 'Primary key for the referenceAltIdent table.', + + ' referenceAltIdent Reference Alternate Identifier referenceAltIdent_ID ID logical required serial PK n/a no n/a Primary key for the referenceAltIdent table. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'referenceAltIdent', + 'reference_ID', + 'Reference', + 'logical', + 'no', + 'Integer', + 'FK', + 'reference.reference_ID', + 'no', + 'n/a', + 'Foreign key into the reference table to indicate which reference is referenced by this alternate identifier.', + + ' referenceAltIdent Reference Alternate Identifier reference_ID Reference logical required Integer FK reference.reference_ID no n/a Foreign key into the reference table to indicate which reference is referenced by this alternate identifier. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'referenceAltIdent', + 'system', + 'System', + 'logical', + 'yes', + 'varchar (250)', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'The data management system within which an identifier is in scope and therefore unique. This is typically a URL (Uniform Resource Locator) that indicates a data management system. All identifiers that share a system must be unique. In other words, if the same identifier is used in two locations with identical systems, then by definition the objects at which they point are in fact the same object. Example(s): http://metacat.somewhere.org/svc/mc/', + + ' referenceAltIdent Reference Alternate Identifier system System logical varchar (250) n/a n/a no n/a The data management system within which an identifier is in scope and therefore unique. This is typically a URL (Uniform Resource Locator) that indicates a data management system. All identifiers that share a system must be unique. In other words, if the same identifier is used in two locations with identical systems, then by definition the objects at which they point are in fact the same object. Example(s): http://metacat.somewhere.org/svc/mc/ ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'referenceAltIdent', + 'identifier', + 'Identifier', + 'logical', + 'no', + 'varchar (250)', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'An additional, secondary identifier for this entity. The primary identifier belongs in the reference table, but additional identifiers that are used to label this entity, possibly from different data management systems, can be listed here. Example: VCR3465', + + ' referenceAltIdent Reference Alternate Identifier identifier Identifier logical required varchar (250) n/a n/a no n/a An additional, secondary identifier for this entity. The primary identifier belongs in the reference table, but additional identifiers that are used to label this entity, possibly from different data management systems, can be listed here. Example: VCR3465 ' + + ); + + + INSERT INTO dba_tableDescription ( tableName , tableLabel , tableNotes , tableDescription , tableKeywords ) values ( + 'referenceContributor', + 'Reference Contributor', + 'This table links reference parties with references and shows how a contribution was made by the party.', + null, + ' referenceContributor Reference Contributor This table links reference parties with references and shows how a contribution was made by the party. referenceContributor_ID ID reference_ID Reference referenceParty_ID Reference Party roleType Role Type position Position ' + ); + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'referenceContributor', + 'referenceContributor_ID', + 'ID', + 'logical', + 'no', + 'serial', + 'PK', + 'n/a', + 'no', + 'n/a', + 'Primary key for the referenceContributor table.', + + ' referenceContributor Reference Contributor referenceContributor_ID ID logical required serial PK n/a no n/a Primary key for the referenceContributor table. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'referenceContributor', + 'reference_ID', + 'Reference', + 'logical', + 'no', + 'Integer', + 'FK', + 'reference.reference_ID', + 'no', + 'n/a', + 'Foreign key into the reference table to indicate which reference is referenced by this alternate identifier.', + + ' referenceContributor Reference Contributor reference_ID Reference logical required Integer FK reference.reference_ID no n/a Foreign key into the reference table to indicate which reference is referenced by this alternate identifier. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'referenceContributor', + 'referenceParty_ID', + 'Reference Party', + 'logical', + 'no', + 'Integer', + 'FK', + 'referenceParty.referenceParty_ID', + 'no', + 'n/a', + 'Foreign key into the referenceParty table to indicate which person contributed.', + + ' referenceContributor Reference Contributor referenceParty_ID Reference Party logical required Integer FK referenceParty.referenceParty_ID no n/a Foreign key into the referenceParty table to indicate which person contributed. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'referenceContributor', + 'roleType', + 'Role Type', + 'logical', + 'yes', + 'varchar (250)', + 'n/a', + 'n/a', + 'closed', + 'n/a', + 'Use this field to describe the role the party played with respect to the resource. Some potential roles include technician, reviewer, principal investigator, and many others.', + + ' referenceContributor Reference Contributor roleType Role Type logical varchar (250) n/a n/a closed n/a Use this field to describe the role the party played with respect to the resource. Some potential roles include technician, reviewer, principal investigator, and many others. Author Editor Originator Performer Recipient CustodianSteward ' + + ); + + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'referenceContributor', + 'roleType', + 'Author', + null, + null + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'referenceContributor', + 'roleType', + 'CustodianSteward', + null, + null + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'referenceContributor', + 'roleType', + 'Editor', + null, + null + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'referenceContributor', + 'roleType', + 'Originator', + null, + null + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'referenceContributor', + 'roleType', + 'Performer', + null, + null + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'referenceContributor', + 'roleType', + 'Recipient', + null, + null + ); + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'referenceContributor', + 'position', + 'Position', + 'logical', + 'yes', + 'Integer', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'Numerical order in which this contributor''s name should be in the order of contributors, if applicable. Examples: 1 [for the first author], 2, [for the second author], etc.', + + ' referenceContributor Reference Contributor position Position logical Integer n/a n/a no n/a Numerical order in which this contributor''s name should be in the order of contributors, if applicable. Examples: 1 [for the first author], 2, [for the second author], etc. ' + + ); + + + INSERT INTO dba_tableDescription ( tableName , tableLabel , tableNotes , tableDescription , tableKeywords ) values ( + 'referenceParty', + 'Reference Party', + 'This table stores information about parties that contributed to a reference.', + null, + ' referenceParty Reference Party This table stores information about parties that contributed to a reference. referenceParty_ID ID type Reference Party Type positionName Position Name salutation Salutation givenName Given Name surname Surname suffix Suffix organizationName Organization Name currentParty_ID Current Name accessionCode Accession Code ' + ); + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'referenceParty', + 'referenceParty_ID', + 'ID', + 'logical', + 'no', + 'serial', + 'PK', + 'n/a', + 'no', + 'n/a', + 'Primary key for the referenceParty table.', + + ' referenceParty Reference Party referenceParty_ID ID logical required serial PK n/a no n/a Primary key for the referenceParty table. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'referenceParty', + 'type', + 'Reference Party Type', + 'logical', + 'yes', + 'varchar (250)', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'Type of Party this record refers to: usually person or institution. Type determines rules for which fields must be completed.', + + ' referenceParty Reference Party type Reference Party Type logical varchar (250) n/a n/a no n/a Type of Party this record refers to: usually person or institution. Type determines rules for which fields must be completed. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'referenceParty', + 'positionName', + 'Position Name', + 'logical', + 'yes', + 'varchar (250)', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'This field is intended to be used instead of a particular person or full organization name. If the associated person that holds the role changes frequently, then Position Name would be used for consistency. Note that this field, used in conjunction with ''organizationName'' and ''individualName'' make up a single logical originator. Because of this, an originator with only the individualName of ''Joe Smith'' is NOT the same as an originator with the name of ''Joe Smith'' and the organizationName of ''NSF''. Also, the positionName should not be used in conjunction with individualName unless only that individual at that position would be considered an originator for the data package. If a positionName is used in conjunction with an organizationName, then that implies that any person who currently occupies said positionName at organizationName is the originator of the data package. Example(s): Niwot Ridge Data Manager', + + ' referenceParty Reference Party positionName Position Name logical varchar (250) n/a n/a no n/a This field is intended to be used instead of a particular person or full organization name. If the associated person that holds the role changes frequently, then Position Name would be used for consistency. Note that this field, used in conjunction with ''organizationName'' and ''individualName'' make up a single logical originator. Because of this, an originator with only the individualName of ''Joe Smith'' is NOT the same as an originator with the name of ''Joe Smith'' and the organizationName of ''NSF''. Also, the positionName should not be used in conjunction with individualName unless only that individual at that position would be considered an originator for the data package. If a positionName is used in conjunction with an organizationName, then that implies that any person who currently occupies said positionName at organizationName is the originator of the data package. Example(s): Niwot Ridge Data Manager ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'referenceParty', + 'salutation', + 'Salutation', + 'logical', + 'yes', + 'varchar (250)', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'The salutation field is used in addressing an individual with a particular title, such as Dr., Ms., Mrs., Mr., etc.', + + ' referenceParty Reference Party salutation Salutation logical varchar (250) n/a n/a no n/a The salutation field is used in addressing an individual with a particular title, such as Dr., Ms., Mrs., Mr., etc. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'referenceParty', + 'givenName', + 'Given Name', + 'logical', + 'yes', + 'varchar (250)', + 'n/a', + 'n/a', + 'no', + 'All names except surname', + 'The given name field is used for the all names, except the surname, of the individual associated with the resource. Possible usages include: first name and middle name, first name and middle initials, first name, etc. Example(s): Jo, Jo R., Jo R.W., John Robert Peter', + + ' referenceParty Reference Party givenName Given Name logical varchar (250) n/a n/a no All names except surname The given name field is used for the all names, except the surname, of the individual associated with the resource. Possible usages include: first name and middle name, first name and middle initials, first name, etc. Example(s): Jo, Jo R., Jo R.W., John Robert Peter ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'referenceParty', + 'surname', + 'Surname', + 'logical', + 'yes', + 'varchar (250)', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'The surname field is used for the last name of the individual associated with the resource.', + + ' referenceParty Reference Party surname Surname logical varchar (250) n/a n/a no n/a The surname field is used for the last name of the individual associated with the resource. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'referenceParty', + 'suffix', + 'Suffix', + 'logical', + 'yes', + 'varchar (250)', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'A suffix or suffix abbreviation that follows a name. Examples: Jr., Senior, III, etc.', + + ' referenceParty Reference Party suffix Suffix logical varchar (250) n/a n/a no n/a A suffix or suffix abbreviation that follows a name. Examples: Jr., Senior, III, etc. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'referenceParty', + 'organizationName', + 'Organization Name', + 'logical', + 'yes', + 'varchar (250)', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'The responsible party field contains the full name of the organization that is associated with the resource. This field is intended to describe which institution or overall organization is associated with the resource being described. Note that this field, used in conjunction with ''individualName'' and ''positionName'' make up a single logical originator. Because of this, an originator with only the individualName of ''Joe Smith'' is NOT the same as an originator with the name of ''Joe Smith'' and the organizationName of ''NSF''. Also, the positionName should not be used in conjunction with individualName unless only that individual at that position would be considered an originator for the data package. If a positionName is used in conjunction with an organizationName, then that implies that any person who currently occupies said positionName at organizationName is the originator of the data package. Example(s): National Center for Ecological Analysis and Synthesis', + + ' referenceParty Reference Party organizationName Organization Name logical varchar (250) n/a n/a no n/a The responsible party field contains the full name of the organization that is associated with the resource. This field is intended to describe which institution or overall organization is associated with the resource being described. Note that this field, used in conjunction with ''individualName'' and ''positionName'' make up a single logical originator. Because of this, an originator with only the individualName of ''Joe Smith'' is NOT the same as an originator with the name of ''Joe Smith'' and the organizationName of ''NSF''. Also, the positionName should not be used in conjunction with individualName unless only that individual at that position would be considered an originator for the data package. If a positionName is used in conjunction with an organizationName, then that implies that any person who currently occupies said positionName at organizationName is the originator of the data package. Example(s): National Center for Ecological Analysis and Synthesis ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'referenceParty', + 'currentParty_ID', + 'Current Name', + 'logical', + 'yes', + 'Integer', + 'FK', + 'referenceParty.referenceParty_ID', + 'no', + 'recursive FK', + 'Recursive Foreign key into the referenceParty table to indicate the current name of the party.', + + ' referenceParty Reference Party currentParty_ID Current Name logical Integer FK referenceParty.referenceParty_ID no recursive FK Recursive Foreign key into the referenceParty table to indicate the current name of the party. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'referenceParty', + 'accessionCode', + 'Accession Code', + 'logical', + 'yes', + 'varchar (255)', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'Code that uniquely references this record, allowing reference to this record for this version of this database. Better than a primary key, which is automatically generated by a database and not globally unique. VegBank Accession codes are only generated by VegBank, and therefore data integrity can be guaranteed, unlike with a primary key (number).', + + ' referenceParty Reference Party accessionCode Accession Code logical varchar (255) n/a n/a no n/a Code that uniquely references this record, allowing reference to this record for this version of this database. Better than a primary key, which is automatically generated by a database and not globally unique. VegBank Accession codes are only generated by VegBank, and therefore data integrity can be guaranteed, unlike with a primary key (number). ' + + ); + + + INSERT INTO dba_tableDescription ( tableName , tableLabel , tableNotes , tableDescription , tableKeywords ) values ( + 'referenceJournal', + 'Reference Journal', + 'This table stores information about journals used as part of a reference.', + null, + ' referenceJournal Reference Journal This table stores information about journals used as part of a reference. referenceJournal_ID ID journal Journal issn ISSN abbreviation Abbreviation accessionCode Accession Code ' + ); + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'referenceJournal', + 'referenceJournal_ID', + 'ID', + 'logical', + 'no', + 'serial', + 'PK', + 'n/a', + 'no', + 'n/a', + 'Primary key for the referenceJournal table.', + + ' referenceJournal Reference Journal referenceJournal_ID ID logical required serial PK n/a no n/a Primary key for the referenceJournal table. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'referenceJournal', + 'journal', + 'Journal', + 'logical', + 'no', + 'varchar (250)', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'The name of the journal, magazine, newspaper, zine, etc... in which the article was published. Example(s): Ecology, New York Times, Harper''s, Canadian Journal of Botany/Revue Canadienne de Botanique ,The Journal of the American Medical Association', + + ' referenceJournal Reference Journal journal Journal logical required varchar (250) n/a n/a no n/a The name of the journal, magazine, newspaper, zine, etc... in which the article was published. Example(s): Ecology, New York Times, Harper''s, Canadian Journal of Botany/Revue Canadienne de Botanique ,The Journal of the American Medical Association ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'referenceJournal', + 'issn', + 'ISSN', + 'logical', + 'yes', + 'varchar (250)', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'The ISSN, or International Standard Serial Number that has been assigned to this literature resource. Example(s): ISSN 1234-5679', + + ' referenceJournal Reference Journal issn ISSN logical varchar (250) n/a n/a no n/a The ISSN, or International Standard Serial Number that has been assigned to this literature resource. Example(s): ISSN 1234-5679 ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'referenceJournal', + 'abbreviation', + 'Abbreviation', + 'logical', + 'yes', + 'varchar (250)', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'Standard abbreviation or shorter name of the journal. Example(s): Can. J. Bot./Rev. Can. Bot., JAMA', + + ' referenceJournal Reference Journal abbreviation Abbreviation logical varchar (250) n/a n/a no n/a Standard abbreviation or shorter name of the journal. Example(s): Can. J. Bot./Rev. Can. Bot., JAMA ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'referenceJournal', + 'accessionCode', + 'Accession Code', + 'logical', + 'yes', + 'varchar (255)', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'Code that uniquely references this record, allowing reference to this record for this version of this database. Better than a primary key, which is automatically generated by a database and not globally unique. VegBank Accession codes are only generated by VegBank, and therefore data integrity can be guaranteed, unlike with a primary key (number).', + + ' referenceJournal Reference Journal accessionCode Accession Code logical varchar (255) n/a n/a no n/a Code that uniquely references this record, allowing reference to this record for this version of this database. Better than a primary key, which is automatically generated by a database and not globally unique. VegBank Accession codes are only generated by VegBank, and therefore data integrity can be guaranteed, unlike with a primary key (number). ' + + ); + + + INSERT INTO dba_tableDescription ( tableName , tableLabel , tableNotes , tableDescription , tableKeywords ) values ( + 'classContributor', + 'Classification Contributor', + 'This table stores information about who participated in a classification event', + 'This table serves as an intersection entity used to link a party with a specific plot classification event.', + ' classContributor Classification Contributor This table stores information about who participated in a classification event This table serves as an intersection entity used to link a party with a specific plot classification event. CLASSCONTRIBUTOR_ID ID COMMCLASS_ID Community Classification PARTY_ID Party ROLE_ID Role emb_classContributor this row embargoed. ' + ); + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'classContributor', + 'CLASSCONTRIBUTOR_ID', + 'ID', + 'logical', + 'yes', + 'serial', + 'PK', + 'n/a', + 'no', + 'Primary key for the classContributor table.', + 'Database generated identifier assigned to each unique contribution to the classification of a plot observation.', + + ' classContributor Classification Contributor CLASSCONTRIBUTOR_ID ID logical serial PK n/a no Primary key for the classContributor table. Database generated identifier assigned to each unique contribution to the classification of a plot observation. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'classContributor', + 'COMMCLASS_ID', + 'Community Classification', + 'logical', + 'no', + 'Integer', + 'FK', + 'commClass.COMMCLASS_ID', + 'no', + 'Foreign key into the commClass table.', + 'Observation classification event to which the contributor is associated.', + + ' classContributor Classification Contributor COMMCLASS_ID Community Classification logical required Integer FK commClass.COMMCLASS_ID no Foreign key into the commClass table. Observation classification event to which the contributor is associated. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'classContributor', + 'PARTY_ID', + 'Party', + 'logical', + 'no', + 'Integer', + 'FK', + 'party.PARTY_ID', + 'no', + 'Foreign key into the party table.', + 'Link to the party that contributed to the classification event.', + + ' classContributor Classification Contributor PARTY_ID Party logical required Integer FK party.PARTY_ID no Foreign key into the party table. Link to the party that contributed to the classification event. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'classContributor', + 'ROLE_ID', + 'Role', + 'logical', + 'yes', + 'Integer', + 'FK', + 'aux_Role.ROLE_ID', + 'no', + 'Foreign key into the aux_Role table', + 'Foreign key that identifies the role that the party had in the classification event (e.g., classifier, consultant, research advisor).', + + ' classContributor Classification Contributor ROLE_ID Role logical Integer FK aux_Role.ROLE_ID no Foreign key into the aux_Role table Foreign key that identifies the role that the party had in the classification event (e.g., classifier, consultant, research advisor). ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'classContributor', + 'emb_classContributor', + 'this row embargoed.', + 'denorm', + 'yes', + 'Integer', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'This value mimics the default embargo value for the plot that this record belongs to.', + + ' classContributor Classification Contributor emb_classContributor this row embargoed. denorm Integer n/a n/a no n/a This value mimics the default embargo value for the plot that this record belongs to. ' + + ); + + + INSERT INTO dba_tableDescription ( tableName , tableLabel , tableNotes , tableDescription , tableKeywords ) values ( + 'commClass', + 'Community Classification', + 'This table stores general information about classification events where one or more community concepts were applied to a specific Observation by one or more parties.', + null, + ' commClass Community Classification This table stores general information about classification events where one or more community concepts were applied to a specific Observation by one or more parties. COMMCLASS_ID ID OBSERVATION_ID Observation classStartDate Classification Start Date classStopDate Classification Stop Date inspection Inspection tableAnalysis Table Analysis multivariateAnalysis Multivariate Analysis expertSystem Expert System classPublication_ID Classification Publication classNotes Classification Notes commName Community Name commCode Community Code commFramework Community Framework commLevel Community Level accessionCode Accession Code emb_commClass this row embargoed. ' + ); + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'commClass', + 'COMMCLASS_ID', + 'ID', + 'logical', + 'yes', + 'serial', + 'PK', + 'n/a', + 'no', + 'Primary Key for the commClass table.', + 'Database generated identifier assigned to each unique observation classification event.', + + ' commClass Community Classification COMMCLASS_ID ID logical serial PK n/a no Primary Key for the commClass table. Database generated identifier assigned to each unique observation classification event. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'commClass', + 'OBSERVATION_ID', + 'Observation', + 'logical', + 'no', + 'Integer', + 'FK', + 'observation.OBSERVATION_ID', + 'no', + 'Foreign key into the observation table', + 'Link to the observation table identifying which observation is being classified.', + + ' commClass Community Classification OBSERVATION_ID Observation logical required Integer FK observation.OBSERVATION_ID no Foreign key into the observation table Link to the observation table identifying which observation is being classified. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'commClass', + 'classStartDate', + 'Classification Start Date', + 'logical', + 'yes', + 'Date', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'Start date for the application of a vegetation class to a plot observation by one or more parties.', + + ' commClass Community Classification classStartDate Classification Start Date logical Date n/a n/a no n/a Start date for the application of a vegetation class to a plot observation by one or more parties. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'commClass', + 'classStopDate', + 'Classification Stop Date', + 'logical', + 'yes', + 'Date', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'Stop date for the application of a vegetation class to a plot observation by one or more parties.', + + ' commClass Community Classification classStopDate Classification Stop Date logical Date n/a n/a no n/a Stop date for the application of a vegetation class to a plot observation by one or more parties. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'commClass', + 'inspection', + 'Inspection', + 'logical', + 'yes', + 'Boolean', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'Classification informed by simple inspection of data.', + + ' commClass Community Classification inspection Inspection logical Boolean n/a n/a no n/a Classification informed by simple inspection of data. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'commClass', + 'tableAnalysis', + 'Table Analysis', + 'logical', + 'yes', + 'Boolean', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'Classification informed by inspection of floristic composition tables.', + + ' commClass Community Classification tableAnalysis Table Analysis logical Boolean n/a n/a no n/a Classification informed by inspection of floristic composition tables. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'commClass', + 'multivariateAnalysis', + 'Multivariate Analysis', + 'logical', + 'yes', + 'Boolean', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'Classification informed by use of multivariate numerical tools.', + + ' commClass Community Classification multivariateAnalysis Multivariate Analysis logical Boolean n/a n/a no n/a Classification informed by use of multivariate numerical tools. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'commClass', + 'expertSystem', + 'Expert System', + 'logical', + 'yes', + 'text', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'Description of any automated expert system used in classification.', + + ' commClass Community Classification expertSystem Expert System logical text n/a n/a no n/a Description of any automated expert system used in classification. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'commClass', + 'classPublication_ID', + 'Classification Publication', + 'logical', + 'yes', + 'Integer', + 'FK', + 'reference.reference_ID', + 'no', + 'Foreign key into the reference table', + 'Link to a publication wherein the observation was classified.', + + ' commClass Community Classification classPublication_ID Classification Publication logical Integer FK reference.reference_ID no Foreign key into the reference table Link to a publication wherein the observation was classified. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'commClass', + 'classNotes', + 'Classification Notes', + 'logical', + 'yes', + 'text', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'Notes about the classification event by the parties participating in the event. This might include the purpose or rationale for the classification.', + + ' commClass Community Classification classNotes Classification Notes logical text n/a n/a no n/a Notes about the classification event by the parties participating in the event. This might include the purpose or rationale for the classification. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'commClass', + 'commName', + 'Community Name', + 'implementation', + 'yes', + 'varchar (200)', + 'n/a', + 'n/a', + 'no', + null, + null, + + ' commClass Community Classification commName Community Name implementation varchar (200) n/a n/a no ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'commClass', + 'commCode', + 'Community Code', + 'implementation', + 'yes', + 'varchar (200)', + 'n/a', + 'n/a', + 'no', + null, + null, + + ' commClass Community Classification commCode Community Code implementation varchar (200) n/a n/a no ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'commClass', + 'commFramework', + 'Community Framework', + 'implementation', + 'yes', + 'varchar (200)', + 'n/a', + 'n/a', + 'no', + null, + null, + + ' commClass Community Classification commFramework Community Framework implementation varchar (200) n/a n/a no ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'commClass', + 'commLevel', + 'Community Level', + 'implementation', + 'yes', + 'varchar (200)', + 'n/a', + 'n/a', + 'no', + null, + null, + + ' commClass Community Classification commLevel Community Level implementation varchar (200) n/a n/a no ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'commClass', + 'accessionCode', + 'Accession Code', + 'logical', + 'yes', + 'varchar (255)', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'Code that uniquely references this record, allowing reference to this record for this version of this database. Better than a primary key, which is automatically generated by a database and not globally unique. VegBank Accession codes are only generated by VegBank, and therefore data integrity can be guaranteed, unlike with a primary key (number).', + + ' commClass Community Classification accessionCode Accession Code logical varchar (255) n/a n/a no n/a Code that uniquely references this record, allowing reference to this record for this version of this database. Better than a primary key, which is automatically generated by a database and not globally unique. VegBank Accession codes are only generated by VegBank, and therefore data integrity can be guaranteed, unlike with a primary key (number). ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'commClass', + 'emb_commClass', + 'this row embargoed.', + 'denorm', + 'yes', + 'Integer', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'This value mimics the default embargo value for the plot that this record belongs to.', + + ' commClass Community Classification emb_commClass this row embargoed. denorm Integer n/a n/a no n/a This value mimics the default embargo value for the plot that this record belongs to. ' + + ); + + + INSERT INTO dba_tableDescription ( tableName , tableLabel , tableNotes , tableDescription , tableKeywords ) values ( + 'commInterpretation', + 'Community Interpretation', + 'This table tracks the assignment of specific community concepts to plot observations', + null, + ' commInterpretation Community Interpretation This table tracks the assignment of specific community concepts to plot observations COMMINTERPRETATION_ID ID COMMCLASS_ID Community Classification COMMCONCEPT_ID Community Concept commcode Community Code commname Community Name classFit Class Fit classConfidence Class Confidence commAuthority_ID Community Authority Reference notes Notes type Typal nomenclaturalType Nomenclatural Type emb_commInterpretation this row embargoed. ' + ); + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'commInterpretation', + 'COMMINTERPRETATION_ID', + 'ID', + 'logical', + 'yes', + 'serial', + 'PK', + 'n/a', + 'no', + 'Primary Key for the communityInterpretation table.', + 'Database generated identifier assigned to each unique assignment of a community concept to a plot observation.', + + ' commInterpretation Community Interpretation COMMINTERPRETATION_ID ID logical serial PK n/a no Primary Key for the communityInterpretation table. Database generated identifier assigned to each unique assignment of a community concept to a plot observation. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'commInterpretation', + 'COMMCLASS_ID', + 'Community Classification', + 'logical', + 'no', + 'Integer', + 'FK', + 'commClass.COMMCLASS_ID', + 'no', + 'Foreign key into the commClassification table.', + 'Link to the commClassification table identifying the specific classification event.', + + ' commInterpretation Community Interpretation COMMCLASS_ID Community Classification logical required Integer FK commClass.COMMCLASS_ID no Foreign key into the commClassification table. Link to the commClassification table identifying the specific classification event. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'commInterpretation', + 'COMMCONCEPT_ID', + 'Community Concept', + 'logical', + 'yes', + 'Integer', + 'FK', + 'commConcept.COMMCONCEPT_ID', + 'no', + 'Foreign key into the commConcept table.', + 'Link to the communityConcept table identifying the specific community concept being applied.', + + ' commInterpretation Community Interpretation COMMCONCEPT_ID Community Concept logical Integer FK commConcept.COMMCONCEPT_ID no Foreign key into the commConcept table. Link to the communityConcept table identifying the specific community concept being applied. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'commInterpretation', + 'commcode', + 'Community Code', + 'implementation', + 'yes', + 'varchar (34)', + 'n/a', + 'n/a', + 'no', + null, + null, + + ' commInterpretation Community Interpretation commcode Community Code implementation varchar (34) n/a n/a no ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'commInterpretation', + 'commname', + 'Community Name', + 'denorm', + 'yes', + 'varchar (200)', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'Name of the community indicated in commConcept_ID.', + + ' commInterpretation Community Interpretation commname Community Name denorm varchar (200) n/a n/a no n/a Name of the community indicated in commConcept_ID. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'commInterpretation', + 'classFit', + 'Class Fit', + 'logical', + 'yes', + 'varchar (50)', + 'n/a', + 'n/a', + 'closed', + 'closed list', + 'Indicates the degree of fit with the community concept being assigned. Values derive from Gopal, S., and Woodcock, C. (1994), Theory and methods for accuracy assessment of thematic maps using fuzzy sets. Photogrammetric Engineering and Remote Sensing 60(2):181-188.', + + ' commInterpretation Community Interpretation classFit Class Fit logical varchar (50) n/a n/a closed closed list Indicates the degree of fit with the community concept being assigned. Values derive from Gopal, S., and Woodcock, C. (1994), Theory and methods for accuracy assessment of thematic maps using fuzzy sets. Photogrammetric Engineering and Remote Sensing 60(2):181-188. Absolutely correct (Fits well) No doubt about the match. Perfect fit. Absolutely wrong (Absolutely doesn''t fit) This answer is absolutely unacceptable. Unambiguously incorrect. Good answer (Fits reasonably well) Good match with the concept. Unambiguously correct. Reasonable or acceptable answer (Possibly fits) Maybe not the best possible answer but it is acceptable; this answer does not pose a problem to the user. Correct. Understandable but wrong (Doesn''t fit but is close) Not a good answer. There is something about the plot that makes the answer understandable, but there is clearly a better answer. This answer would pose a problem for users. Incorrect. ' + + ); + + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'commInterpretation', + 'classFit', + 'Absolutely wrong', + '(Absolutely doesn''t fit) This answer is absolutely unacceptable. Unambiguously incorrect.', + '1' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'commInterpretation', + 'classFit', + 'Understandable but wrong', + '(Doesn''t fit but is close) Not a good answer. There is something about the plot that makes the answer understandable, but there is clearly a better answer. This answer would pose a problem for users. Incorrect.', + '2' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'commInterpretation', + 'classFit', + 'Reasonable or acceptable answer', + '(Possibly fits) Maybe not the best possible answer but it is acceptable; this answer does not pose a problem to the user. Correct.', + '3' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'commInterpretation', + 'classFit', + 'Good answer', + '(Fits reasonably well) Good match with the concept. Unambiguously correct.', + '4' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'commInterpretation', + 'classFit', + 'Absolutely correct', + '(Fits well) No doubt about the match. Perfect fit.', + '5' + ); + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'commInterpretation', + 'classConfidence', + 'Class Confidence', + 'logical', + 'yes', + 'varchar (15)', + 'n/a', + 'n/a', + 'closed', + 'closed list', + 'Indicates the degree of confidence of the interpreter(s) in the interpretation made. This can reflect the level of familiarity with the classification or the sufficiency of information about the plot (e.g., High, Moderate, Low).', + + ' commInterpretation Community Interpretation classConfidence Class Confidence logical varchar (15) n/a n/a closed closed list Indicates the degree of confidence of the interpreter(s) in the interpretation made. This can reflect the level of familiarity with the classification or the sufficiency of information about the plot (e.g., High, Moderate, Low). High The party making the community interpretation has a high confidence in the accuracy of this interpretation. A party can have high confidence that a plot has a fit of "absolutely wrong" for a particular community. Low The party making the community interpretation has a low confidence in the accuracy of this interpretation. Medium The party making the community interpretation has a medium amount of confidence in the accuracy of this interpretation. ' + + ); + + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'commInterpretation', + 'classConfidence', + 'High', + 'The party making the community interpretation has a high confidence in the accuracy of this interpretation. A party can have high confidence that a plot has a fit of "absolutely wrong" for a particular community.', + '1' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'commInterpretation', + 'classConfidence', + 'Medium', + 'The party making the community interpretation has a medium amount of confidence in the accuracy of this interpretation.', + '2' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'commInterpretation', + 'classConfidence', + 'Low', + 'The party making the community interpretation has a low confidence in the accuracy of this interpretation.', + '3' + ); + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'commInterpretation', + 'commAuthority_ID', + 'Community Authority Reference', + 'logical', + 'yes', + 'Integer', + 'FK', + 'reference.reference_ID', + 'no', + 'Foreign key into the reference table', + 'Link to the reference from which information on the community concept was obtained during the classification event. (A case could be made for this being moved to reference.)', + + ' commInterpretation Community Interpretation commAuthority_ID Community Authority Reference logical Integer FK reference.reference_ID no Foreign key into the reference table Link to the reference from which information on the community concept was obtained during the classification event. (A case could be made for this being moved to reference.) ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'commInterpretation', + 'notes', + 'Notes', + 'logical', + 'yes', + 'text', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'Notes pertaining to the classification analysis and decision.', + + ' commInterpretation Community Interpretation notes Notes logical text n/a n/a no n/a Notes pertaining to the classification analysis and decision. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'commInterpretation', + 'type', + 'Typal', + 'logical', + 'yes', + 'Boolean', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'This assignment is the type description for the community concept, as indicated in the publication referenced in commClass.classPublication_ID (NOT the commAuthority_ID of this commInterpretation table).', + + ' commInterpretation Community Interpretation type Typal logical Boolean n/a n/a no n/a This assignment is the type description for the community concept, as indicated in the publication referenced in commClass.classPublication_ID (NOT the commAuthority_ID of this commInterpretation table). ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'commInterpretation', + 'nomenclaturalType', + 'Nomenclatural Type', + 'logical', + 'yes', + 'Boolean', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'Typal plot for the Braun-Blanquet community name.', + + ' commInterpretation Community Interpretation nomenclaturalType Nomenclatural Type logical Boolean n/a n/a no n/a Typal plot for the Braun-Blanquet community name. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'commInterpretation', + 'emb_commInterpretation', + 'this row embargoed.', + 'denorm', + 'yes', + 'Integer', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'This value mimics the default embargo value for the plot that this record belongs to.', + + ' commInterpretation Community Interpretation emb_commInterpretation this row embargoed. denorm Integer n/a n/a no n/a This value mimics the default embargo value for the plot that this record belongs to. ' + + ); + + + INSERT INTO dba_tableDescription ( tableName , tableLabel , tableNotes , tableDescription , tableKeywords ) values ( + 'coverIndex', + 'Cover Index', + 'This table stores the definitions of each coverclass unit associated with each coverclass method.', + null, + ' coverIndex Cover Index This table stores the definitions of each coverclass unit associated with each coverclass method. COVERINDEX_ID ID COVERMETHOD_ID Cover Method coverCode Cover Code upperLimit Upper Limit lowerLimit Lower Limit coverPercent Cover Percent indexDescription Index Description ' + ); + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'coverIndex', + 'COVERINDEX_ID', + 'ID', + 'logical', + 'yes', + 'serial', + 'PK', + 'n/a', + 'no', + 'Primary key for the coverIndex table', + 'Database generated identifier assigned to each unique coverclass associated index value.', + + ' coverIndex Cover Index COVERINDEX_ID ID logical serial PK n/a no Primary key for the coverIndex table Database generated identifier assigned to each unique coverclass associated index value. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'coverIndex', + 'COVERMETHOD_ID', + 'Cover Method', + 'logical', + 'no', + 'Integer', + 'FK', + 'coverMethod.COVERMETHOD_ID', + 'no', + 'Foreign key into the coverMethod table.', + 'Links to a specific cover scale.', + + ' coverIndex Cover Index COVERMETHOD_ID Cover Method logical required Integer FK coverMethod.COVERMETHOD_ID no Foreign key into the coverMethod table. Links to a specific cover scale. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'coverIndex', + 'coverCode', + 'Cover Code', + 'logical', + 'no', + 'varchar (10)', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'The name or label used in the coverclass scale for this specific coverclass.', + + ' coverIndex Cover Index coverCode Cover Code logical required varchar (10) n/a n/a no n/a The name or label used in the coverclass scale for this specific coverclass. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'coverIndex', + 'upperLimit', + 'Upper Limit', + 'logical', + 'yes', + 'Float', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'Upper limit, in percent, associated with the specific coverCode.', + + ' coverIndex Cover Index upperLimit Upper Limit logical Float n/a n/a no n/a Upper limit, in percent, associated with the specific coverCode. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'coverIndex', + 'lowerLimit', + 'Lower Limit', + 'logical', + 'yes', + 'Float', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'This is the lower limit, in percent, associated with a specific coverCode. Where a cover scale has a non-quantitative lower or upper value, as in the "+" of the Braun-Blanquet scale, it is necessary to provide an approximation with "0" being the lower limit of the bottom most class.', + + ' coverIndex Cover Index lowerLimit Lower Limit logical Float n/a n/a no n/a This is the lower limit, in percent, associated with a specific coverCode. Where a cover scale has a non-quantitative lower or upper value, as in the "+" of the Braun-Blanquet scale, it is necessary to provide an approximation with "0" being the lower limit of the bottom most class. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'coverIndex', + 'coverPercent', + 'Cover Percent', + 'logical', + 'no', + 'Float', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'A middle value (usually mean or geometric mean) between the upperLimit and lowerLimt stored by the database for each taxon observation and used for all coverclass conversions and interpretations. This is assigned by the author of the cover class schema.', + + ' coverIndex Cover Index coverPercent Cover Percent logical required Float n/a n/a no n/a A middle value (usually mean or geometric mean) between the upperLimit and lowerLimt stored by the database for each taxon observation and used for all coverclass conversions and interpretations. This is assigned by the author of the cover class schema. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'coverIndex', + 'indexDescription', + 'Index Description', + 'logical', + 'yes', + 'text', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'Description of the specific coverclass. This is particularly helpful in the case that there is no numeric value that can be applied.', + + ' coverIndex Cover Index indexDescription Index Description logical text n/a n/a no n/a Description of the specific coverclass. This is particularly helpful in the case that there is no numeric value that can be applied. ' + + ); + + + INSERT INTO dba_tableDescription ( tableName , tableLabel , tableNotes , tableDescription , tableKeywords ) values ( + 'coverMethod', + 'Cover Method', + 'This table associates a cover scale recognized by the plot data collectors with a set of coverclasses specified in the coverIndex table. This table, together with the coverIndex table, defines a coverclass method.', + null, + ' coverMethod Cover Method This table associates a cover scale recognized by the plot data collectors with a set of coverclasses specified in the coverIndex table. This table, together with the coverIndex table, defines a coverclass method. COVERMETHOD_ID ID reference_ID Reference coverType Cover Type coverEstimationMethod Cover Estimation Method accessionCode Accession Code ' + ); + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'coverMethod', + 'COVERMETHOD_ID', + 'ID', + 'logical', + 'yes', + 'serial', + 'PK', + 'n/a', + 'no', + 'Primary key for the coverMethod table.', + 'Database generated identifier assigned to each unique coverclass methodology.', + + ' coverMethod Cover Method COVERMETHOD_ID ID logical serial PK n/a no Primary key for the coverMethod table. Database generated identifier assigned to each unique coverclass methodology. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'coverMethod', + 'reference_ID', + 'Reference', + 'logical', + 'yes', + 'Integer', + 'FK', + 'reference.reference_ID', + 'no', + 'Foreign key into the reference table.', + 'Foreign Key into the reference table, linking the defining reference to a cover method.', + + ' coverMethod Cover Method reference_ID Reference logical Integer FK reference.reference_ID no Foreign key into the reference table. Foreign Key into the reference table, linking the defining reference to a cover method. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'coverMethod', + 'coverType', + 'Cover Type', + 'logical', + 'no', + 'varchar (30)', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'Name of the coverclass method (e.g., Braun-Blanquet, Barkman, Domin, Daubenmire, Carolina Vegetation Survey, etc.).', + + ' coverMethod Cover Method coverType Cover Type logical required varchar (30) n/a n/a no n/a Name of the coverclass method (e.g., Braun-Blanquet, Barkman, Domin, Daubenmire, Carolina Vegetation Survey, etc.). ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'coverMethod', + 'coverEstimationMethod', + 'Cover Estimation Method', + 'logical', + 'yes', + 'varchar (80)', + 'n/a', + 'n/a', + 'closed', + 'n/a', + 'The way that cover is estimated on the observation.', + + ' coverMethod Cover Method coverEstimationMethod Cover Estimation Method logical varchar (80) n/a n/a closed n/a The way that cover is estimated on the observation. canopy cover Cover estimated as the percentage of ground covered by a vertical outermost perimeter of the natural spread of foliage of plants. (SRM 1989) foliar cover Cover estimated as the percentage of ground covered by the vertical portion of plants. Small openings in the canopy and intraspecific overlap are excluded (SRM 1989). Foliar cover is the vertical projection of shoots; i.e., stems and leaves. ' + + ); + + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'coverMethod', + 'coverEstimationMethod', + 'canopy cover', + 'Cover estimated as the percentage of ground covered by a vertical outermost perimeter of the natural spread of foliage of plants. (SRM 1989)', + '1' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'coverMethod', + 'coverEstimationMethod', + 'foliar cover', + 'Cover estimated as the percentage of ground covered by the vertical portion of plants. Small openings in the canopy and intraspecific overlap are excluded (SRM 1989). Foliar cover is the vertical projection of shoots; i.e., stems and leaves.', + '2' + ); + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'coverMethod', + 'accessionCode', + 'Accession Code', + 'logical', + 'yes', + 'varchar (255)', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'Code that uniquely references this record, allowing reference to this record for this version of this database. Better than a primary key, which is automatically generated by a database and not globally unique. VegBank Accession codes are only generated by VegBank, and therefore data integrity can be guaranteed, unlike with a primary key (number).', + + ' coverMethod Cover Method accessionCode Accession Code logical varchar (255) n/a n/a no n/a Code that uniquely references this record, allowing reference to this record for this version of this database. Better than a primary key, which is automatically generated by a database and not globally unique. VegBank Accession codes are only generated by VegBank, and therefore data integrity can be guaranteed, unlike with a primary key (number). ' + + ); + + + INSERT INTO dba_tableDescription ( tableName , tableLabel , tableNotes , tableDescription , tableKeywords ) values ( + 'definedValue', + 'Defined Value', + 'This table stores the values of user-defined variables.', + 'This table stores values associated with specific user-defined variables identified in the userDefined table.', + ' definedValue Defined Value This table stores the values of user-defined variables. This table stores values associated with specific user-defined variables identified in the userDefined table. DEFINEDVALUE_ID ID USERDEFINED_ID User Defined tableRecord_ID Table Record definedValue Defined Value ' + ); + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'definedValue', + 'DEFINEDVALUE_ID', + 'ID', + 'logical', + 'yes', + 'serial', + 'PK', + 'n/a', + 'no', + 'Primary key for the definedValue table', + 'Database generated identifier assigned to each unique defined value.', + + ' definedValue Defined Value DEFINEDVALUE_ID ID logical serial PK n/a no Primary key for the definedValue table Database generated identifier assigned to each unique defined value. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'definedValue', + 'USERDEFINED_ID', + 'User Defined', + 'logical', + 'no', + 'Integer', + 'FK', + 'userDefined.USERDEFINED_ID', + 'no', + 'n/a', + 'Link to a specific user-defined variable defined in the userDefined table.', + + ' definedValue Defined Value USERDEFINED_ID User Defined logical required Integer FK userDefined.USERDEFINED_ID no n/a Link to a specific user-defined variable defined in the userDefined table. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'definedValue', + 'tableRecord_ID', + 'Table Record', + 'logical', + 'no', + 'Integer', + 'n/a', + 'n/a', + 'no', + 'Pseudokey for the table with which this value should be associated', + 'The numeric value of the record number (primary key) that this user-defined value would have if it were in the table identified by USERDEFINED_ID.', + + ' definedValue Defined Value tableRecord_ID Table Record logical required Integer n/a n/a no Pseudokey for the table with which this value should be associated The numeric value of the record number (primary key) that this user-defined value would have if it were in the table identified by USERDEFINED_ID. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'definedValue', + 'definedValue', + 'Defined Value', + 'logical', + 'no', + 'text', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'The value of the user-defined variable.', + + ' definedValue Defined Value definedValue Defined Value logical required text n/a n/a no n/a The value of the user-defined variable. ' + + ); + + + INSERT INTO dba_tableDescription ( tableName , tableLabel , tableNotes , tableDescription , tableKeywords ) values ( + 'disturbanceObs', + 'Disturbance Observation', + 'This table stores plot observation information pertaining to observer estimation of the disturbance history of the plot.', + 'disturbanceObs is a child of observation; a plot might experience many types of disturbance unique to different observation events.', + ' disturbanceObs Disturbance Observation This table stores plot observation information pertaining to observer estimation of the disturbance history of the plot. disturbanceObs is a child of observation; a plot might experience many types of disturbance unique to different observation events. disturbanceObs_ID ID OBSERVATION_ID Observation disturbanceType Disturbance Type disturbanceIntensity Disturbance Intensity disturbanceAge Disturbance Age disturbanceExtent Disturbance Extent disturbanceComment Disturbance Comment emb_disturbanceObs this row embargoed. ' + ); + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'disturbanceObs', + 'disturbanceObs_ID', + 'ID', + 'logical', + 'yes', + 'serial', + 'PK', + 'n/a', + 'no', + 'Primary key for disturbanceObs', + 'Database generated identifier assigned to each unique disturbance observation..', + + ' disturbanceObs Disturbance Observation disturbanceObs_ID ID logical serial PK n/a no Primary key for disturbanceObs Database generated identifier assigned to each unique disturbance observation.. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'disturbanceObs', + 'OBSERVATION_ID', + 'Observation', + 'logical', + 'no', + 'Integer', + 'FK', + 'observation.OBSERVATION_ID', + 'no', + 'Foreign key that points to the parent observation for this disturbance record', + 'Link to the observation event with which this report of a disturbance event is associated.', + + ' disturbanceObs Disturbance Observation OBSERVATION_ID Observation logical required Integer FK observation.OBSERVATION_ID no Foreign key that points to the parent observation for this disturbance record Link to the observation event with which this report of a disturbance event is associated. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'disturbanceObs', + 'disturbanceType', + 'Disturbance Type', + 'logical', + 'no', + 'varchar (30)', + 'n/a', + 'n/a', + 'closed', + 'closed list', + 'The type of disturbance being reported', + + ' disturbanceObs Disturbance Observation disturbanceType Disturbance Type logical required varchar (30) n/a n/a closed closed list The type of disturbance being reported Animal, general Grazing, domestic stock Grazing, native ungulates Herbivory, invertebrate Herbivory, vertebrates Human, general Cultivation Fire suppression Herbicide or chemical Mowing Roads and vehicular traffic Timber harvest, general Timber harvest, clearcut Timber harvest, selective Trampling and trails Natural, general Avalanche and snow Cryoturbation Erosion Floods Hydrologic alteration Ice Mass movements (landslides) Plant disease Salt spray Tides Wind, chronic Wind event Fire, general Fire, canopy Fire, ground Other disturbances unknown ' + + ); + + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'disturbanceObs', + 'disturbanceType', + 'Animal, general', + null, + '1' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'disturbanceObs', + 'disturbanceType', + 'Grazing, domestic stock', + null, + '2' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'disturbanceObs', + 'disturbanceType', + 'Grazing, native ungulates', + null, + '3' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'disturbanceObs', + 'disturbanceType', + 'Herbivory, invertebrate', + null, + '4' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'disturbanceObs', + 'disturbanceType', + 'Herbivory, vertebrates', + null, + '5' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'disturbanceObs', + 'disturbanceType', + 'Human, general', + null, + '6' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'disturbanceObs', + 'disturbanceType', + 'Cultivation', + null, + '7' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'disturbanceObs', + 'disturbanceType', + 'Fire suppression', + null, + '8' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'disturbanceObs', + 'disturbanceType', + 'Herbicide or chemical', + null, + '9' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'disturbanceObs', + 'disturbanceType', + 'Mowing', + null, + '10' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'disturbanceObs', + 'disturbanceType', + 'Roads and vehicular traffic', + null, + '11' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'disturbanceObs', + 'disturbanceType', + 'Timber harvest, general', + null, + '12' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'disturbanceObs', + 'disturbanceType', + 'Timber harvest, clearcut', + null, + '13' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'disturbanceObs', + 'disturbanceType', + 'Timber harvest, selective', + null, + '14' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'disturbanceObs', + 'disturbanceType', + 'Trampling and trails', + null, + '15' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'disturbanceObs', + 'disturbanceType', + 'Natural, general', + null, + '16' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'disturbanceObs', + 'disturbanceType', + 'Avalanche and snow', + null, + '17' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'disturbanceObs', + 'disturbanceType', + 'Cryoturbation', + null, + '18' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'disturbanceObs', + 'disturbanceType', + 'Erosion', + null, + '19' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'disturbanceObs', + 'disturbanceType', + 'Floods', + null, + '23' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'disturbanceObs', + 'disturbanceType', + 'Hydrologic alteration', + null, + '24' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'disturbanceObs', + 'disturbanceType', + 'Ice', + null, + '25' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'disturbanceObs', + 'disturbanceType', + 'Mass movements (landslides)', + null, + '26' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'disturbanceObs', + 'disturbanceType', + 'Plant disease', + null, + '27' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'disturbanceObs', + 'disturbanceType', + 'Salt spray', + null, + '28' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'disturbanceObs', + 'disturbanceType', + 'Tides', + null, + '29' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'disturbanceObs', + 'disturbanceType', + 'Wind, chronic', + null, + '30' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'disturbanceObs', + 'disturbanceType', + 'Wind event', + null, + '31' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'disturbanceObs', + 'disturbanceType', + 'Fire, general', + null, + '35' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'disturbanceObs', + 'disturbanceType', + 'Fire, canopy', + null, + '36' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'disturbanceObs', + 'disturbanceType', + 'Fire, ground', + null, + '37' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'disturbanceObs', + 'disturbanceType', + 'Other disturbances', + null, + '40' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'disturbanceObs', + 'disturbanceType', + 'unknown', + null, + '50' + ); + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'disturbanceObs', + 'disturbanceIntensity', + 'Disturbance Intensity', + 'logical', + 'yes', + 'varchar (30)', + 'n/a', + 'n/a', + 'closed', + 'closed list', + 'Intensity or degree of the disturbance.', + + ' disturbanceObs Disturbance Observation disturbanceIntensity Disturbance Intensity logical varchar (30) n/a n/a closed closed list Intensity or degree of the disturbance. High None No disturbance of this type was observed on the plot. This may be a useful observation where certain types of disturbance are expected, but no signs of such disturbance were found. Low Medium ' + + ); + + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'disturbanceObs', + 'disturbanceIntensity', + 'High', + null, + '1' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'disturbanceObs', + 'disturbanceIntensity', + 'Medium', + null, + '2' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'disturbanceObs', + 'disturbanceIntensity', + 'Low', + null, + '3' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'disturbanceObs', + 'disturbanceIntensity', + 'None', + 'No disturbance of this type was observed on the plot. This may be a useful observation where certain types of disturbance are expected, but no signs of such disturbance were found.', + '4' + ); + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'disturbanceObs', + 'disturbanceAge', + 'Disturbance Age', + 'logical', + 'yes', + 'Float', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'Estimated time in years since the disturbance event.', + + ' disturbanceObs Disturbance Observation disturbanceAge Disturbance Age logical Float n/a n/a no n/a Estimated time in years since the disturbance event. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'disturbanceObs', + 'disturbanceExtent', + 'Disturbance Extent', + 'logical', + 'yes', + 'Float', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'Percent of the plot that experienced the event.', + + ' disturbanceObs Disturbance Observation disturbanceExtent Disturbance Extent logical Float n/a n/a no n/a Percent of the plot that experienced the event. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'disturbanceObs', + 'disturbanceComment', + 'Disturbance Comment', + 'logical', + 'yes', + 'text', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'Text description of details of the disturbance and its impact on the vegetation.', + + ' disturbanceObs Disturbance Observation disturbanceComment Disturbance Comment logical text n/a n/a no n/a Text description of details of the disturbance and its impact on the vegetation. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'disturbanceObs', + 'emb_disturbanceObs', + 'this row embargoed.', + 'denorm', + 'yes', + 'Integer', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'This value mimics the default embargo value for the plot that this record belongs to.', + + ' disturbanceObs Disturbance Observation emb_disturbanceObs this row embargoed. denorm Integer n/a n/a no n/a This value mimics the default embargo value for the plot that this record belongs to. ' + + ); + + + INSERT INTO dba_tableDescription ( tableName , tableLabel , tableNotes , tableDescription , tableKeywords ) values ( + 'graphic', + 'Graphic', + 'This table stores information about graphical files related to vegetation plot observations', + 'Graphical files can include, among other formats: gif, jpeg, and tif file formats. Because many graphical files, especially remote sensing digital photographs, may be too large to be stored within the database, a graphicLocation may be given as an alternative. Current Business rules cap graphic size at 5M per plot. Graphics of modest size should be included rather than referenced by external address.', + ' graphic Graphic This table stores information about graphical files related to vegetation plot observations Graphical files can include, among other formats: gif, jpeg, and tif file formats. Because many graphical files, especially remote sensing digital photographs, may be too large to be stored within the database, a graphicLocation may be given as an alternative. Current Business rules cap graphic size at 5M per plot. Graphics of modest size should be included rather than referenced by external address. GRAPHIC_ID ID OBSERVATION_ID Observation graphicName Graphic Name graphicLocation Graphic Location graphicDescription Graphic Description graphicType Graphic Type graphicDate Graphic Date graphicData Graphic Data accessionCode Accession Code ' + ); + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'graphic', + 'GRAPHIC_ID', + 'ID', + 'logical', + 'yes', + 'serial', + 'PK', + 'n/a', + 'no', + 'Primary key the graphic table', + 'Database generated identifier assigned to each unique graphic idem.', + + ' graphic Graphic GRAPHIC_ID ID logical serial PK n/a no Primary key the graphic table Database generated identifier assigned to each unique graphic idem. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'graphic', + 'OBSERVATION_ID', + 'Observation', + 'logical', + 'no', + 'Integer', + 'FK', + 'observation.OBSERVATION_ID', + 'no', + 'Foreign key into the observation table.', + 'Link from a graphic file to a specific plot observation.', + + ' graphic Graphic OBSERVATION_ID Observation logical required Integer FK observation.OBSERVATION_ID no Foreign key into the observation table. Link from a graphic file to a specific plot observation. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'graphic', + 'graphicName', + 'Graphic Name', + 'logical', + 'yes', + 'varchar (30)', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'Name of the graphic file.', + + ' graphic Graphic graphicName Graphic Name logical varchar (30) n/a n/a no n/a Name of the graphic file. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'graphic', + 'graphicLocation', + 'Graphic Location', + 'logical', + 'yes', + 'text', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'Where the graphic is located, if not in the database', + + ' graphic Graphic graphicLocation Graphic Location logical text n/a n/a no n/a Where the graphic is located, if not in the database ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'graphic', + 'graphicDescription', + 'Graphic Description', + 'logical', + 'yes', + 'text', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'Description of the graphical file and associated metadata such as contributor, author, sensor, etc.', + + ' graphic Graphic graphicDescription Graphic Description logical text n/a n/a no n/a Description of the graphical file and associated metadata such as contributor, author, sensor, etc. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'graphic', + 'graphicType', + 'Graphic Type', + 'logical', + 'yes', + 'varchar (20)', + 'n/a', + 'n/a', + 'no', + 'may become a closed list', + 'The type of the graphical file format (e.g. gif, tif, ,jpeg).', + + ' graphic Graphic graphicType Graphic Type logical varchar (20) n/a n/a no may become a closed list The type of the graphical file format (e.g. gif, tif, ,jpeg). ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'graphic', + 'graphicDate', + 'Graphic Date', + 'logical', + 'yes', + 'Date', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'Date that the graphic was produced.', + + ' graphic Graphic graphicDate Graphic Date logical Date n/a n/a no n/a Date that the graphic was produced. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'graphic', + 'graphicData', + 'Graphic Data', + 'logical', + 'yes', + 'oid', + 'n/a', + 'n/a', + 'no', + 'may be constrained by a maximum size', + 'The graphical file data. - Max = 5 M total per plot', + + ' graphic Graphic graphicData Graphic Data logical oid n/a n/a no may be constrained by a maximum size The graphical file data. - Max = 5 M total per plot ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'graphic', + 'accessionCode', + 'Accession Code', + 'logical', + 'yes', + 'varchar (255)', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'Code that uniquely references this record, allowing reference to this record for this version of this database. Better than a primary key, which is automatically generated by a database and not globally unique. VegBank Accession codes are only generated by VegBank, and therefore data integrity can be guaranteed, unlike with a primary key (number).', + + ' graphic Graphic accessionCode Accession Code logical varchar (255) n/a n/a no n/a Code that uniquely references this record, allowing reference to this record for this version of this database. Better than a primary key, which is automatically generated by a database and not globally unique. VegBank Accession codes are only generated by VegBank, and therefore data integrity can be guaranteed, unlike with a primary key (number). ' + + ); + + + INSERT INTO dba_tableDescription ( tableName , tableLabel , tableNotes , tableDescription , tableKeywords ) values ( + 'namedPlace', + 'Named Place', + 'This tables stores information about the various ''named places'' that a plot may have been located within. Such places could include geographic regions, study sites, ownership units, managed units, any placename in the USGS glossary (http://www-nmd.usgs.gov/www/gnis/), or equivalent glossary.', + null, + ' namedPlace Named Place This tables stores information about the various ''named places'' that a plot may have been located within. Such places could include geographic regions, study sites, ownership units, managed units, any placename in the USGS glossary (http://www-nmd.usgs.gov/www/gnis/), or equivalent glossary. NAMEDPLACE_ID ID placeSystem Place System placeName Place Name placeDescription Place Description placeCode Place Code owner Owner reference_ID Reference accessionCode Accession Code d_obscount Plot Count ' + ); + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'namedPlace', + 'NAMEDPLACE_ID', + 'ID', + 'logical', + 'yes', + 'serial', + 'PK', + 'n/a', + 'no', + 'Primary for the namedPlace table', + 'Database generated identifier assigned to each unique named place.', + + ' namedPlace Named Place NAMEDPLACE_ID ID logical serial PK n/a no Primary for the namedPlace table Database generated identifier assigned to each unique named place. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'namedPlace', + 'placeSystem', + 'Place System', + 'logical', + 'yes', + 'varchar (50)', + 'n/a', + 'n/a', + 'closed', + 'closed list', + 'Name of the system of names. These can be treated as points as with place names, or as a coverage or set of polygons (e.g., geographic area names, HUC codes, Ecoregions, Quadrangles).', + + ' namedPlace Named Place placeSystem Place System logical varchar (50) n/a n/a closed closed list Name of the system of names. These can be treated as points as with place names, or as a coverage or set of polygons (e.g., geographic area names, HUC codes, Ecoregions, Quadrangles). area|country|territory area, country, or territory continent county county, canton, or parish Geographic Name User named places HUC Code TNC Conservation Region quadrangle region|state|province region or state or province EPA-Omernik Ecoregion USFS-Bailey Ecoregion Ecoregion A non-standard or generic ecoregion that is not specifically mentioned in this list. ' + + ); + + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'namedPlace', + 'placeSystem', + 'region|state|province', + 'region or state or province', + '1' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'namedPlace', + 'placeSystem', + 'county', + 'county, canton, or parish', + '2' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'namedPlace', + 'placeSystem', + 'area|country|territory', + 'area, country, or territory', + '3' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'namedPlace', + 'placeSystem', + 'continent', + null, + '4' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'namedPlace', + 'placeSystem', + 'quadrangle', + null, + '5' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'namedPlace', + 'placeSystem', + 'HUC Code', + null, + '6' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'namedPlace', + 'placeSystem', + 'TNC Conservation Region', + null, + '7' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'namedPlace', + 'placeSystem', + 'EPA-Omernik Ecoregion', + null, + '8' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'namedPlace', + 'placeSystem', + 'USFS-Bailey Ecoregion', + null, + '9' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'namedPlace', + 'placeSystem', + 'Ecoregion', + 'A non-standard or generic ecoregion that is not specifically mentioned in this list.', + '10' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'namedPlace', + 'placeSystem', + 'Geographic Name', + 'User named places', + '11' + ); + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'namedPlace', + 'placeName', + 'Place Name', + 'logical', + 'no', + 'varchar (100)', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'The name of a place in or at which a plot is located. The system "Geographic Name" is an open list defined within this table. The other systems are generally closed lists constrained by aux_tables. These include at least USGSQuad, Continent, Country, State, County, HUC, and Ecoregion.', + + ' namedPlace Named Place placeName Place Name logical required varchar (100) n/a n/a no n/a The name of a place in or at which a plot is located. The system "Geographic Name" is an open list defined within this table. The other systems are generally closed lists constrained by aux_tables. These include at least USGSQuad, Continent, Country, State, County, HUC, and Ecoregion. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'namedPlace', + 'placeDescription', + 'Place Description', + 'logical', + 'yes', + 'text', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'This is the description of a named place.', + + ' namedPlace Named Place placeDescription Place Description logical text n/a n/a no n/a This is the description of a named place. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'namedPlace', + 'placeCode', + 'Place Code', + 'logical', + 'yes', + 'varchar (15)', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'Optional code for location identification', + + ' namedPlace Named Place placeCode Place Code logical varchar (15) n/a n/a no n/a Optional code for location identification ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'namedPlace', + 'owner', + 'Owner', + 'logical', + 'yes', + 'varchar (100)', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'Although somewhat redundant with the owner information contained in observationContributor with roleCode of owner, this allows the program to provide ownership information automatically. The ownership field supercedes this field in priority.', + + ' namedPlace Named Place owner Owner logical varchar (100) n/a n/a no n/a Although somewhat redundant with the owner information contained in observationContributor with roleCode of owner, this allows the program to provide ownership information automatically. The ownership field supercedes this field in priority. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'namedPlace', + 'reference_ID', + 'Reference', + 'logical', + 'yes', + 'Integer', + 'FK', + 'reference.reference_ID', + 'no', + 'Foreign key into the reference table', + 'Link to a reference that contains further information on the named place.', + + ' namedPlace Named Place reference_ID Reference logical Integer FK reference.reference_ID no Foreign key into the reference table Link to a reference that contains further information on the named place. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'namedPlace', + 'accessionCode', + 'Accession Code', + 'logical', + 'yes', + 'varchar (255)', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'Code that uniquely references this record, allowing reference to this record for this version of this database. Better than a primary key, which is automatically generated by a database and not globally unique. VegBank Accession codes are only generated by VegBank, and therefore data integrity can be guaranteed, unlike with a primary key (number).', + + ' namedPlace Named Place accessionCode Accession Code logical varchar (255) n/a n/a no n/a Code that uniquely references this record, allowing reference to this record for this version of this database. Better than a primary key, which is automatically generated by a database and not globally unique. VegBank Accession codes are only generated by VegBank, and therefore data integrity can be guaranteed, unlike with a primary key (number). ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'namedPlace', + 'd_obscount', + 'Plot Count', + 'denorm', + 'yes', + 'Integer', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'Number of observations associated with this entity.', + + ' namedPlace Named Place d_obscount Plot Count denorm Integer n/a n/a no n/a Number of observations associated with this entity. ' + + ); + + + INSERT INTO dba_tableDescription ( tableName , tableLabel , tableNotes , tableDescription , tableKeywords ) values ( + 'namedPlaceCorrelation', + 'Named Place Correlation', + 'Stores information about how different named places related to one another.', + null, + ' namedPlaceCorrelation Named Place Correlation Stores information about how different named places related to one another. NAMEDPLACECORRELATION_ID PARENTPLACE_ID Parent Place CHILDPLACE_ID Child Place placeConvergence Place Convergence ' + ); + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'namedPlaceCorrelation', + 'NAMEDPLACECORRELATION_ID', + null, + 'logical', + 'no', + 'serial', + 'PK', + 'n/a', + 'no', + 'n/a', + 'Primary Key.', + + ' namedPlaceCorrelation Named Place Correlation NAMEDPLACECORRELATION_ID logical required serial PK n/a no n/a Primary Key. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'namedPlaceCorrelation', + 'PARENTPLACE_ID', + 'Parent Place', + 'logical', + 'no', + 'Integer', + 'FK', + 'namedPlace.NAMEDPLACE_ID', + 'no', + 'Foreign key into the namedPlace table', + 'Link to a parent geographical region.', + + ' namedPlaceCorrelation Named Place Correlation PARENTPLACE_ID Parent Place logical required Integer FK namedPlace.NAMEDPLACE_ID no Foreign key into the namedPlace table Link to a parent geographical region. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'namedPlaceCorrelation', + 'CHILDPLACE_ID', + 'Child Place', + 'logical', + 'no', + 'Integer', + 'FK', + 'namedPlace.NAMEDPLACE_ID', + 'no', + 'Foreign key into the namedPlace table', + 'Link to a child geographical region.', + + ' namedPlaceCorrelation Named Place Correlation CHILDPLACE_ID Child Place logical required Integer FK namedPlace.NAMEDPLACE_ID no Foreign key into the namedPlace table Link to a child geographical region. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'namedPlaceCorrelation', + 'placeConvergence', + 'Place Convergence', + 'logical', + 'no', + 'varchar (20)', + 'n/a', + 'n/a', + 'closed', + 'n/a', + 'This is the descriptive attribute that is used to relate the congruence between two places, Parent [convergence value] child (generally greater than).', + + ' namedPlaceCorrelation Named Place Correlation placeConvergence Place Convergence logical required varchar (20) n/a n/a closed n/a This is the descriptive attribute that is used to relate the congruence between two places, Parent [convergence value] child (generally greater than). equal The two places are exactly the same. greater than The parent place fully contains the child place, and also includes additional space. less than The parent place is fully included in the child place, but the child place contains additional space. not equal The two places are not exactly the same. This leaves the possibilities that the parent place is greater than, less than, overlapping, similar, or disjunct relative to the child place. overlapping The two places contain at least some common area, and each place also contains at least some area that the other does not contain. Neither place is fully contained in the other. similar The two places contain at least some common area. disjunct The two places in question contain no common area. undetermined Although some correlation is likely, the correlation has not been determined. ' + + ); + + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'namedPlaceCorrelation', + 'placeConvergence', + 'equal', + 'The two places are exactly the same.', + '1' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'namedPlaceCorrelation', + 'placeConvergence', + 'greater than', + 'The parent place fully contains the child place, and also includes additional space.', + '2' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'namedPlaceCorrelation', + 'placeConvergence', + 'less than', + 'The parent place is fully included in the child place, but the child place contains additional space.', + '3' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'namedPlaceCorrelation', + 'placeConvergence', + 'not equal', + 'The two places are not exactly the same. This leaves the possibilities that the parent place is greater than, less than, overlapping, similar, or disjunct relative to the child place.', + '4' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'namedPlaceCorrelation', + 'placeConvergence', + 'overlapping', + 'The two places contain at least some common area, and each place also contains at least some area that the other does not contain. Neither place is fully contained in the other.', + '5' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'namedPlaceCorrelation', + 'placeConvergence', + 'similar', + 'The two places contain at least some common area.', + '6' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'namedPlaceCorrelation', + 'placeConvergence', + 'disjunct', + 'The two places in question contain no common area.', + '7' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'namedPlaceCorrelation', + 'placeConvergence', + 'undetermined', + 'Although some correlation is likely, the correlation has not been determined.', + '8' + ); + + INSERT INTO dba_tableDescription ( tableName , tableLabel , tableNotes , tableDescription , tableKeywords ) values ( + 'note', + 'Note', + 'This table is where notations associated with table records are stored', + 'All notes associated with plots and plot observations are stored in this table. These notes can be linked to any table, record and attribute via the noteLink table.', + ' note Note This table is where notations associated with table records are stored All notes associated with plots and plot observations are stored in this table. These notes can be linked to any table, record and attribute via the noteLink table. NOTE_ID ID NOTELINK_ID Note Link PARTY_ID Party ROLE_ID Role noteDate Note Date noteType Note Type noteText Note Text accessionCode Accession Code ' + ); + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'note', + 'NOTE_ID', + 'ID', + 'logical', + 'yes', + 'serial', + 'PK', + 'n/a', + 'no', + 'Primary key for the note table', + 'Database generated identifier assigned to each unique note.', + + ' note Note NOTE_ID ID logical serial PK n/a no Primary key for the note table Database generated identifier assigned to each unique note. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'note', + 'NOTELINK_ID', + 'Note Link', + 'logical', + 'no', + 'Integer', + 'FK', + 'noteLink.NOTELINK_ID', + 'no', + 'Foreign key into the notelink table', + 'Link to the noteLink table via which a note is associated with a table, record and attribute.', + + ' note Note NOTELINK_ID Note Link logical required Integer FK noteLink.NOTELINK_ID no Foreign key into the notelink table Link to the noteLink table via which a note is associated with a table, record and attribute. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'note', + 'PARTY_ID', + 'Party', + 'logical', + 'no', + 'Integer', + 'FK', + 'party.PARTY_ID', + 'no', + 'Foreign key into the party table', + 'Link to the party table to identify the party that contributed the note.', + + ' note Note PARTY_ID Party logical required Integer FK party.PARTY_ID no Foreign key into the party table Link to the party table to identify the party that contributed the note. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'note', + 'ROLE_ID', + 'Role', + 'logical', + 'no', + 'Integer', + 'FK', + 'aux_Role.ROLE_ID', + 'no', + 'Foreign key into the aux_role table', + 'What role was the party playing when the note was applied?', + + ' note Note ROLE_ID Role logical required Integer FK aux_Role.ROLE_ID no Foreign key into the aux_role table What role was the party playing when the note was applied? ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'note', + 'noteDate', + 'Note Date', + 'logical', + 'yes', + 'Date', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'The date on which the note was stored in the database.', + + ' note Note noteDate Note Date logical Date n/a n/a no n/a The date on which the note was stored in the database. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'note', + 'noteType', + 'Note Type', + 'logical', + 'no', + 'varchar (20)', + 'n/a', + 'n/a', + 'closed', + 'closed list', + 'The type of note: Database Management, Observation Author, Database User and Internal. "Database Management" notes are those added by the management team and may be queried and viewed by the public. "Database Use" notes are those entered by the users of the database and are publicly viewable. "Internal" notes are for management to use internally and will not be broadcast.', + + ' note Note noteType Note Type logical required varchar (20) n/a n/a closed closed list The type of note: Database Management, Observation Author, Database User and Internal. "Database Management" notes are those added by the management team and may be queried and viewed by the public. "Database Use" notes are those entered by the users of the database and are publicly viewable. "Internal" notes are for management to use internally and will not be broadcast. Clarification Correction Internal Warning ' + + ); + + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'note', + 'noteType', + 'Clarification', + null, + '0' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'note', + 'noteType', + 'Correction', + null, + '0' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'note', + 'noteType', + 'Internal', + null, + '0' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'note', + 'noteType', + 'Warning', + null, + '0' + ); + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'note', + 'noteText', + 'Note Text', + 'logical', + 'no', + 'text', + 'n/a', + 'n/a', + 'no', + 'actual note text', + 'The text of the note.', + + ' note Note noteText Note Text logical required text n/a n/a no actual note text The text of the note. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'note', + 'accessionCode', + 'Accession Code', + 'logical', + 'yes', + 'varchar (255)', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'Code that uniquely references this record, allowing reference to this record for this version of this database. Better than a primary key, which is automatically generated by a database and not globally unique. VegBank Accession codes are only generated by VegBank, and therefore data integrity can be guaranteed, unlike with a primary key (number).', + + ' note Note accessionCode Accession Code logical varchar (255) n/a n/a no n/a Code that uniquely references this record, allowing reference to this record for this version of this database. Better than a primary key, which is automatically generated by a database and not globally unique. VegBank Accession codes are only generated by VegBank, and therefore data integrity can be guaranteed, unlike with a primary key (number). ' + + ); + + + INSERT INTO dba_tableDescription ( tableName , tableLabel , tableNotes , tableDescription , tableKeywords ) values ( + 'noteLink', + 'Note Link', + 'This table links a note made by a database user or manager to a specific table, record and attribute in the database.', + 'This table was developed with the goal of keeping all the notes associated with the plots in a single table rather than distributed in many tables across the database.', + ' noteLink Note Link This table links a note made by a database user or manager to a specific table, record and attribute in the database. This table was developed with the goal of keeping all the notes associated with the plots in a single table rather than distributed in many tables across the database. NOTELINK_ID ID tableName Table Name attributeName Attribute Name tableRecord Table Record ' + ); + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'noteLink', + 'NOTELINK_ID', + 'ID', + 'logical', + 'yes', + 'serial', + 'PK', + 'n/a', + 'no', + 'Primary key for the noteLink table', + 'Database generated identifier assigned to each unique noteLink.', + + ' noteLink Note Link NOTELINK_ID ID logical serial PK n/a no Primary key for the noteLink table Database generated identifier assigned to each unique noteLink. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'noteLink', + 'tableName', + 'Table Name', + 'logical', + 'no', + 'varchar (50)', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'Name of the table that the note is associated with.', + + ' noteLink Note Link tableName Table Name logical required varchar (50) n/a n/a no n/a Name of the table that the note is associated with. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'noteLink', + 'attributeName', + 'Attribute Name', + 'logical', + 'yes', + 'varchar (50)', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'Name of the attribute in the table (stored in tableName) that the note is associated with.', + + ' noteLink Note Link attributeName Attribute Name logical varchar (50) n/a n/a no n/a Name of the attribute in the table (stored in tableName) that the note is associated with. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'noteLink', + 'tableRecord', + 'Table Record', + 'logical', + 'no', + 'Integer', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'The record number (row) containing the value with which the note is associated (which translates to the primary key value for the table wherein the record is stored).', + + ' noteLink Note Link tableRecord Table Record logical required Integer n/a n/a no n/a The record number (row) containing the value with which the note is associated (which translates to the primary key value for the table wherein the record is stored). ' + + ); + + + INSERT INTO dba_tableDescription ( tableName , tableLabel , tableNotes , tableDescription , tableKeywords ) values ( + 'observation', + 'Observation', + 'This table stores plot observation results that might vary between official observation events.', + 'Observation is a child of plot in recognition of the fact that a plot may be re-sampled and that some of the environmental conditions may change between resampling events. ', + ' observation Observation This table stores plot observation results that might vary between official observation events. Observation is a child of plot in recognition of the fact that a plot may be re-sampled and that some of the environmental conditions may change between resampling events. OBSERVATION_ID OBSERVATION ID PREVIOUSOBS_ID Previous Observation PLOT_ID Plot PROJECT_ID Project authorObsCode Author Observation Code obsStartDate Observation Start Date obsEndDate Observation End Date dateAccuracy Date Accuracy dateEntered Date Entered into VegBank COVERMETHOD_ID Cover Method coverDispersion Cover Dispersion autoTaxonCover Overall Taxon Cover Values are Automatically Calculated? STRATUMMETHOD_ID Stratum Method methodNarrative Method Narrative taxonObservationArea Taxon Observation Area stemSizeLimit Stem Size Limit stemObservationArea Stem Observation Area stemSampleMethod Stem Sample Method originalData Original Data Location effortLevel Effort Level plotValidationLevel Plot Validation Level floristicQuality Floristic Quality bryophyteQuality Bryophyte Quality lichenQuality Lichen Quality observationNarrative Observation Narrative landscapeNarrative Landscape Narrative homogeneity Homogeneity phenologicAspect Phenologic Aspect representativeness Representativeness standMaturity Stand Maturity successionalStatus Successional Status numberOfTaxa Number of Taxa basalArea Basal Area hydrologicRegime Hydrologic Regime soilMoistureRegime Soil Moisture Regime soilDrainage Soil Drainage waterSalinity Water Salinity waterDepth Water Depth shoreDistance Shore Distance soilDepth Soil Depth organicDepth Organic Depth SOILTAXON_ID Soil Taxon soilTaxonSrc Soil Taxon Source percentBedRock Percent Bedrock percentRockGravel Percent Rock / Gravel percentWood Percent Wood percentLitter Percent Litter percentBareSoil Percent Bare Soil percentWater Percent Water percentOther Percent Other nameOther Name Other treeHt Tree Height shrubHt Shrub Height fieldHt Field Height nonvascularHt Nonvascular Height submergedHt Submerged Height treeCover Tree Cover shrubCover Shrub Cover fieldCover Field Cover nonvascularCover Nonvascular Cover floatingCover Floating Cover submergedCover Submerged Cover dominantStratum Dominant Stratum growthform1Type Growthform1 Type growthform2Type Growthform2 Type growthform3Type Growthform3 Type growthform1Cover Growthform1 Cover growthform2Cover Growthform2 Cover growthform3Cover Growthform3 Cover totalCover Total Cover accessionCode Observation Accession Code notesPublic Notes Public notesMgt Notes Mgt revisions Revisions emb_observation this row embargoed. interp_orig_ci_ID Original commInterpret ID interp_orig_cc_ID CommConcept_ID interp_orig_sciname Scientific Name of Community. interp_orig_code CEGL-type code of Community. interp_orig_party_id Party_ID of classifier. interp_orig_partyname Classifier. interp_current_ci_ID Most Recent Classification commInterp ID interp_current_cc_ID CommConcept_ID interp_current_sciname Scientific Name of Community. interp_current_code CEGL-type code of Community. interp_current_party_id Party_ID of classifier. interp_current_partyname Classifier. interp_bestfit_ci_ID Best Fit commInterp ID interp_bestfit_cc_ID CommConcept_ID interp_bestfit_sciname Scientific Name of Community. interp_bestfit_code CEGL-type code of Community. interp_bestfit_party_id Party_ID of classifier. interp_bestfit_partyname Classifier. topTaxon1Name Top Taxon #1 topTaxon2Name Top Taxon #2 topTaxon3Name Top Taxon #3 topTaxon4Name Top Taxon #4 topTaxon5Name Top Taxon #5 hasObservationSynonym Has Synonym Observation ' + ); + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'observation', + 'OBSERVATION_ID', + 'OBSERVATION ID', + 'logical', + 'yes', + 'serial', + 'PK', + 'n/a', + 'no', + 'Primary key for the observation table', + 'Database generated identifier assigned to each unique plot observation.', + + ' observation Observation OBSERVATION_ID OBSERVATION ID logical serial PK n/a no Primary key for the observation table Database generated identifier assigned to each unique plot observation. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'observation', + 'PREVIOUSOBS_ID', + 'Previous Observation', + 'logical', + 'yes', + 'Integer', + 'FK', + 'observation.OBSERVATION_ID', + 'no', + 'Recursive foreign key', + 'Link to data from the previous observation of this plot.', + + ' observation Observation PREVIOUSOBS_ID Previous Observation logical Integer FK observation.OBSERVATION_ID no Recursive foreign key Link to data from the previous observation of this plot. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'observation', + 'PLOT_ID', + 'Plot', + 'logical', + 'no', + 'Integer', + 'FK', + 'plot.PLOT_ID', + 'no', + 'Foreign key into the plot table.', + 'Link to data and metadata that do not change between observations and which are stored in the plot table.', + + ' observation Observation PLOT_ID Plot logical required Integer FK plot.PLOT_ID no Foreign key into the plot table. Link to data and metadata that do not change between observations and which are stored in the plot table. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'observation', + 'PROJECT_ID', + 'Project', + 'logical', + 'yes', + 'Integer', + 'FK', + 'project.PROJECT_ID', + 'no', + 'Foreign key into the project table.', + 'Link between an observation and the project within which the observation was made', + + ' observation Observation PROJECT_ID Project logical Integer FK project.PROJECT_ID no Foreign key into the project table. Link between an observation and the project within which the observation was made ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'observation', + 'authorObsCode', + 'Author Observation Code', + 'logical', + 'yes', + 'varchar (30)', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'This is the code or name that the author uses to identify this plot observation event. Where a plot has only one observation, this will often equal plot.authorPlotCode.', + + ' observation Observation authorObsCode Author Observation Code logical varchar (30) n/a n/a no n/a This is the code or name that the author uses to identify this plot observation event. Where a plot has only one observation, this will often equal plot.authorPlotCode. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'observation', + 'obsStartDate', + 'Observation Start Date', + 'logical', + 'yes', + 'Date', + 'n/a', + 'n/a', + 'no', + 'default = current year', + 'The date of the observation, or the first day if the observation spanned more than one day.', + + ' observation Observation obsStartDate Observation Start Date logical Date n/a n/a no default = current year The date of the observation, or the first day if the observation spanned more than one day. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'observation', + 'obsEndDate', + 'Observation End Date', + 'logical', + 'yes', + 'Date', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'If the observation event spanned more than a single day, this is the last day on which observations were made.', + + ' observation Observation obsEndDate Observation End Date logical Date n/a n/a no n/a If the observation event spanned more than a single day, this is the last day on which observations were made. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'observation', + 'dateAccuracy', + 'Date Accuracy', + 'logical', + 'yes', + 'varchar (30)', + 'n/a', + 'n/a', + 'closed', + 'closed list', + 'Estimated accuracy of the observation date.', + + ' observation Observation dateAccuracy Date Accuracy logical varchar (30) n/a n/a closed closed list Estimated accuracy of the observation date. Exact The exact date of the observation - within one day. One week One month Within one month of the observation. Three months One year Three years Ten years Greater than ten years ' + + ); + + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'observation', + 'dateAccuracy', + 'Exact', + 'The exact date of the observation - within one day.', + '1' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'observation', + 'dateAccuracy', + 'One week', + null, + '2' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'observation', + 'dateAccuracy', + 'One month', + 'Within one month of the observation.', + '3' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'observation', + 'dateAccuracy', + 'Three months', + null, + '4' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'observation', + 'dateAccuracy', + 'One year', + null, + '5' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'observation', + 'dateAccuracy', + 'Three years', + null, + '6' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'observation', + 'dateAccuracy', + 'Ten years', + null, + '7' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'observation', + 'dateAccuracy', + 'Greater than ten years', + null, + '8' + ); + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'observation', + 'dateEntered', + 'Date Entered into VegBank', + 'logical', + 'yes', + 'Date', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'Date that the observation was added to VegBank', + + ' observation Observation dateEntered Date Entered into VegBank logical Date n/a n/a no n/a Date that the observation was added to VegBank ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'observation', + 'COVERMETHOD_ID', + 'Cover Method', + 'logical', + 'yes', + 'Integer', + 'FK', + 'coverMethod.COVERMETHOD_ID', + 'no', + 'Foreign key into the coverMethod table.', + 'Link to the scale used to estimate taxon cover. The database stores estimated cover to the nearest percent, but the conversion details are recovered by reference to the specific scale employed.', + + ' observation Observation COVERMETHOD_ID Cover Method logical Integer FK coverMethod.COVERMETHOD_ID no Foreign key into the coverMethod table. Link to the scale used to estimate taxon cover. The database stores estimated cover to the nearest percent, but the conversion details are recovered by reference to the specific scale employed. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'observation', + 'coverDispersion', + 'Cover Dispersion', + 'logical', + 'yes', + 'varchar (30)', + 'n/a', + 'n/a', + 'closed', + 'closed list; default = Entire', + 'Were cover values for the total taxon list collected from one contiguous area or dispersed subplots?', + + ' observation Observation coverDispersion Cover Dispersion logical varchar (30) n/a n/a closed closed list; default = Entire Were cover values for the total taxon list collected from one contiguous area or dispersed subplots? Entire Cover based on observation of an entire plot consisting of a single contiguous area of land. subplot-random Cover based on observation of multiple randomly dispersed subplots within the overall plot. subplot-regular Cover based on observation of multiple subplots arranged in a regular pattern within the overall plot. subplot-haphazard Cover based on observation of multiple subplots haphazardly arranged within the overall plot. subplot-contiguous Cover based on observation of a single contiguous area of land of less spatial extent than the entire plot. line-intercept Cover based on length of line touching each species present. point-intercept Cover based on number of points for each species present. ' + + ); + + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'observation', + 'coverDispersion', + 'Entire', + 'Cover based on observation of an entire plot consisting of a single contiguous area of land.', + '1' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'observation', + 'coverDispersion', + 'subplot-contiguous', + 'Cover based on observation of a single contiguous area of land of less spatial extent than the entire plot.', + '2' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'observation', + 'coverDispersion', + 'subplot-regular', + 'Cover based on observation of multiple subplots arranged in a regular pattern within the overall plot.', + '3' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'observation', + 'coverDispersion', + 'subplot-random', + 'Cover based on observation of multiple randomly dispersed subplots within the overall plot.', + '4' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'observation', + 'coverDispersion', + 'subplot-haphazard', + 'Cover based on observation of multiple subplots haphazardly arranged within the overall plot.', + '5' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'observation', + 'coverDispersion', + 'line-intercept', + 'Cover based on length of line touching each species present.', + '6' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'observation', + 'coverDispersion', + 'point-intercept', + 'Cover based on number of points for each species present.', + '7' + ); + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'observation', + 'autoTaxonCover', + 'Overall Taxon Cover Values are Automatically Calculated?', + 'logical', + 'yes', + 'Boolean', + 'n/a', + 'n/a', + 'no', + 'default = FALSE', + 'TRUE indicates that taxonObservation.taxonCover was automatically calculated from the values of all stratumObservation.taxonStratumCover', + + ' observation Observation autoTaxonCover Overall Taxon Cover Values are Automatically Calculated? logical Boolean n/a n/a no default = FALSE TRUE indicates that taxonObservation.taxonCover was automatically calculated from the values of all stratumObservation.taxonStratumCover ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'observation', + 'STRATUMMETHOD_ID', + 'Stratum Method', + 'logical', + 'yes', + 'Integer', + 'FK', + 'stratumMethod.STRATUMMETHOD_ID', + 'no', + 'Foreign key into the stratumMethod table', + 'Link to the definitions of strata used in recording taxon-specific values of cover.', + + ' observation Observation STRATUMMETHOD_ID Stratum Method logical Integer FK stratumMethod.STRATUMMETHOD_ID no Foreign key into the stratumMethod table Link to the definitions of strata used in recording taxon-specific values of cover. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'observation', + 'methodNarrative', + 'Method Narrative', + 'logical', + 'yes', + 'text', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'Additional metadata helpful for understanding how the data were collected during the observation event.', + + ' observation Observation methodNarrative Method Narrative logical text n/a n/a no n/a Additional metadata helpful for understanding how the data were collected during the observation event. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'observation', + 'taxonObservationArea', + 'Taxon Observation Area', + 'logical', + 'yes', + 'Float', + 'n/a', + 'n/a', + 'no', + 'default = plot.area', + 'the total surface area (in m^2) used for cover estimates and for which a complete species list is provided. If subplots were used, this would be the total area of the subplots without interstitial space. RESERVED VALUE: -1 is used to indicate the complete list of species had no known boundaries.', + + ' observation Observation taxonObservationArea Taxon Observation Area logical Float n/a n/a no default = plot.area the total surface area (in m^2) used for cover estimates and for which a complete species list is provided. If subplots were used, this would be the total area of the subplots without interstitial space. RESERVED VALUE: -1 is used to indicate the complete list of species had no known boundaries. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'observation', + 'stemSizeLimit', + 'Stem Size Limit', + 'logical', + 'yes', + 'Float', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'Lower diameter limit in centimeters for inclusion of a tree in the stem count (stemCount).', + + ' observation Observation stemSizeLimit Stem Size Limit logical Float n/a n/a no n/a Lower diameter limit in centimeters for inclusion of a tree in the stem count (stemCount). ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'observation', + 'stemObservationArea', + 'Stem Observation Area', + 'logical', + 'yes', + 'Float', + 'n/a', + 'n/a', + 'no', + 'default = plot.area', + 'the total surface area (in m^2) observed for recording woody stem data. RESERVED VALUE: -1 means no known area.', + + ' observation Observation stemObservationArea Stem Observation Area logical Float n/a n/a no default = plot.area the total surface area (in m^2) observed for recording woody stem data. RESERVED VALUE: -1 means no known area. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'observation', + 'stemSampleMethod', + 'Stem Sample Method', + 'logical', + 'yes', + 'varchar (30)', + 'n/a', + 'n/a', + 'closed', + 'closed list; default = full census', + 'The method used to obtain basal area or tree stem data (e.g., full census, point quarter, random pairs, Bitterlich, other).', + + ' observation Observation stemSampleMethod Stem Sample Method logical varchar (30) n/a n/a closed closed list; default = full census The method used to obtain basal area or tree stem data (e.g., full census, point quarter, random pairs, Bitterlich, other). Bitterlich Full census Other Point quarter Random pairs Subsample census ' + + ); + + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'observation', + 'stemSampleMethod', + 'Full census', + null, + '1' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'observation', + 'stemSampleMethod', + 'Point quarter', + null, + '2' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'observation', + 'stemSampleMethod', + 'Random pairs', + null, + '3' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'observation', + 'stemSampleMethod', + 'Bitterlich', + null, + '4' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'observation', + 'stemSampleMethod', + 'Other', + null, + '5' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'observation', + 'stemSampleMethod', + 'Subsample census', + null, + '6' + ); + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'observation', + 'originalData', + 'Original Data Location', + 'logical', + 'yes', + 'text', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'Location where the hard data reside and any access instructions.', + + ' observation Observation originalData Original Data Location logical text n/a n/a no n/a Location where the hard data reside and any access instructions. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'observation', + 'effortLevel', + 'Effort Level', + 'logical', + 'yes', + 'varchar (30)', + 'n/a', + 'n/a', + 'closed', + 'closed list', + 'This is the effort spent making the observations as estimated by the party that submitted the data (e.g., Very thorough, Average, Hurried description).', + + ' observation Observation effortLevel Effort Level logical varchar (30) n/a n/a closed closed list This is the effort spent making the observations as estimated by the party that submitted the data (e.g., Very thorough, Average, Hurried description). Accurate Hurried or incomplete Very thorough ' + + ); + + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'observation', + 'effortLevel', + 'Very thorough', + null, + '1' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'observation', + 'effortLevel', + 'Accurate', + null, + '2' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'observation', + 'effortLevel', + 'Hurried or incomplete', + null, + '3' + ); + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'observation', + 'plotValidationLevel', + 'Plot Validation Level', + 'logical', + 'yes', + 'Integer', + 'n/a', + 'n/a', + 'closed', + 'closed list', + 'Quality of plot as determined by an automated filter system, including values such as (1) sufficient for determining type occurrence, (2) sufficient for inclusion in a classification revision, and (3) fully compliant with recommendations.', + + ' observation Observation plotValidationLevel Plot Validation Level logical Integer n/a n/a closed closed list Quality of plot as determined by an automated filter system, including values such as (1) sufficient for determining type occurrence, (2) sufficient for inclusion in a classification revision, and (3) fully compliant with recommendations. -1 observation has not yet been fully rectified by user and is not complete. 1 sufficient for determining type occurrence 2 sufficient for inclusion in a classification revision 3 sufficient for classification and meets best practices ' + + ); + + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'observation', + 'plotValidationLevel', + '-1', + 'observation has not yet been fully rectified by user and is not complete.', + '-1' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'observation', + 'plotValidationLevel', + '1', + 'sufficient for determining type occurrence', + '1' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'observation', + 'plotValidationLevel', + '2', + 'sufficient for inclusion in a classification revision', + '2' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'observation', + 'plotValidationLevel', + '3', + 'sufficient for classification and meets best practices', + '3' + ); + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'observation', + 'floristicQuality', + 'Floristic Quality', + 'logical', + 'yes', + 'varchar (30)', + 'n/a', + 'n/a', + 'closed', + 'closed list', + 'Subjective assessment of floristic quality by the party that submitted the plot (e.g., Highest, High, High but incomplete, Moderate, Moderate and incomplete, Low).', + + ' observation Observation floristicQuality Floristic Quality logical varchar (30) n/a n/a closed closed list Subjective assessment of floristic quality by the party that submitted the plot (e.g., Highest, High, High but incomplete, Moderate, Moderate and incomplete, Low). High between 85% and 95% of all taxa were identified to species level; search was thorough. High but incomplete at least 85% of all taxa were identified to species level; search was not so thorough. Highest at least 95% of all taxa were identified to species level; search was thorough. Low less than 70% of all taxa were identified to species level. Moderate between 70% and 85% of all taxa were identified to species level; search was thorough. Moderate but incomplete between 70% and 85% of all taxa were identified to species level; search was not so thorough. ' + + ); + + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'observation', + 'floristicQuality', + 'Highest', + 'at least 95% of all taxa were identified to species level; search was thorough.', + '1' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'observation', + 'floristicQuality', + 'High', + 'between 85% and 95% of all taxa were identified to species level; search was thorough.', + '2' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'observation', + 'floristicQuality', + 'High but incomplete', + 'at least 85% of all taxa were identified to species level; search was not so thorough.', + '3' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'observation', + 'floristicQuality', + 'Moderate', + 'between 70% and 85% of all taxa were identified to species level; search was thorough.', + '4' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'observation', + 'floristicQuality', + 'Moderate but incomplete', + 'between 70% and 85% of all taxa were identified to species level; search was not so thorough.', + '5' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'observation', + 'floristicQuality', + 'Low', + 'less than 70% of all taxa were identified to species level.', + '6' + ); + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'observation', + 'bryophyteQuality', + 'Bryophyte Quality', + 'logical', + 'yes', + 'varchar (30)', + 'n/a', + 'n/a', + 'closed', + 'closed list', + 'Subjective assessment of the taxonomic quality of the bryophyte data by the party that submitted the plot (e.g., Highest, High, High but incomplete, Moderate, Moderate and incomplete, Low, Very incomplete, absent).', + + ' observation Observation bryophyteQuality Bryophyte Quality logical varchar (30) n/a n/a closed closed list Subjective assessment of the taxonomic quality of the bryophyte data by the party that submitted the plot (e.g., Highest, High, High but incomplete, Moderate, Moderate and incomplete, Low, Very incomplete, absent). High High but incomplete Highest Low Moderate Moderate but incomplete Not examined Very incomplete ' + + ); + + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'observation', + 'bryophyteQuality', + 'Highest', + null, + '1' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'observation', + 'bryophyteQuality', + 'High', + null, + '2' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'observation', + 'bryophyteQuality', + 'High but incomplete', + null, + '3' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'observation', + 'bryophyteQuality', + 'Moderate', + null, + '4' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'observation', + 'bryophyteQuality', + 'Moderate but incomplete', + null, + '5' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'observation', + 'bryophyteQuality', + 'Low', + null, + '6' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'observation', + 'bryophyteQuality', + 'Very incomplete', + null, + '7' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'observation', + 'bryophyteQuality', + 'Not examined', + null, + '8' + ); + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'observation', + 'lichenQuality', + 'Lichen Quality', + 'logical', + 'yes', + 'varchar (30)', + 'n/a', + 'n/a', + 'closed', + 'closed list', + 'Subjective assessment of the taxonomic quality of the lichen data by the party that submitted the plot (e.g., Highest, High, High but incomplete, Moderate, Moderate and incomplete, Low, Very incomplete, absent).', + + ' observation Observation lichenQuality Lichen Quality logical varchar (30) n/a n/a closed closed list Subjective assessment of the taxonomic quality of the lichen data by the party that submitted the plot (e.g., Highest, High, High but incomplete, Moderate, Moderate and incomplete, Low, Very incomplete, absent). High High but incomplete Highest Low Moderate Moderate but incomplete Not examined Very incomplete ' + + ); + + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'observation', + 'lichenQuality', + 'Highest', + null, + '1' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'observation', + 'lichenQuality', + 'High', + null, + '2' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'observation', + 'lichenQuality', + 'High but incomplete', + null, + '3' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'observation', + 'lichenQuality', + 'Moderate', + null, + '4' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'observation', + 'lichenQuality', + 'Moderate but incomplete', + null, + '5' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'observation', + 'lichenQuality', + 'Low', + null, + '6' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'observation', + 'lichenQuality', + 'Very incomplete', + null, + '7' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'observation', + 'lichenQuality', + 'Not examined', + null, + '8' + ); + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'observation', + 'observationNarrative', + 'Observation Narrative', + 'logical', + 'yes', + 'text', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'Additional unstructured observations useful for understanding the ecological attributes and significance of the plot observations.', + + ' observation Observation observationNarrative Observation Narrative logical text n/a n/a no n/a Additional unstructured observations useful for understanding the ecological attributes and significance of the plot observations. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'observation', + 'landscapeNarrative', + 'Landscape Narrative', + 'logical', + 'yes', + 'text', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'Unstructured observations on the landscape context of the observed plot.', + + ' observation Observation landscapeNarrative Landscape Narrative logical text n/a n/a no n/a Unstructured observations on the landscape context of the observed plot. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'observation', + 'homogeneity', + 'Homogeneity', + 'logical', + 'yes', + 'varchar (50)', + 'n/a', + 'n/a', + 'closed', + 'closed list', + 'How homogeneous was the community (e.g., homogeneous, compositional trend across plot, conspicuous inclusions, irregular mosaic or pattern).', + + ' observation Observation homogeneity Homogeneity logical varchar (50) n/a n/a closed closed list How homogeneous was the community (e.g., homogeneous, compositional trend across plot, conspicuous inclusions, irregular mosaic or pattern). compositional trend across plot conspicuous inclusions homogeneous irregular or pattern mosaic ' + + ); + + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'observation', + 'homogeneity', + 'homogeneous', + null, + '1' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'observation', + 'homogeneity', + 'compositional trend across plot', + null, + '2' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'observation', + 'homogeneity', + 'conspicuous inclusions', + null, + '3' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'observation', + 'homogeneity', + 'irregular or pattern mosaic', + null, + '4' + ); + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'observation', + 'phenologicAspect', + 'Phenologic Aspect', + 'logical', + 'yes', + 'varchar (30)', + 'n/a', + 'n/a', + 'closed', + 'closed list', + 'Season expression of the community (e.g., typical growing season, vernal, aestival, wet, autumnal, winter, dry, irregular ephemerals present).', + + ' observation Observation phenologicAspect Phenologic Aspect logical varchar (30) n/a n/a closed closed list Season expression of the community (e.g., typical growing season, vernal, aestival, wet, autumnal, winter, dry, irregular ephemerals present). aestival autumnal dry season early wet season irregular ephemeral phase late wet season typical growing season vernal wet season winter ' + + ); + + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'observation', + 'phenologicAspect', + 'typical growing season', + null, + '1' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'observation', + 'phenologicAspect', + 'vernal', + null, + '2' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'observation', + 'phenologicAspect', + 'early wet season', + null, + '3' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'observation', + 'phenologicAspect', + 'aestival', + null, + '4' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'observation', + 'phenologicAspect', + 'wet season', + null, + '5' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'observation', + 'phenologicAspect', + 'autumnal', + null, + '6' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'observation', + 'phenologicAspect', + 'late wet season', + null, + '7' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'observation', + 'phenologicAspect', + 'winter', + null, + '8' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'observation', + 'phenologicAspect', + 'dry season', + null, + '9' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'observation', + 'phenologicAspect', + 'irregular ephemeral phase', + null, + '10' + ); + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'observation', + 'representativeness', + 'Representativeness', + 'logical', + 'yes', + 'varchar (255)', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'How representative was the plot of the stand?', + + ' observation Observation representativeness Representativeness logical varchar (255) n/a n/a no n/a How representative was the plot of the stand? ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'observation', + 'standMaturity', + 'Stand Maturity', + 'logical', + 'yes', + 'varchar (50)', + 'n/a', + 'n/a', + 'closed', + 'closed list', + 'How mature is the stand. Could be young, mature but even-aged, old-growth, etc.', + + ' observation Observation standMaturity Stand Maturity logical varchar (50) n/a n/a closed closed list How mature is the stand. Could be young, mature but even-aged, old-growth, etc. Even-age, aggrading Mature, even-age Oldgrowth, all-age Transition, breakup Young, regenerative Uneven-age Ages of individuals are uneven so that this community does not fit neatly into the succession model. ' + + ); + + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'observation', + 'standMaturity', + 'Young, regenerative', + null, + '1' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'observation', + 'standMaturity', + 'Even-age, aggrading', + null, + '2' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'observation', + 'standMaturity', + 'Mature, even-age', + null, + '3' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'observation', + 'standMaturity', + 'Transition, breakup', + null, + '4' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'observation', + 'standMaturity', + 'Oldgrowth, all-age', + null, + '5' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'observation', + 'standMaturity', + 'Uneven-age', + 'Ages of individuals are uneven so that this community does not fit neatly into the succession model.', + '6' + ); + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'observation', + 'successionalStatus', + 'Successional Status', + 'logical', + 'yes', + 'text', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'Description of the assumed successional status of the plot. This description is of necessity highly subjective.', + + ' observation Observation successionalStatus Successional Status logical text n/a n/a no n/a Description of the assumed successional status of the plot. This description is of necessity highly subjective. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'observation', + 'numberOfTaxa', + 'Number of Taxa', + 'logical', + 'yes', + 'Integer', + 'n/a', + 'n/a', + 'no', + 'default could be count of taxonObservations', + 'The number of taxa found on the plot, within the taxonObservationArea. Any species known to be found only outside of the taxonObservationArea would not be included in this number. Use 0 for this field to indicate that no taxa were found within the plot bounds.', + + ' observation Observation numberOfTaxa Number of Taxa logical Integer n/a n/a no default could be count of taxonObservations The number of taxa found on the plot, within the taxonObservationArea. Any species known to be found only outside of the taxonObservationArea would not be included in this number. Use 0 for this field to indicate that no taxa were found within the plot bounds. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'observation', + 'basalArea', + 'Basal Area', + 'logical', + 'yes', + 'Float', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'Total basal area of woody stems (in m²/ha). 0 should be used to indicate that plots have no stems.', + + ' observation Observation basalArea Basal Area logical Float n/a n/a no n/a Total basal area of woody stems (in m²/ha). 0 should be used to indicate that plots have no stems. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'observation', + 'hydrologicRegime', + 'Hydrologic Regime', + 'logical', + 'yes', + 'varchar (30)', + 'n/a', + 'n/a', + 'closed', + 'closed list', + 'What is the hydrologic regime, which is a reflection of frequency and duration of flooding? List is taken from Cowardin et al. 1979, 1985.', + + ' observation Observation hydrologicRegime Hydrologic Regime logical varchar (30) n/a n/a closed closed list What is the hydrologic regime, which is a reflection of frequency and duration of flooding? List is taken from Cowardin et al. 1979, 1985. Intermittently flooded Substrate is usually exposed, but surface water can be present for variable periods without detectable seasonal periodicity. Inundation is not predictable to a given season and is dependent upon highly localized rain storms. This modifier was developed for use in the arid West for water regimes of Playa lakes, intermittent streams, and dry washes but can be used in other parts of the U.S. where appropriate. This modifier can be applied to both wetland and non-wetland situations. Equivalent to Cowardin''s Intermittently Flooded modifier. Permanently flooded Water covers the land surface at all times of the year in all years. Equivalent to Cowardin''s "permanently flooded". Permanently flooded - tidal Salt water covers the land surface at all times of the year in all years. This modifier applies only to permanently flooded area irregularly flooded by fresh tidal water. Equivalent to Cowardin''s "permanently flooded/tidal". Saturated Surface water is seldom present, but substrate is saturated to surface for extended periods during the growing season. Equivalent to Cowardin''s Saturated modifier. Seasonally flooded Surface water is present for extended periods during the growing season, but is absent by the end of the growing season in most years. The water table after flooding ceases is very variable, extending from saturated to a water table well below the ground surface. Includes Cowardin''s Seasonal, Seasonal-Saturated, and Seasonal-Well Drained modifiers. Seasonally saturated Semipermanently flooded Surface water persists throughout the growing season in most years. Land surface is normally saturated when water level drops below soil surface. Includes Cowardin''s Intermittently Exposed and Semipermanently Flooded modifiers. Temporarily flooded Surface water present for brief periods during growing season, but water table usually lies well below soil surface. Often characterizes flood-plain wetlands. Equivalent to Cowardin''s Temporary modifier. Tidally flooded Flooded by the alternate rise and fall of the surface of oceans, seas, and the bays, rivers, etc. connected to them, caused by the attraction of the moon and sun. Unknown Upland Not a wetland. Very rarely flooded. Irregularly flooded Tidal water floods land surface less often than daily; the area must be flooded by tides at least once yearly as a result of extreme high spring tide plus wind plus flow. Irregularly exposed Land surface is exposed by tides less often than daily; the area from mean low tide to extreme low spring tide. Wind-tidally flooded Flooded by the alternate rise and fall of the surface of oceans, seas, and the bays, rivers, etc. connected to them, caused by the back-up of water caused by unfavorable winds. ' + + ); + + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'observation', + 'hydrologicRegime', + 'Semipermanently flooded', + 'Surface water persists throughout the growing season in most years. Land surface is normally saturated when water level drops below soil surface. Includes Cowardin''s Intermittently Exposed and Semipermanently Flooded modifiers.', + '1' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'observation', + 'hydrologicRegime', + 'Seasonally flooded', + 'Surface water is present for extended periods during the growing season, but is absent by the end of the growing season in most years. The water table after flooding ceases is very variable, extending from saturated to a water table well below the ground surface. Includes Cowardin''s Seasonal, Seasonal-Saturated, and Seasonal-Well Drained modifiers.', + '2' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'observation', + 'hydrologicRegime', + 'Saturated', + 'Surface water is seldom present, but substrate is saturated to surface for extended periods during the growing season. Equivalent to Cowardin''s Saturated modifier.', + '3' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'observation', + 'hydrologicRegime', + 'Seasonally saturated', + null, + '4' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'observation', + 'hydrologicRegime', + 'Temporarily flooded', + 'Surface water present for brief periods during growing season, but water table usually lies well below soil surface. Often characterizes flood-plain wetlands. Equivalent to Cowardin''s Temporary modifier.', + '5' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'observation', + 'hydrologicRegime', + 'Intermittently flooded', + 'Substrate is usually exposed, but surface water can be present for variable periods without detectable seasonal periodicity. Inundation is not predictable to a given season and is dependent upon highly localized rain storms. This modifier was developed for use in the arid West for water regimes of Playa lakes, intermittent streams, and dry washes but can be used in other parts of the U.S. where appropriate. This modifier can be applied to both wetland and non-wetland situations. Equivalent to Cowardin''s Intermittently Flooded modifier.', + '6' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'observation', + 'hydrologicRegime', + 'Permanently flooded', + 'Water covers the land surface at all times of the year in all years. Equivalent to Cowardin''s "permanently flooded".', + '7' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'observation', + 'hydrologicRegime', + 'Permanently flooded - tidal', + 'Salt water covers the land surface at all times of the year in all years. This modifier applies only to permanently flooded area irregularly flooded by fresh tidal water. Equivalent to Cowardin''s "permanently flooded/tidal".', + '8' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'observation', + 'hydrologicRegime', + 'Tidally flooded', + 'Flooded by the alternate rise and fall of the surface of oceans, seas, and the bays, rivers, etc. connected to them, caused by the attraction of the moon and sun.', + '9' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'observation', + 'hydrologicRegime', + 'Wind-tidally flooded', + 'Flooded by the alternate rise and fall of the surface of oceans, seas, and the bays, rivers, etc. connected to them, caused by the back-up of water caused by unfavorable winds.', + '10' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'observation', + 'hydrologicRegime', + 'Irregularly flooded', + 'Tidal water floods land surface less often than daily; the area must be flooded by tides at least once yearly as a result of extreme high spring tide plus wind plus flow.', + '11' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'observation', + 'hydrologicRegime', + 'Irregularly exposed', + 'Land surface is exposed by tides less often than daily; the area from mean low tide to extreme low spring tide.', + '12' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'observation', + 'hydrologicRegime', + 'Upland', + 'Not a wetland. Very rarely flooded.', + '13' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'observation', + 'hydrologicRegime', + 'Unknown', + null, + '14' + ); + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'observation', + 'soilMoistureRegime', + 'Soil Moisture Regime', + 'logical', + 'yes', + 'varchar (30)', + 'n/a', + 'n/a', + 'closed', + 'closed list', + 'How moist was the soil at the sampling event?', + + ' observation Observation soilMoistureRegime Soil Moisture Regime logical varchar (30) n/a n/a closed closed list How moist was the soil at the sampling event? Hydric Hygric Mesic Subhydric Subhygric Submesic Subxeric Very xeric Xeric ' + + ); + + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'observation', + 'soilMoistureRegime', + 'Very xeric', + null, + '1' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'observation', + 'soilMoistureRegime', + 'Xeric', + null, + '2' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'observation', + 'soilMoistureRegime', + 'Subxeric', + null, + '3' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'observation', + 'soilMoistureRegime', + 'Submesic', + null, + '4' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'observation', + 'soilMoistureRegime', + 'Mesic', + null, + '5' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'observation', + 'soilMoistureRegime', + 'Subhygric', + null, + '6' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'observation', + 'soilMoistureRegime', + 'Hygric', + null, + '7' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'observation', + 'soilMoistureRegime', + 'Subhydric', + null, + '8' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'observation', + 'soilMoistureRegime', + 'Hydric', + null, + '9' + ); + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'observation', + 'soilDrainage', + 'Soil Drainage', + 'logical', + 'yes', + 'varchar (30)', + 'n/a', + 'n/a', + 'closed', + 'closed list', + 'Identifies the natural drainage conditions of the soil and refers to the frequency and duration of wet periods. The soil drainage classes are defined in terms of (1) actual moisture content (in excess of field moisture capacity) and (2) the extent of the period during which excess water is present in the plant-root zone. Soil drainage class categories conform to the FGDC Soil Geographic Data Standards, September 1997. (http://www.fgdc.gov/standards/documents/standards/soils/soil997.PDF.) Definitions are derived from Grossman et al. (1998) and Sims et al. (1997). ', + + ' observation Observation soilDrainage Soil Drainage logical varchar (30) n/a n/a closed closed list Identifies the natural drainage conditions of the soil and refers to the frequency and duration of wet periods. The soil drainage classes are defined in terms of (1) actual moisture content (in excess of field moisture capacity) and (2) the extent of the period during which excess water is present in the plant-root zone. Soil drainage class categories conform to the FGDC Soil Geographic Data Standards, September 1997. (http://www.fgdc.gov/standards/documents/standards/soils/soil997.PDF.) Definitions are derived from Grossman et al. (1998) and Sims et al. (1997). excessively drained Soils are free from any evidence of gleying throughout the profile. These soils are commonly very coarse textured (e.g., >35% volume of particles > 2 mm in size) or soils on very steep slopes. Sometimes described as "very rapidly drained." somewhat excessively drained The soil moisture content seldom exceeds field capacity in any horizon except immediately after water addition. Soils are free from any evidence of gleying throughout the profile. Rapidly drained soils are commonly coarse textured or soils on steep slopes. Sometimes described as "rapidly drained." well drained The soil moisture content does not normally exceed field capacity in any horizon (except possibly the C) for a significant part of the year. Soils are usually free from mottling in the upper 3 feet (1 m), but may be mottled below this depth. B horizons, if present, are reddish, brownish, or yellowish. moderately well drained The soil moisture in excess of field capacity remains for a small but significant period of the year. Soils are commonly mottled (chroma < 2) in the lower B and C horizons or below a depth of 2 feet (0.6 m). The Ae horizon, if present, may be faintly mottled in fine-textured soils and in medium-textured soils that have a slowly permeable layer below the solum. In grassland soils the B and C horizons may be only faintly mottled and the A horizon may be relatively thick and dark. somewhat poorly drained The soil moisture in excess of field capacity remains in subsurface horizons for moderately long periods during the year. Soils are commonly mottled in the B and C horizons; the Ae horizon, if present, may be mottled. The matrix generally has a lower chroma than in the well-drained soil on similar parent material. Sometimes described as "imperfectly drained." poorly drained The soil moisture in excess of field capacity remains in all horizons for a large part of the year. The soils are usually very strongly gleyed (low chroma colors, such as gray, bluish, or gray-green). Except in high-chroma parent materials the B, if present, and upper C horizons usually have matrix colors of low chroma. Faint mottling may occur throughout. very poorly drained Free water remains at or within 12 inches of the surface most of the year. The soils are usually very strongly gleyed. Subsurface horizons usually are of low chroma and yellowish to bluish hues. Mottling may be present but at the depth in the profile. Very poorly drained soils usually have a mucky or peaty surface horizon. ' + + ); + + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'observation', + 'soilDrainage', + 'excessively drained', + 'Soils are free from any evidence of gleying throughout the profile. These soils are commonly very coarse textured (e.g., >35% volume of particles > 2 mm in size) or soils on very steep slopes. Sometimes described as "very rapidly drained."', + '1' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'observation', + 'soilDrainage', + 'somewhat excessively drained', + 'The soil moisture content seldom exceeds field capacity in any horizon except immediately after water addition. Soils are free from any evidence of gleying throughout the profile. Rapidly drained soils are commonly coarse textured or soils on steep slopes. Sometimes described as "rapidly drained."', + '2' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'observation', + 'soilDrainage', + 'well drained', + 'The soil moisture content does not normally exceed field capacity in any horizon (except possibly the C) for a significant part of the year. Soils are usually free from mottling in the upper 3 feet (1 m), but may be mottled below this depth. B horizons, if present, are reddish, brownish, or yellowish.', + '3' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'observation', + 'soilDrainage', + 'moderately well drained', + 'The soil moisture in excess of field capacity remains for a small but significant period of the year. Soils are commonly mottled (chroma < 2) in the lower B and C horizons or below a depth of 2 feet (0.6 m). The Ae horizon, if present, may be faintly mottled in fine-textured soils and in medium-textured soils that have a slowly permeable layer below the solum. In grassland soils the B and C horizons may be only faintly mottled and the A horizon may be relatively thick and dark.', + '4' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'observation', + 'soilDrainage', + 'somewhat poorly drained', + 'The soil moisture in excess of field capacity remains in subsurface horizons for moderately long periods during the year. Soils are commonly mottled in the B and C horizons; the Ae horizon, if present, may be mottled. The matrix generally has a lower chroma than in the well-drained soil on similar parent material. Sometimes described as "imperfectly drained."', + '5' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'observation', + 'soilDrainage', + 'poorly drained', + 'The soil moisture in excess of field capacity remains in all horizons for a large part of the year. The soils are usually very strongly gleyed (low chroma colors, such as gray, bluish, or gray-green). Except in high-chroma parent materials the B, if present, and upper C horizons usually have matrix colors of low chroma. Faint mottling may occur throughout.', + '6' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'observation', + 'soilDrainage', + 'very poorly drained', + 'Free water remains at or within 12 inches of the surface most of the year. The soils are usually very strongly gleyed. Subsurface horizons usually are of low chroma and yellowish to bluish hues. Mottling may be present but at the depth in the profile. Very poorly drained soils usually have a mucky or peaty surface horizon.', + '7' + ); + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'observation', + 'waterSalinity', + 'Water Salinity', + 'logical', + 'yes', + 'varchar (30)', + 'n/a', + 'n/a', + 'closed', + 'closed list', + 'How saline is the water, if a flooded community?', + + ' observation Observation waterSalinity Water Salinity logical varchar (30) n/a n/a closed closed list How saline is the water, if a flooded community? Brackish 0.5 to 30 ppt Freshwater less than 0.5 ppt Saltwater greater than 30 ppt ' + + ); + + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'observation', + 'waterSalinity', + 'Saltwater', + 'greater than 30 ppt', + '1' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'observation', + 'waterSalinity', + 'Brackish', + '0.5 to 30 ppt', + '2' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'observation', + 'waterSalinity', + 'Freshwater', + 'less than 0.5 ppt', + '3' + ); + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'observation', + 'waterDepth', + 'Water Depth', + 'logical', + 'yes', + 'Float', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'For aquatic or marine vegetation, what was the water depth in m.', + + ' observation Observation waterDepth Water Depth logical Float n/a n/a no n/a For aquatic or marine vegetation, what was the water depth in m. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'observation', + 'shoreDistance', + 'Shore Distance', + 'logical', + 'yes', + 'Float', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'For aquatic or marine vegetation, what was the closest distance to shore in m.', + + ' observation Observation shoreDistance Shore Distance logical Float n/a n/a no n/a For aquatic or marine vegetation, what was the closest distance to shore in m. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'observation', + 'soilDepth', + 'Soil Depth', + 'logical', + 'yes', + 'Float', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'Median depth to bedrock or permafrost in m (usually from averaging multiple probe readings).', + + ' observation Observation soilDepth Soil Depth logical Float n/a n/a no n/a Median depth to bedrock or permafrost in m (usually from averaging multiple probe readings). ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'observation', + 'organicDepth', + 'Organic Depth', + 'logical', + 'yes', + 'Float', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'Depth of the surficial organic layer, where present, in centimeters.', + + ' observation Observation organicDepth Organic Depth logical Float n/a n/a no n/a Depth of the surficial organic layer, where present, in centimeters. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'observation', + 'SOILTAXON_ID', + 'Soil Taxon', + 'logical', + 'yes', + 'Integer', + 'FK', + 'soilTaxon.SOILTAXON_ID', + 'no', + 'hierarchy', + 'Foreign key into table of soil taxa within the USDA classification hierarchy, including Order, Suborder, Greatgroup, Subgroup, Family and Series.', + + ' observation Observation SOILTAXON_ID Soil Taxon logical Integer FK soilTaxon.SOILTAXON_ID no hierarchy Foreign key into table of soil taxa within the USDA classification hierarchy, including Order, Suborder, Greatgroup, Subgroup, Family and Series. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'observation', + 'soilTaxonSrc', + 'Soil Taxon Source', + 'logical', + 'yes', + 'varchar (200)', + 'n/a', + 'n/a', + 'closed', + 'closed list', + 'How was the soil taxon determined (e.g., field observation, map, other sources)?', + + ' observation Observation soilTaxonSrc Soil Taxon Source logical varchar (200) n/a n/a closed closed list How was the soil taxon determined (e.g., field observation, map, other sources)? Field observation Other soil map USDA county soil survey ' + + ); + + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'observation', + 'soilTaxonSrc', + 'Field observation', + null, + '1' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'observation', + 'soilTaxonSrc', + 'USDA county soil survey', + null, + '2' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'observation', + 'soilTaxonSrc', + 'Other soil map', + null, + '3' + ); + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'observation', + 'percentBedRock', + 'Percent Bedrock', + 'logical', + 'yes', + 'Float', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'Percent of surface that is exposed bedrock.', + + ' observation Observation percentBedRock Percent Bedrock logical Float n/a n/a no n/a Percent of surface that is exposed bedrock. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'observation', + 'percentRockGravel', + 'Percent Rock / Gravel', + 'logical', + 'yes', + 'Float', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'Percent of surface that is exposed rock and gravel.', + + ' observation Observation percentRockGravel Percent Rock / Gravel logical Float n/a n/a no n/a Percent of surface that is exposed rock and gravel. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'observation', + 'percentWood', + 'Percent Wood', + 'logical', + 'yes', + 'Float', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'Percent of surface that is wood.', + + ' observation Observation percentWood Percent Wood logical Float n/a n/a no n/a Percent of surface that is wood. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'observation', + 'percentLitter', + 'Percent Litter', + 'logical', + 'yes', + 'Float', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'Percent of surface that is litter.', + + ' observation Observation percentLitter Percent Litter logical Float n/a n/a no n/a Percent of surface that is litter. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'observation', + 'percentBareSoil', + 'Percent Bare Soil', + 'logical', + 'yes', + 'Float', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'Percent of surface that is bare soil.', + + ' observation Observation percentBareSoil Percent Bare Soil logical Float n/a n/a no n/a Percent of surface that is bare soil. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'observation', + 'percentWater', + 'Percent Water', + 'logical', + 'yes', + 'Float', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'Percent of surface that is water.', + + ' observation Observation percentWater Percent Water logical Float n/a n/a no n/a Percent of surface that is water. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'observation', + 'percentOther', + 'Percent Other', + 'logical', + 'yes', + 'Float', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'Percent of surface that belong to an additional itemized category', + + ' observation Observation percentOther Percent Other logical Float n/a n/a no n/a Percent of surface that belong to an additional itemized category ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'observation', + 'nameOther', + 'Name Other', + 'logical', + 'yes', + 'varchar (30)', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'Name of additional itemized ground cover category (e.g., beer cans).', + + ' observation Observation nameOther Name Other logical varchar (30) n/a n/a no n/a Name of additional itemized ground cover category (e.g., beer cans). ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'observation', + 'treeHt', + 'Tree Height', + 'logical', + 'yes', + 'Float', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'Height of the tree layer in m.', + + ' observation Observation treeHt Tree Height logical Float n/a n/a no n/a Height of the tree layer in m. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'observation', + 'shrubHt', + 'Shrub Height', + 'logical', + 'yes', + 'Float', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'Height of the shrub layer in m.', + + ' observation Observation shrubHt Shrub Height logical Float n/a n/a no n/a Height of the shrub layer in m. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'observation', + 'fieldHt', + 'Field Height', + 'logical', + 'yes', + 'Float', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'Height of the field layer in m.', + + ' observation Observation fieldHt Field Height logical Float n/a n/a no n/a Height of the field layer in m. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'observation', + 'nonvascularHt', + 'Nonvascular Height', + 'logical', + 'yes', + 'Float', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'Height of the nonvascular layer in m.', + + ' observation Observation nonvascularHt Nonvascular Height logical Float n/a n/a no n/a Height of the nonvascular layer in m. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'observation', + 'submergedHt', + 'Submerged Height', + 'logical', + 'yes', + 'Float', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'Height of the submerged layer in m.', + + ' observation Observation submergedHt Submerged Height logical Float n/a n/a no n/a Height of the submerged layer in m. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'observation', + 'treeCover', + 'Tree Cover', + 'logical', + 'yes', + 'Float', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'Total cover of the tree layer in percent. Includes tall trees (single-stemmed woody plants, generally more than 5 m in height or greater at maturity under optimal growing conditions). Very tall shrubs with tree-like form may also be included here, as may other life forms, such as lianas and epiphytes.', + + ' observation Observation treeCover Tree Cover logical Float n/a n/a no n/a Total cover of the tree layer in percent. Includes tall trees (single-stemmed woody plants, generally more than 5 m in height or greater at maturity under optimal growing conditions). Very tall shrubs with tree-like form may also be included here, as may other life forms, such as lianas and epiphytes. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'observation', + 'shrubCover', + 'Shrub Cover', + 'logical', + 'yes', + 'Float', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'Total cover of the shrub layer in percent. Includes shrubs (multiple-stemmed woody plants, generally less than 5 m in height at maturity under optimal growing conditions) and shorter trees (saplings). As with the tree stratum, other life forms present in this stratum may also be included (however, herbaceous life forms should be excluded, as their stems often die back annually and do not have as consistent a height as woody life forms). Where dwarf-shrubs (i.e. shrubs shorter than 0.5 m) form a distinct stratum (either as part of a series of strata, as in a forest, or as the top stratum of more open vegetation, such as tundra or xeric shrublands), they should be treated as a low version of the shrub stratum (or short shrub substratum). In many vegetation types, dwarf-shrubs may simply occur as one life form component of the herb stratum.', + + ' observation Observation shrubCover Shrub Cover logical Float n/a n/a no n/a Total cover of the shrub layer in percent. Includes shrubs (multiple-stemmed woody plants, generally less than 5 m in height at maturity under optimal growing conditions) and shorter trees (saplings). As with the tree stratum, other life forms present in this stratum may also be included (however, herbaceous life forms should be excluded, as their stems often die back annually and do not have as consistent a height as woody life forms). Where dwarf-shrubs (i.e. shrubs shorter than 0.5 m) form a distinct stratum (either as part of a series of strata, as in a forest, or as the top stratum of more open vegetation, such as tundra or xeric shrublands), they should be treated as a low version of the shrub stratum (or short shrub substratum). In many vegetation types, dwarf-shrubs may simply occur as one life form component of the herb stratum. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'observation', + 'fieldCover', + 'Field Cover', + 'logical', + 'yes', + 'Float', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'Total cover of the field layer in percent. Also referred to as Herb stratum. Includes herbs (plants without woody stems and often dying back annually), often in association with low creeping semi-shrubs, dwarf-shrubs, vines, and non-woody brambles (such as raspberries), as well as tree or shrub seedlings.', + + ' observation Observation fieldCover Field Cover logical Float n/a n/a no n/a Total cover of the field layer in percent. Also referred to as Herb stratum. Includes herbs (plants without woody stems and often dying back annually), often in association with low creeping semi-shrubs, dwarf-shrubs, vines, and non-woody brambles (such as raspberries), as well as tree or shrub seedlings. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'observation', + 'nonvascularCover', + 'Nonvascular Cover', + 'logical', + 'yes', + 'Float', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'Total cover of the nonvascular layer in percent. Also referred to as moss, bryoid, or ground stratum. Defined entirely by mosses, lichens, liverworts, and alga. Ground-creeping vines, prostrate shrubs and herbs should be treated in the herb stratum. Where herbs are entirely absent, it is still possible to recognize this stratum if other very low woody or semi-woody life forms are present.', + + ' observation Observation nonvascularCover Nonvascular Cover logical Float n/a n/a no n/a Total cover of the nonvascular layer in percent. Also referred to as moss, bryoid, or ground stratum. Defined entirely by mosses, lichens, liverworts, and alga. Ground-creeping vines, prostrate shrubs and herbs should be treated in the herb stratum. Where herbs are entirely absent, it is still possible to recognize this stratum if other very low woody or semi-woody life forms are present. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'observation', + 'floatingCover', + 'Floating Cover', + 'logical', + 'yes', + 'Float', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'Total cover of the floating layer in percent. Includes rooted or drifting plants that float on the water surface (e.g., duckweed, water-lily).', + + ' observation Observation floatingCover Floating Cover logical Float n/a n/a no n/a Total cover of the floating layer in percent. Includes rooted or drifting plants that float on the water surface (e.g., duckweed, water-lily). ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'observation', + 'submergedCover', + 'Submerged Cover', + 'logical', + 'yes', + 'Float', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'Total cover of the submerged layer in percent. Includes rooted or drifting plants that by-and-large remain submerged in the water column or on the aquatic bottom (e.g., pondweed). The focus is on the overall strata arrangement of these aquatic plants. Note that emergent plants life forms in a wetland should be placed in above water strata (e.g., cattail or sedges would be placed in the herb stratum, whereas the duckweed would be in the floating aquatic stratum).', + + ' observation Observation submergedCover Submerged Cover logical Float n/a n/a no n/a Total cover of the submerged layer in percent. Includes rooted or drifting plants that by-and-large remain submerged in the water column or on the aquatic bottom (e.g., pondweed). The focus is on the overall strata arrangement of these aquatic plants. Note that emergent plants life forms in a wetland should be placed in above water strata (e.g., cattail or sedges would be placed in the herb stratum, whereas the duckweed would be in the floating aquatic stratum). ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'observation', + 'dominantStratum', + 'Dominant Stratum', + 'logical', + 'yes', + 'varchar (40)', + 'n/a', + 'n/a', + 'closed', + 'closed list', + 'Which of the six standard strata is dominant?', + + ' observation Observation dominantStratum Dominant Stratum logical varchar (40) n/a n/a closed closed list Which of the six standard strata is dominant? Floating Herb Nonvascular Shrub Submerged Tree ' + + ); + + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'observation', + 'dominantStratum', + 'Tree', + null, + '1' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'observation', + 'dominantStratum', + 'Shrub', + null, + '2' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'observation', + 'dominantStratum', + 'Herb', + null, + '3' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'observation', + 'dominantStratum', + 'Nonvascular', + null, + '4' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'observation', + 'dominantStratum', + 'Floating', + null, + '5' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'observation', + 'dominantStratum', + 'Submerged', + null, + '6' + ); + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'observation', + 'growthform1Type', + 'Growthform1 Type', + 'logical', + 'yes', + 'varchar (40)', + 'n/a', + 'n/a', + 'closed', + 'closed list', + 'The predominant growth form?', + + ' observation Observation growthform1Type Growthform1 Type logical varchar (40) n/a n/a closed closed list The predominant growth form? Trees larger woody plants, mostly well above 5 m tall Needle-leaved tree mainly conifers - pine, spruce, larch, redwood, etc. Broad-leaved deciduous tree leaves shed in the temperate zone winter, or in the tropical dry season Broad-leaved evergreen tree many tropical and subtropical trees, mostly with medium-sized leaves Thorn tree armed with spines, in many cases with compound, deciduous leaves, often reduced in size Evergreen sclerophyllous tree with smaller, tough, evergreen leaves Succulent tree primarily cacti and succulent euphorbs Palm tree rosette trees, unbranched with a crown of large leaves Tree fern rosette trees, unbranched with a crown of large leaves Bamboo arborescent grasses with woody-like stems Other tree other type of tree not on the list Shrubs smaller woody plants, mostly below 5 m tall Needle-leaved shrub mainly conifers - juniper, yew, etc. Broad-leaved deciduous shrub leaves shed in the temperate zone winter, or in the tropical dry season Broad-leaved evergreen shrub many tropical and temperate shrubs, mostly with medium to small-sized leaves Thorn shrub armed with spines, in many cases with compound, deciduous leaves, often reduced in size Evergreen sclerophyllous shrub with smaller, tough, evergreen leaves Palm shrub rosette shrubs, unbranched with a short crown of leaves Dwarf-shrub low shrubs spreading near the ground surface, less than 50 cm high Semi-shrub suffrutescent, i.e., with the upper parts of the stems and branches dying back in unfavorable seasons Succulent shrub cacti, certain euphorbias, etc. Other shrub other type of shrub not on the list Herbs plants without perennial aboveground woody stems Forb herbs other than ferns and graminoids Graminoid grasses, sedges, and other grass like plants Fern and fern allies pteridophytes -ferns, clubmosses, horsetails, etc Succulent forb Aquatic herb floating and submergent Other herbaceous other type of herbaceous species not on the list Moss Liverwort/hornwort Lichen Alga Epiphyte plants growing wholly above the ground surface on other plants Vine/liana woody climbers or vines Other/unknown other type of species not on the list Not assessed ' + + ); + + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'observation', + 'growthform1Type', + 'Trees', + 'larger woody plants, mostly well above 5 m tall', + '10' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'observation', + 'growthform1Type', + 'Needle-leaved tree', + 'mainly conifers - pine, spruce, larch, redwood, etc.', + '20' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'observation', + 'growthform1Type', + 'Broad-leaved deciduous tree', + 'leaves shed in the temperate zone winter, or in the tropical dry season', + '30' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'observation', + 'growthform1Type', + 'Broad-leaved evergreen tree', + 'many tropical and subtropical trees, mostly with medium-sized leaves', + '40' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'observation', + 'growthform1Type', + 'Thorn tree', + 'armed with spines, in many cases with compound, deciduous leaves, often reduced in size', + '50' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'observation', + 'growthform1Type', + 'Evergreen sclerophyllous tree', + 'with smaller, tough, evergreen leaves', + '60' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'observation', + 'growthform1Type', + 'Succulent tree', + 'primarily cacti and succulent euphorbs', + '70' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'observation', + 'growthform1Type', + 'Palm tree', + 'rosette trees, unbranched with a crown of large leaves', + '80' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'observation', + 'growthform1Type', + 'Tree fern', + 'rosette trees, unbranched with a crown of large leaves', + '90' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'observation', + 'growthform1Type', + 'Bamboo', + 'arborescent grasses with woody-like stems', + '100' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'observation', + 'growthform1Type', + 'Other tree', + 'other type of tree not on the list', + '110' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'observation', + 'growthform1Type', + 'Shrubs', + 'smaller woody plants, mostly below 5 m tall', + '120' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'observation', + 'growthform1Type', + 'Needle-leaved shrub', + 'mainly conifers - juniper, yew, etc.', + '130' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'observation', + 'growthform1Type', + 'Broad-leaved deciduous shrub', + 'leaves shed in the temperate zone winter, or in the tropical dry season', + '140' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'observation', + 'growthform1Type', + 'Broad-leaved evergreen shrub', + 'many tropical and temperate shrubs, mostly with medium to small-sized leaves', + '150' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'observation', + 'growthform1Type', + 'Thorn shrub', + 'armed with spines, in many cases with compound, deciduous leaves, often reduced in size', + '160' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'observation', + 'growthform1Type', + 'Evergreen sclerophyllous shrub', + 'with smaller, tough, evergreen leaves', + '170' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'observation', + 'growthform1Type', + 'Palm shrub', + 'rosette shrubs, unbranched with a short crown of leaves', + '180' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'observation', + 'growthform1Type', + 'Dwarf-shrub', + 'low shrubs spreading near the ground surface, less than 50 cm high', + '190' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'observation', + 'growthform1Type', + 'Semi-shrub', + 'suffrutescent, i.e., with the upper parts of the stems and branches dying back in unfavorable seasons', + '200' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'observation', + 'growthform1Type', + 'Succulent shrub', + 'cacti, certain euphorbias, etc.', + '210' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'observation', + 'growthform1Type', + 'Other shrub', + 'other type of shrub not on the list', + '220' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'observation', + 'growthform1Type', + 'Herbs', + 'plants without perennial aboveground woody stems', + '230' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'observation', + 'growthform1Type', + 'Forb', + 'herbs other than ferns and graminoids', + '240' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'observation', + 'growthform1Type', + 'Graminoid', + 'grasses, sedges, and other grass like plants', + '250' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'observation', + 'growthform1Type', + 'Fern and fern allies', + 'pteridophytes -ferns, clubmosses, horsetails, etc', + '260' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'observation', + 'growthform1Type', + 'Succulent forb', + null, + '270' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'observation', + 'growthform1Type', + 'Aquatic herb', + 'floating and submergent', + '280' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'observation', + 'growthform1Type', + 'Other herbaceous', + 'other type of herbaceous species not on the list', + '290' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'observation', + 'growthform1Type', + 'Moss', + null, + '300' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'observation', + 'growthform1Type', + 'Liverwort/hornwort', + null, + '310' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'observation', + 'growthform1Type', + 'Lichen', + null, + '320' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'observation', + 'growthform1Type', + 'Alga', + null, + '330' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'observation', + 'growthform1Type', + 'Epiphyte', + 'plants growing wholly above the ground surface on other plants', + '340' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'observation', + 'growthform1Type', + 'Vine/liana', + 'woody climbers or vines', + '350' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'observation', + 'growthform1Type', + 'Other/unknown', + 'other type of species not on the list', + '360' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'observation', + 'growthform1Type', + 'Not assessed', + null, + '370' + ); + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'observation', + 'growthform2Type', + 'Growthform2 Type', + 'logical', + 'yes', + 'varchar (40)', + 'n/a', + 'n/a', + 'closed', + 'closed list', + 'The second-most predominant growthform?', + + ' observation Observation growthform2Type Growthform2 Type logical varchar (40) n/a n/a closed closed list The second-most predominant growthform? Trees larger woody plants, mostly well above 5 m tall Needle-leaved tree mainly conifers - pine, spruce, larch, redwood, etc. Broad-leaved deciduous tree leaves shed in the temperate zone winter, or in the tropical dry season Broad-leaved evergreen tree many tropical and subtropical trees, mostly with medium-sized leaves Thorn tree armed with spines, in many cases with compound, deciduous leaves, often reduced in size Evergreen sclerophyllous tree with smaller, tough, evergreen leaves Succulent tree primarily cacti and succulent euphorbs Palm tree rosette trees, unbranched with a crown of large leaves Tree fern rosette trees, unbranched with a crown of large leaves Bamboo arborescent grasses with woody-like stems Other tree other type of tree not on the list Shrubs smaller woody plants, mostly below 5 m tall Needle-leaved shrub mainly conifers - juniper, yew, etc. Broad-leaved deciduous shrub leaves shed in the temperate zone winter, or in the tropical dry season Broad-leaved evergreen shrub many tropical and temperate shrubs, mostly with medium to small-sized leaves Thorn shrub armed with spines, in many cases with compound, deciduous leaves, often reduced in size Evergreen sclerophyllous shrub with smaller, tough, evergreen leaves Palm shrub rosette shrubs, unbranched with a short crown of leaves Dwarf-shrub low shrubs spreading near the ground surface, less than 50 cm high Semi-shrub suffrutescent, i.e., with the upper parts of the stems and branches dying back in unfavorable seasons Succulent shrub cacti, certain euphorbias, etc. Other shrub other type of shrub not on the list Herbs plants without perennial aboveground woody stems Forb herbs other than ferns and graminoids Graminoid grasses, sedges, and other grass like plants Fern and fern allies pteridophytes -ferns, clubmosses, horsetails, etc Succulent forb Aquatic herb floating and submergent Other herbaceous other type of herbaceous species not on the list Moss Liverwort/hornwort Lichen Alga Epiphyte plants growing wholly above the ground surface on other plants Vine/liana woody climbers or vines Other/unknown other type of species not on the list Not assessed ' + + ); + + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'observation', + 'growthform2Type', + 'Trees', + 'larger woody plants, mostly well above 5 m tall', + '10' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'observation', + 'growthform2Type', + 'Needle-leaved tree', + 'mainly conifers - pine, spruce, larch, redwood, etc.', + '20' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'observation', + 'growthform2Type', + 'Broad-leaved deciduous tree', + 'leaves shed in the temperate zone winter, or in the tropical dry season', + '30' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'observation', + 'growthform2Type', + 'Broad-leaved evergreen tree', + 'many tropical and subtropical trees, mostly with medium-sized leaves', + '40' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'observation', + 'growthform2Type', + 'Thorn tree', + 'armed with spines, in many cases with compound, deciduous leaves, often reduced in size', + '50' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'observation', + 'growthform2Type', + 'Evergreen sclerophyllous tree', + 'with smaller, tough, evergreen leaves', + '60' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'observation', + 'growthform2Type', + 'Succulent tree', + 'primarily cacti and succulent euphorbs', + '70' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'observation', + 'growthform2Type', + 'Palm tree', + 'rosette trees, unbranched with a crown of large leaves', + '80' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'observation', + 'growthform2Type', + 'Tree fern', + 'rosette trees, unbranched with a crown of large leaves', + '90' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'observation', + 'growthform2Type', + 'Bamboo', + 'arborescent grasses with woody-like stems', + '100' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'observation', + 'growthform2Type', + 'Other tree', + 'other type of tree not on the list', + '110' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'observation', + 'growthform2Type', + 'Shrubs', + 'smaller woody plants, mostly below 5 m tall', + '120' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'observation', + 'growthform2Type', + 'Needle-leaved shrub', + 'mainly conifers - juniper, yew, etc.', + '130' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'observation', + 'growthform2Type', + 'Broad-leaved deciduous shrub', + 'leaves shed in the temperate zone winter, or in the tropical dry season', + '140' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'observation', + 'growthform2Type', + 'Broad-leaved evergreen shrub', + 'many tropical and temperate shrubs, mostly with medium to small-sized leaves', + '150' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'observation', + 'growthform2Type', + 'Thorn shrub', + 'armed with spines, in many cases with compound, deciduous leaves, often reduced in size', + '160' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'observation', + 'growthform2Type', + 'Evergreen sclerophyllous shrub', + 'with smaller, tough, evergreen leaves', + '170' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'observation', + 'growthform2Type', + 'Palm shrub', + 'rosette shrubs, unbranched with a short crown of leaves', + '180' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'observation', + 'growthform2Type', + 'Dwarf-shrub', + 'low shrubs spreading near the ground surface, less than 50 cm high', + '190' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'observation', + 'growthform2Type', + 'Semi-shrub', + 'suffrutescent, i.e., with the upper parts of the stems and branches dying back in unfavorable seasons', + '200' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'observation', + 'growthform2Type', + 'Succulent shrub', + 'cacti, certain euphorbias, etc.', + '210' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'observation', + 'growthform2Type', + 'Other shrub', + 'other type of shrub not on the list', + '220' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'observation', + 'growthform2Type', + 'Herbs', + 'plants without perennial aboveground woody stems', + '230' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'observation', + 'growthform2Type', + 'Forb', + 'herbs other than ferns and graminoids', + '240' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'observation', + 'growthform2Type', + 'Graminoid', + 'grasses, sedges, and other grass like plants', + '250' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'observation', + 'growthform2Type', + 'Fern and fern allies', + 'pteridophytes -ferns, clubmosses, horsetails, etc', + '260' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'observation', + 'growthform2Type', + 'Succulent forb', + null, + '270' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'observation', + 'growthform2Type', + 'Aquatic herb', + 'floating and submergent', + '280' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'observation', + 'growthform2Type', + 'Other herbaceous', + 'other type of herbaceous species not on the list', + '290' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'observation', + 'growthform2Type', + 'Moss', + null, + '300' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'observation', + 'growthform2Type', + 'Liverwort/hornwort', + null, + '310' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'observation', + 'growthform2Type', + 'Lichen', + null, + '320' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'observation', + 'growthform2Type', + 'Alga', + null, + '330' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'observation', + 'growthform2Type', + 'Epiphyte', + 'plants growing wholly above the ground surface on other plants', + '340' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'observation', + 'growthform2Type', + 'Vine/liana', + 'woody climbers or vines', + '350' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'observation', + 'growthform2Type', + 'Other/unknown', + 'other type of species not on the list', + '360' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'observation', + 'growthform2Type', + 'Not assessed', + null, + '370' + ); + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'observation', + 'growthform3Type', + 'Growthform3 Type', + 'logical', + 'yes', + 'varchar (40)', + 'n/a', + 'n/a', + 'closed', + 'closed list', + 'The third-most predominant growthform', + + ' observation Observation growthform3Type Growthform3 Type logical varchar (40) n/a n/a closed closed list The third-most predominant growthform Trees larger woody plants, mostly well above 5 m tall Needle-leaved tree mainly conifers - pine, spruce, larch, redwood, etc. Broad-leaved deciduous tree leaves shed in the temperate zone winter, or in the tropical dry season Broad-leaved evergreen tree many tropical and subtropical trees, mostly with medium-sized leaves Thorn tree armed with spines, in many cases with compound, deciduous leaves, often reduced in size Evergreen sclerophyllous tree with smaller, tough, evergreen leaves Succulent tree primarily cacti and succulent euphorbs Palm tree rosette trees, unbranched with a crown of large leaves Tree fern rosette trees, unbranched with a crown of large leaves Bamboo arborescent grasses with woody-like stems Other tree other type of tree not on the list Shrubs smaller woody plants, mostly below 5 m tall Needle-leaved shrub mainly conifers - juniper, yew, etc. Broad-leaved deciduous shrub leaves shed in the temperate zone winter, or in the tropical dry season Broad-leaved evergreen shrub many tropical and temperate shrubs, mostly with medium to small-sized leaves Thorn shrub armed with spines, in many cases with compound, deciduous leaves, often reduced in size Evergreen sclerophyllous shrub with smaller, tough, evergreen leaves Palm shrub rosette shrubs, unbranched with a short crown of leaves Dwarf-shrub low shrubs spreading near the ground surface, less than 50 cm high Semi-shrub suffrutescent, i.e., with the upper parts of the stems and branches dying back in unfavorable seasons Succulent shrub cacti, certain euphorbias, etc. Other shrub other type of shrub not on the list Herbs plants without perennial aboveground woody stems Forb herbs other than ferns and graminoids Graminoid grasses, sedges, and other grass like plants Fern and fern allies pteridophytes -ferns, clubmosses, horsetails, etc Succulent forb Aquatic herb floating and submergent Other herbaceous other type of herbaceous species not on the list Moss Liverwort/hornwort Lichen Alga Epiphyte plants growing wholly above the ground surface on other plants Vine/liana woody climbers or vines Other/unknown other type of species not on the list Not assessed ' + + ); + + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'observation', + 'growthform3Type', + 'Trees', + 'larger woody plants, mostly well above 5 m tall', + '10' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'observation', + 'growthform3Type', + 'Needle-leaved tree', + 'mainly conifers - pine, spruce, larch, redwood, etc.', + '20' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'observation', + 'growthform3Type', + 'Broad-leaved deciduous tree', + 'leaves shed in the temperate zone winter, or in the tropical dry season', + '30' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'observation', + 'growthform3Type', + 'Broad-leaved evergreen tree', + 'many tropical and subtropical trees, mostly with medium-sized leaves', + '40' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'observation', + 'growthform3Type', + 'Thorn tree', + 'armed with spines, in many cases with compound, deciduous leaves, often reduced in size', + '50' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'observation', + 'growthform3Type', + 'Evergreen sclerophyllous tree', + 'with smaller, tough, evergreen leaves', + '60' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'observation', + 'growthform3Type', + 'Succulent tree', + 'primarily cacti and succulent euphorbs', + '70' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'observation', + 'growthform3Type', + 'Palm tree', + 'rosette trees, unbranched with a crown of large leaves', + '80' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'observation', + 'growthform3Type', + 'Tree fern', + 'rosette trees, unbranched with a crown of large leaves', + '90' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'observation', + 'growthform3Type', + 'Bamboo', + 'arborescent grasses with woody-like stems', + '100' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'observation', + 'growthform3Type', + 'Other tree', + 'other type of tree not on the list', + '110' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'observation', + 'growthform3Type', + 'Shrubs', + 'smaller woody plants, mostly below 5 m tall', + '120' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'observation', + 'growthform3Type', + 'Needle-leaved shrub', + 'mainly conifers - juniper, yew, etc.', + '130' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'observation', + 'growthform3Type', + 'Broad-leaved deciduous shrub', + 'leaves shed in the temperate zone winter, or in the tropical dry season', + '140' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'observation', + 'growthform3Type', + 'Broad-leaved evergreen shrub', + 'many tropical and temperate shrubs, mostly with medium to small-sized leaves', + '150' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'observation', + 'growthform3Type', + 'Thorn shrub', + 'armed with spines, in many cases with compound, deciduous leaves, often reduced in size', + '160' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'observation', + 'growthform3Type', + 'Evergreen sclerophyllous shrub', + 'with smaller, tough, evergreen leaves', + '170' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'observation', + 'growthform3Type', + 'Palm shrub', + 'rosette shrubs, unbranched with a short crown of leaves', + '180' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'observation', + 'growthform3Type', + 'Dwarf-shrub', + 'low shrubs spreading near the ground surface, less than 50 cm high', + '190' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'observation', + 'growthform3Type', + 'Semi-shrub', + 'suffrutescent, i.e., with the upper parts of the stems and branches dying back in unfavorable seasons', + '200' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'observation', + 'growthform3Type', + 'Succulent shrub', + 'cacti, certain euphorbias, etc.', + '210' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'observation', + 'growthform3Type', + 'Other shrub', + 'other type of shrub not on the list', + '220' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'observation', + 'growthform3Type', + 'Herbs', + 'plants without perennial aboveground woody stems', + '230' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'observation', + 'growthform3Type', + 'Forb', + 'herbs other than ferns and graminoids', + '240' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'observation', + 'growthform3Type', + 'Graminoid', + 'grasses, sedges, and other grass like plants', + '250' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'observation', + 'growthform3Type', + 'Fern and fern allies', + 'pteridophytes -ferns, clubmosses, horsetails, etc', + '260' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'observation', + 'growthform3Type', + 'Succulent forb', + null, + '270' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'observation', + 'growthform3Type', + 'Aquatic herb', + 'floating and submergent', + '280' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'observation', + 'growthform3Type', + 'Other herbaceous', + 'other type of herbaceous species not on the list', + '290' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'observation', + 'growthform3Type', + 'Moss', + null, + '300' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'observation', + 'growthform3Type', + 'Liverwort/hornwort', + null, + '310' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'observation', + 'growthform3Type', + 'Lichen', + null, + '320' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'observation', + 'growthform3Type', + 'Alga', + null, + '330' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'observation', + 'growthform3Type', + 'Epiphyte', + 'plants growing wholly above the ground surface on other plants', + '340' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'observation', + 'growthform3Type', + 'Vine/liana', + 'woody climbers or vines', + '350' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'observation', + 'growthform3Type', + 'Other/unknown', + 'other type of species not on the list', + '360' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'observation', + 'growthform3Type', + 'Not assessed', + null, + '370' + ); + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'observation', + 'growthform1Cover', + 'Growthform1 Cover', + 'logical', + 'yes', + 'Float', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'Total cover of the predominant growthform?', + + ' observation Observation growthform1Cover Growthform1 Cover logical Float n/a n/a no n/a Total cover of the predominant growthform? ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'observation', + 'growthform2Cover', + 'Growthform2 Cover', + 'logical', + 'yes', + 'Float', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'Total cover of the second-most predominant growthform?', + + ' observation Observation growthform2Cover Growthform2 Cover logical Float n/a n/a no n/a Total cover of the second-most predominant growthform? ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'observation', + 'growthform3Cover', + 'Growthform3 Cover', + 'logical', + 'yes', + 'Float', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'Total cover of the third-most predominant growthform?', + + ' observation Observation growthform3Cover Growthform3 Cover logical Float n/a n/a no n/a Total cover of the third-most predominant growthform? ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'observation', + 'totalCover', + 'Total Cover', + 'logical', + 'yes', + 'Float', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'The total cover, in percent, of all vegetation on the plot.', + + ' observation Observation totalCover Total Cover logical Float n/a n/a no n/a The total cover, in percent, of all vegetation on the plot. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'observation', + 'accessionCode', + 'Observation Accession Code', + 'logical', + 'yes', + 'varchar (255)', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'Code that uniquely references this record, allowing reference to this record for this version of this database. Better than a primary key, which is automatically generated by a database and not globally unique. VegBank Accession codes are only generated by VegBank, and therefore data integrity can be guaranteed, unlike with a primary key (number).', + + ' observation Observation accessionCode Observation Accession Code logical varchar (255) n/a n/a no n/a Code that uniquely references this record, allowing reference to this record for this version of this database. Better than a primary key, which is automatically generated by a database and not globally unique. VegBank Accession codes are only generated by VegBank, and therefore data integrity can be guaranteed, unlike with a primary key (number). ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'observation', + 'notesPublic', + 'Notes Public', + 'logical', + 'yes', + 'Boolean', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'TRUE indicates that public notes pertaining to this plot exist in "vegPlot.note"', + + ' observation Observation notesPublic Notes Public logical Boolean n/a n/a no n/a TRUE indicates that public notes pertaining to this plot exist in "vegPlot.note" ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'observation', + 'notesMgt', + 'Notes Mgt', + 'logical', + 'yes', + 'Boolean', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'TRUE indicates that nonpublic management notes pertaining to this plot exist in "vegPlot.note"', + + ' observation Observation notesMgt Notes Mgt logical Boolean n/a n/a no n/a TRUE indicates that nonpublic management notes pertaining to this plot exist in "vegPlot.note" ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'observation', + 'revisions', + 'Revisions', + 'logical', + 'yes', + 'Boolean', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'TRUE indicates that revisions exist in vegPlot.Revision', + + ' observation Observation revisions Revisions logical Boolean n/a n/a no n/a TRUE indicates that revisions exist in vegPlot.Revision ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'observation', + 'emb_observation', + 'this row embargoed.', + 'denorm', + 'yes', + 'Integer', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'This value mimics the default embargo value for the plot that this record belongs to.', + + ' observation Observation emb_observation this row embargoed. denorm Integer n/a n/a no n/a This value mimics the default embargo value for the plot that this record belongs to. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'observation', + 'interp_orig_ci_ID', + 'Original commInterpret ID', + 'denorm', + 'yes', + 'Integer', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'The first community interpretation ID where the plot was assigned to a community.', + + ' observation Observation interp_orig_ci_ID Original commInterpret ID denorm Integer n/a n/a no n/a The first community interpretation ID where the plot was assigned to a community. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'observation', + 'interp_orig_cc_ID', + 'CommConcept_ID', + 'denorm', + 'yes', + 'Integer', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'the Comm Concept_ID for this Interpretation.', + + ' observation Observation interp_orig_cc_ID CommConcept_ID denorm Integer n/a n/a no n/a the Comm Concept_ID for this Interpretation. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'observation', + 'interp_orig_sciname', + 'Scientific Name of Community.', + 'denorm', + 'yes', + 'text', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'The Scientific Name for this Comm Concept', + + ' observation Observation interp_orig_sciname Scientific Name of Community. denorm text n/a n/a no n/a The Scientific Name for this Comm Concept ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'observation', + 'interp_orig_code', + 'CEGL-type code of Community.', + 'denorm', + 'yes', + 'text', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'The CEGL type code for this Comm Concept.', + + ' observation Observation interp_orig_code CEGL-type code of Community. denorm text n/a n/a no n/a The CEGL type code for this Comm Concept. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'observation', + 'interp_orig_party_id', + 'Party_ID of classifier.', + 'denorm', + 'yes', + 'Integer', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'The Party_ID of the classifier.', + + ' observation Observation interp_orig_party_id Party_ID of classifier. denorm Integer n/a n/a no n/a The Party_ID of the classifier. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'observation', + 'interp_orig_partyname', + 'Classifier.', + 'denorm', + 'yes', + 'text', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'The Name of the classifier.', + + ' observation Observation interp_orig_partyname Classifier. denorm text n/a n/a no n/a The Name of the classifier. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'observation', + 'interp_current_ci_ID', + 'Most Recent Classification commInterp ID', + 'denorm', + 'yes', + 'Integer', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'The most recent community interpretation of the plot.', + + ' observation Observation interp_current_ci_ID Most Recent Classification commInterp ID denorm Integer n/a n/a no n/a The most recent community interpretation of the plot. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'observation', + 'interp_current_cc_ID', + 'CommConcept_ID', + 'denorm', + 'yes', + 'Integer', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'the Comm Concept_ID for this Interpretation.', + + ' observation Observation interp_current_cc_ID CommConcept_ID denorm Integer n/a n/a no n/a the Comm Concept_ID for this Interpretation. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'observation', + 'interp_current_sciname', + 'Scientific Name of Community.', + 'denorm', + 'yes', + 'text', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'The Scientific Name for this Comm Concept', + + ' observation Observation interp_current_sciname Scientific Name of Community. denorm text n/a n/a no n/a The Scientific Name for this Comm Concept ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'observation', + 'interp_current_code', + 'CEGL-type code of Community.', + 'denorm', + 'yes', + 'text', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'The CEGL type code for this Comm Concept.', + + ' observation Observation interp_current_code CEGL-type code of Community. denorm text n/a n/a no n/a The CEGL type code for this Comm Concept. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'observation', + 'interp_current_party_id', + 'Party_ID of classifier.', + 'denorm', + 'yes', + 'Integer', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'The Party_ID of the classifier.', + + ' observation Observation interp_current_party_id Party_ID of classifier. denorm Integer n/a n/a no n/a The Party_ID of the classifier. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'observation', + 'interp_current_partyname', + 'Classifier.', + 'denorm', + 'yes', + 'text', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'The Name of the classifier.', + + ' observation Observation interp_current_partyname Classifier. denorm text n/a n/a no n/a The Name of the classifier. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'observation', + 'interp_bestfit_ci_ID', + 'Best Fit commInterp ID', + 'denorm', + 'yes', + 'Integer', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'The best fit, confidence pattern community interpretation ID.', + + ' observation Observation interp_bestfit_ci_ID Best Fit commInterp ID denorm Integer n/a n/a no n/a The best fit, confidence pattern community interpretation ID. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'observation', + 'interp_bestfit_cc_ID', + 'CommConcept_ID', + 'denorm', + 'yes', + 'Integer', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'the Comm Concept_ID for this Interpretation.', + + ' observation Observation interp_bestfit_cc_ID CommConcept_ID denorm Integer n/a n/a no n/a the Comm Concept_ID for this Interpretation. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'observation', + 'interp_bestfit_sciname', + 'Scientific Name of Community.', + 'denorm', + 'yes', + 'text', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'The Scientific Name for this Comm Concept', + + ' observation Observation interp_bestfit_sciname Scientific Name of Community. denorm text n/a n/a no n/a The Scientific Name for this Comm Concept ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'observation', + 'interp_bestfit_code', + 'CEGL-type code of Community.', + 'denorm', + 'yes', + 'text', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'The CEGL type code for this Comm Concept.', + + ' observation Observation interp_bestfit_code CEGL-type code of Community. denorm text n/a n/a no n/a The CEGL type code for this Comm Concept. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'observation', + 'interp_bestfit_party_id', + 'Party_ID of classifier.', + 'denorm', + 'yes', + 'Integer', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'The Party_ID of the classifier.', + + ' observation Observation interp_bestfit_party_id Party_ID of classifier. denorm Integer n/a n/a no n/a The Party_ID of the classifier. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'observation', + 'interp_bestfit_partyname', + 'Classifier.', + 'denorm', + 'yes', + 'text', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'The Name of the classifier.', + + ' observation Observation interp_bestfit_partyname Classifier. denorm text n/a n/a no n/a The Name of the classifier. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'observation', + 'topTaxon1Name', + 'Top Taxon #1', + 'denorm', + 'yes', + 'varchar (255)', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'Name of the highest cover taxon on the plot, ignoring strata.', + + ' observation Observation topTaxon1Name Top Taxon #1 denorm varchar (255) n/a n/a no n/a Name of the highest cover taxon on the plot, ignoring strata. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'observation', + 'topTaxon2Name', + 'Top Taxon #2', + 'denorm', + 'yes', + 'varchar (255)', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'Name of the 2nd highest cover taxon on the plot, ignoring strata.', + + ' observation Observation topTaxon2Name Top Taxon #2 denorm varchar (255) n/a n/a no n/a Name of the 2nd highest cover taxon on the plot, ignoring strata. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'observation', + 'topTaxon3Name', + 'Top Taxon #3', + 'denorm', + 'yes', + 'varchar (255)', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'Name of the 3rd highest cover taxon on the plot, ignoring strata.', + + ' observation Observation topTaxon3Name Top Taxon #3 denorm varchar (255) n/a n/a no n/a Name of the 3rd highest cover taxon on the plot, ignoring strata. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'observation', + 'topTaxon4Name', + 'Top Taxon #4', + 'denorm', + 'yes', + 'varchar (255)', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'Name of the 4th highest cover taxon on the plot, ignoring strata.', + + ' observation Observation topTaxon4Name Top Taxon #4 denorm varchar (255) n/a n/a no n/a Name of the 4th highest cover taxon on the plot, ignoring strata. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'observation', + 'topTaxon5Name', + 'Top Taxon #5', + 'denorm', + 'yes', + 'varchar (255)', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'Name of the 5th highest cover taxon on the plot, ignoring strata.', + + ' observation Observation topTaxon5Name Top Taxon #5 denorm varchar (255) n/a n/a no n/a Name of the 5th highest cover taxon on the plot, ignoring strata. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'observation', + 'hasObservationSynonym', + 'Has Synonym Observation', + 'denorm', + 'yes', + 'Boolean', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'Denormalized field to show if there is an observation synonym in the observationSynonym table for this observation.', + + ' observation Observation hasObservationSynonym Has Synonym Observation denorm Boolean n/a n/a no n/a Denormalized field to show if there is an observation synonym in the observationSynonym table for this observation. ' + + ); + + + INSERT INTO dba_tableDescription ( tableName , tableLabel , tableNotes , tableDescription , tableKeywords ) values ( + 'observationContributor', + 'Observation Contributor', + 'This table stores information about which parties contributed to specific plot observation events.', + 'This table serves as an intersection that links a party with a specific plot observation event. Note that there is no plotContributor table because all contributions take place at a particular observation, such as the first observation.', + ' observationContributor Observation Contributor This table stores information about which parties contributed to specific plot observation events. This table serves as an intersection that links a party with a specific plot observation event. Note that there is no plotContributor table because all contributions take place at a particular observation, such as the first observation. OBSERVATIONCONTRIBUTOR_ID ID OBSERVATION_ID Observation PARTY_ID Party ROLE_ID Role contributionDate Contribution Date ' + ); + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'observationContributor', + 'OBSERVATIONCONTRIBUTOR_ID', + 'ID', + 'logical', + 'yes', + 'serial', + 'PK', + 'n/a', + 'no', + 'n/a', + 'Database generated identifier assigned to each unique contribution to an observation event.', + + ' observationContributor Observation Contributor OBSERVATIONCONTRIBUTOR_ID ID logical serial PK n/a no n/a Database generated identifier assigned to each unique contribution to an observation event. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'observationContributor', + 'OBSERVATION_ID', + 'Observation', + 'logical', + 'no', + 'Integer', + 'FK', + 'observation.OBSERVATION_ID', + 'no', + 'This is the foreign key into the Observation table.', + 'Foreign key pointing to a given plot observation event to which the contribution was made.', + + ' observationContributor Observation Contributor OBSERVATION_ID Observation logical required Integer FK observation.OBSERVATION_ID no This is the foreign key into the Observation table. Foreign key pointing to a given plot observation event to which the contribution was made. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'observationContributor', + 'PARTY_ID', + 'Party', + 'logical', + 'no', + 'Integer', + 'FK', + 'party.PARTY_ID', + 'no', + 'This is the foreign key into the party table.', + 'Foreign key pointing to the specific party that made the contribution.', + + ' observationContributor Observation Contributor PARTY_ID Party logical required Integer FK party.PARTY_ID no This is the foreign key into the party table. Foreign key pointing to the specific party that made the contribution. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'observationContributor', + 'ROLE_ID', + 'Role', + 'logical', + 'no', + 'Integer', + 'FK', + 'aux_Role.ROLE_ID', + 'no', + 'This is the foreign key into the aux_Role table', + 'Foreign key that identifies the role that the party had in the plot observation (e.g., PI, contact, research advisor, field assistant, taxonomist, owner, guide, etc.).', + + ' observationContributor Observation Contributor ROLE_ID Role logical required Integer FK aux_Role.ROLE_ID no This is the foreign key into the aux_Role table Foreign key that identifies the role that the party had in the plot observation (e.g., PI, contact, research advisor, field assistant, taxonomist, owner, guide, etc.). ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'observationContributor', + 'contributionDate', + 'Contribution Date', + 'logical', + 'yes', + 'Date', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'The date of the specific contribution, which will generally be within the time span of the plot observation event defined by the obsStartDate and obsStopDate', + + ' observationContributor Observation Contributor contributionDate Contribution Date logical Date n/a n/a no n/a The date of the specific contribution, which will generally be within the time span of the plot observation event defined by the obsStartDate and obsStopDate ' + + ); + + + INSERT INTO dba_tableDescription ( tableName , tableLabel , tableNotes , tableDescription , tableKeywords ) values ( + 'observationSynonym', + 'Observation Synonym', + 'This table stores opinions as to whether one observation record is a synonym of another owing to double entry into the database.', + null, + ' observationSynonym Observation Synonym This table stores opinions as to whether one observation record is a synonym of another owing to double entry into the database. OBSERVATIONSYNONYM_ID ID synonymObservation_ID Synonym Observation primaryObservation_ID Primary Observation PARTY_ID Party ROLE_ID Role classStartDate Start Date classStopDate Stop Date synonymComment Synonym Comment accessionCode Accession Code ' + ); + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'observationSynonym', + 'OBSERVATIONSYNONYM_ID', + 'ID', + 'logical', + 'yes', + 'serial', + 'PK', + 'n/a', + 'no', + 'Primary Key for the observationSynonym table.', + 'Database generated identifier assigned to each unique interpretation of an observation as a synonym.', + + ' observationSynonym Observation Synonym OBSERVATIONSYNONYM_ID ID logical serial PK n/a no Primary Key for the observationSynonym table. Database generated identifier assigned to each unique interpretation of an observation as a synonym. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'observationSynonym', + 'synonymObservation_ID', + 'Synonym Observation', + 'logical', + 'no', + 'Integer', + 'FK', + 'observation.OBSERVATION_ID', + 'no', + 'Foreign key into the observation table', + 'Link to the observation table identifying which observation is being reduced to synonymy.', + + ' observationSynonym Observation Synonym synonymObservation_ID Synonym Observation logical required Integer FK observation.OBSERVATION_ID no Foreign key into the observation table Link to the observation table identifying which observation is being reduced to synonymy. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'observationSynonym', + 'primaryObservation_ID', + 'Primary Observation', + 'logical', + 'no', + 'Integer', + 'FK', + 'observation.OBSERVATION_ID', + 'no', + 'Foreign key into the observation table', + 'Link to the observation table identifying which observation is the preferred synonym for the observation being reduced to synonym.', + + ' observationSynonym Observation Synonym primaryObservation_ID Primary Observation logical required Integer FK observation.OBSERVATION_ID no Foreign key into the observation table Link to the observation table identifying which observation is the preferred synonym for the observation being reduced to synonym. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'observationSynonym', + 'PARTY_ID', + 'Party', + 'logical', + 'no', + 'Integer', + 'FK', + 'party.PARTY_ID', + 'no', + 'This is the foreign key into the party table.', + 'Foreign key pointing to the specific party that made the reduction to synonym.', + + ' observationSynonym Observation Synonym PARTY_ID Party logical required Integer FK party.PARTY_ID no This is the foreign key into the party table. Foreign key pointing to the specific party that made the reduction to synonym. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'observationSynonym', + 'ROLE_ID', + 'Role', + 'logical', + 'no', + 'Integer', + 'FK', + 'aux_Role.ROLE_ID', + 'no', + 'This is the foreign key into the aux_Role table', + 'Foreign key that identifies the role that the party had in the plot synonomization (e.g., plot author, data manager, publication author, researcher, generic user, etc.).', + + ' observationSynonym Observation Synonym ROLE_ID Role logical required Integer FK aux_Role.ROLE_ID no This is the foreign key into the aux_Role table Foreign key that identifies the role that the party had in the plot synonomization (e.g., plot author, data manager, publication author, researcher, generic user, etc.). ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'observationSynonym', + 'classStartDate', + 'Start Date', + 'logical', + 'no', + 'Date', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'Start date for the synonymization event.', + + ' observationSynonym Observation Synonym classStartDate Start Date logical required Date n/a n/a no n/a Start date for the synonymization event. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'observationSynonym', + 'classStopDate', + 'Stop Date', + 'logical', + 'yes', + 'Date', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'Stop date for the synonymization event.', + + ' observationSynonym Observation Synonym classStopDate Stop Date logical Date n/a n/a no n/a Stop date for the synonymization event. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'observationSynonym', + 'synonymComment', + 'Synonym Comment', + 'logical', + 'yes', + 'text', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'Notes about the reason for the synonymization.', + + ' observationSynonym Observation Synonym synonymComment Synonym Comment logical text n/a n/a no n/a Notes about the reason for the synonymization. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'observationSynonym', + 'accessionCode', + 'Accession Code', + 'logical', + 'yes', + 'varchar (255)', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'Code that uniquely references this record, allowing reference to this record for this version of this database. Better than a primary key, which is automatically generated by a database and not globally unique. VegBank Accession codes are only generated by VegBank, and therefore data integrity can be guaranteed, unlike with a primary key (number).', + + ' observationSynonym Observation Synonym accessionCode Accession Code logical varchar (255) n/a n/a no n/a Code that uniquely references this record, allowing reference to this record for this version of this database. Better than a primary key, which is automatically generated by a database and not globally unique. VegBank Accession codes are only generated by VegBank, and therefore data integrity can be guaranteed, unlike with a primary key (number). ' + + ); + + + INSERT INTO dba_tableDescription ( tableName , tableLabel , tableNotes , tableDescription , tableKeywords ) values ( + 'party', + 'Party', + 'Party contributing to collection or interpretation of a plot; may be either an individual or an organization.', + null, + ' party Party Party contributing to collection or interpretation of a plot; may be either an individual or an organization. PARTY_ID ID salutation Salutation givenName Given Name middleName Middle Name surName Surname organizationName Organization Name currentName_ID Current Name contactInstructions Contact Instructions email Email accessionCode Accession Code partyType Party Type partyPublic Party is public? d_obscount Plot Count ' + ); + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'party', + 'PARTY_ID', + 'ID', + 'logical', + 'yes', + 'serial', + 'PK', + 'n/a', + 'no', + 'Primary key for the party table.', + 'Database generated identifier assigned to each unique party.', + + ' party Party PARTY_ID ID logical serial PK n/a no Primary key for the party table. Database generated identifier assigned to each unique party. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'party', + 'salutation', + 'Salutation', + 'logical', + 'yes', + 'varchar (20)', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'Salutation preceding one''s given name.', + + ' party Party salutation Salutation logical varchar (20) n/a n/a no n/a Salutation preceding one''s given name. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'party', + 'givenName', + 'Given Name', + 'logical', + 'yes', + 'varchar (50)', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'One''s first name.', + + ' party Party givenName Given Name logical varchar (50) n/a n/a no n/a One''s first name. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'party', + 'middleName', + 'Middle Name', + 'logical', + 'yes', + 'varchar (50)', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'One''s middle name or initial, if any.', + + ' party Party middleName Middle Name logical varchar (50) n/a n/a no n/a One''s middle name or initial, if any. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'party', + 'surName', + 'Surname', + 'logical', + 'yes', + 'varchar (50)', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'Name shared in common to identify the members of a family, as distinguished from each member''s given name.', + + ' party Party surName Surname logical varchar (50) n/a n/a no n/a Name shared in common to identify the members of a family, as distinguished from each member''s given name. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'party', + 'organizationName', + 'Organization Name', + 'logical', + 'yes', + 'varchar (100)', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'Name of an organization.', + + ' party Party organizationName Organization Name logical varchar (100) n/a n/a no n/a Name of an organization. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'party', + 'currentName_ID', + 'Current Name', + 'logical', + 'yes', + 'Integer', + 'FK', + 'party.PARTY_ID', + 'no', + 'n/a', + 'Recursive foreign key to current name of this party.', + + ' party Party currentName_ID Current Name logical Integer FK party.PARTY_ID no n/a Recursive foreign key to current name of this party. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'party', + 'contactInstructions', + 'Contact Instructions', + 'logical', + 'yes', + 'text', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'Instructions for contacting a party.', + + ' party Party contactInstructions Contact Instructions logical text n/a n/a no n/a Instructions for contacting a party. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'party', + 'email', + 'Email', + 'implementation', + 'yes', + 'varchar (120)', + 'n/a', + 'n/a', + 'no', + null, + null, + + ' party Party email Email implementation varchar (120) n/a n/a no ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'party', + 'accessionCode', + 'Accession Code', + 'logical', + 'yes', + 'varchar (255)', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'Code that uniquely references this record, allowing reference to this record for this version of this database. Better than a primary key, which is automatically generated by a database and not globally unique. VegBank Accession codes are only generated by VegBank, and therefore data integrity can be guaranteed, unlike with a primary key (number).', + + ' party Party accessionCode Accession Code logical varchar (255) n/a n/a no n/a Code that uniquely references this record, allowing reference to this record for this version of this database. Better than a primary key, which is automatically generated by a database and not globally unique. VegBank Accession codes are only generated by VegBank, and therefore data integrity can be guaranteed, unlike with a primary key (number). ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'party', + 'partyType', + 'Party Type', + 'logical', + 'yes', + 'varchar (40)', + 'n/a', + 'n/a', + 'closed', + 'n/a', + 'The type of party this is.', + + ' party Party partyType Party Type logical varchar (40) n/a n/a closed n/a The type of party this is. user a private user of vegbank- party info not to be exported or displayed person a person team a group of persons, but not a whole organization organization an entire organization consortium a group of organizations ' + + ); + + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'party', + 'partyType', + 'user', + 'a private user of vegbank- party info not to be exported or displayed', + '1' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'party', + 'partyType', + 'person', + 'a person', + '2' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'party', + 'partyType', + 'team', + 'a group of persons, but not a whole organization', + '3' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'party', + 'partyType', + 'organization', + 'an entire organization', + '4' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'party', + 'partyType', + 'consortium', + 'a group of organizations', + '5' + ); + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'party', + 'partyPublic', + 'Party is public?', + 'denorm', + 'yes', + 'Boolean', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'This party may be displayed on the website. Not used for parties that are not contributing anywhere and have only signed up as users.', + + ' party Party partyPublic Party is public? denorm Boolean n/a n/a no n/a This party may be displayed on the website. Not used for parties that are not contributing anywhere and have only signed up as users. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'party', + 'd_obscount', + 'Plot Count', + 'denorm', + 'yes', + 'Integer', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'Number of observations associated with this entity.', + + ' party Party d_obscount Plot Count denorm Integer n/a n/a no n/a Number of observations associated with this entity. ' + + ); + + + INSERT INTO dba_tableDescription ( tableName , tableLabel , tableNotes , tableDescription , tableKeywords ) values ( + 'partyMember', + 'Party Member', + 'Allows parties to contain other parties within them, so that the children parties can have permissions of the parent parties.', + 'not implemented', + ' partyMember Party Member Allows parties to contain other parties within them, so that the children parties can have permissions of the parent parties. not implemented partyMember_ID Party Member ID parentParty_ID Main Party childParty_ID Sub-Party role_ID Role memberStart Member Start memberStop Member Stop ' + ); + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'partyMember', + 'partyMember_ID', + 'Party Member ID', + 'logical', + 'no', + 'serial', + 'PK', + 'n/a', + 'no', + 'n/a', + 'Database generated number to uniquely identify this record of this table.', + + ' partyMember Party Member partyMember_ID Party Member ID logical required serial PK n/a no n/a Database generated number to uniquely identify this record of this table. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'partyMember', + 'parentParty_ID', + 'Main Party', + 'logical', + 'no', + 'Integer', + 'FK', + 'party.PARTY_ID', + 'no', + 'n/a', + 'Link to the parent party to whom the child party here belongs.', + + ' partyMember Party Member parentParty_ID Main Party logical required Integer FK party.PARTY_ID no n/a Link to the parent party to whom the child party here belongs. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'partyMember', + 'childParty_ID', + 'Sub-Party', + 'logical', + 'no', + 'Integer', + 'FK', + 'party.PARTY_ID', + 'no', + 'n/a', + 'Link to the child party who belongs to the parent listed in parentParty_ID.', + + ' partyMember Party Member childParty_ID Sub-Party logical required Integer FK party.PARTY_ID no n/a Link to the child party who belongs to the parent listed in parentParty_ID. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'partyMember', + 'role_ID', + 'Role', + 'logical', + 'yes', + 'Integer', + 'FK', + 'aux_Role.ROLE_ID', + 'no', + 'n/a', + 'Link to the role which defines the child''s role in the parent party.', + + ' partyMember Party Member role_ID Role logical Integer FK aux_Role.ROLE_ID no n/a Link to the role which defines the child''s role in the parent party. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'partyMember', + 'memberStart', + 'Member Start', + 'logical', + 'no', + 'Date', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'Start date for the child''s membership in the parent party.', + + ' partyMember Party Member memberStart Member Start logical required Date n/a n/a no n/a Start date for the child''s membership in the parent party. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'partyMember', + 'memberStop', + 'Member Stop', + 'logical', + 'yes', + 'Date', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'Stop date for the child''s membership in the parent party.', + + ' partyMember Party Member memberStop Member Stop logical Date n/a n/a no n/a Stop date for the child''s membership in the parent party. ' + + ); + + + INSERT INTO dba_tableDescription ( tableName , tableLabel , tableNotes , tableDescription , tableKeywords ) values ( + 'place', + 'Place', + 'This table is the intersection between the plot table and the namedPlace table and is used for querying for plots located in a named place or named region in which a plot or group of plots is located.', + null, + ' place Place This table is the intersection between the plot table and the namedPlace table and is used for querying for plots located in a named place or named region in which a plot or group of plots is located. PLOTPLACE_ID ID PLOT_ID Plot calculated Calculated? NAMEDPLACE_ID Place Name ' + ); + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'place', + 'PLOTPLACE_ID', + 'ID', + 'logical', + 'yes', + 'serial', + 'PK', + 'n/a', + 'no', + 'Primary key for the place table', + 'Database generated identifier assigned to each unique plot occurrence at a place.', + + ' place Place PLOTPLACE_ID ID logical serial PK n/a no Primary key for the place table Database generated identifier assigned to each unique plot occurrence at a place. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'place', + 'PLOT_ID', + 'Plot', + 'logical', + 'no', + 'Integer', + 'FK', + 'plot.PLOT_ID', + 'no', + 'Foreign key into the plot table.', + 'Link to a specific plot.', + + ' place Place PLOT_ID Plot logical required Integer FK plot.PLOT_ID no Foreign key into the plot table. Link to a specific plot. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'place', + 'calculated', + 'Calculated?', + 'logical', + 'yes', + 'Boolean', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'TRUE If occurrence is calculated based on geo-coordinates, FALSE if assigned by the author (If, both methods used, the author assigned value takes priority).', + + ' place Place calculated Calculated? logical Boolean n/a n/a no n/a TRUE If occurrence is calculated based on geo-coordinates, FALSE if assigned by the author (If, both methods used, the author assigned value takes priority). ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'place', + 'NAMEDPLACE_ID', + 'Place Name', + 'logical', + 'no', + 'Integer', + 'FK', + 'namedPlace.NAMEDPLACE_ID', + 'no', + 'Foreign key into the namedPlace table', + 'Link to a specific named place or region', + + ' place Place NAMEDPLACE_ID Place Name logical required Integer FK namedPlace.NAMEDPLACE_ID no Foreign key into the namedPlace table Link to a specific named place or region ' + + ); + + + INSERT INTO dba_tableDescription ( tableName , tableLabel , tableNotes , tableDescription , tableKeywords ) values ( + 'plot', + 'Plot', + 'This table stores general, constant information about the a given plot', + 'plot contains Plot location, dimension, and similarly constant site data, plus metadata that need be stored only once. Transient observational information (procured during the first or subsequent observation events) are stored separately in observation or its children.', + ' plot Plot This table stores general, constant information about the a given plot plot contains Plot location, dimension, and similarly constant site data, plus metadata that need be stored only once. Transient observational information (procured during the first or subsequent observation events) are stored separately in observation or its children. PLOT_ID ID authorPlotCode Author Plot Code reference_ID Reference PARENT_ID Parent realLatitude Real Latitude realLongitude Real Longitude locationAccuracy Location Accuracy confidentialityStatus Confidentiality Status confidentialityReason Confidentiality Reason latitude Latitude longitude Longitude authorE Author E authorN Author N authorZone Author Zone authorDatum Author Datum authorLocation Author Location locationNarrative Location Narrative plotRationaleNarrative Plot Rationale Narrative azimuth Azimuth dsgpoly DSG Polygon shape Shape area Area standSize Stand Size placementMethod Placement Method permanence Permanence layoutNarrative Layout Narrative elevation Elevation elevationAccuracy Elevation Accuracy elevationRange Elevation Range slopeAspect Slope Aspect minSlopeAspect Min Slope Aspect maxSlopeAspect Max Slope Aspect slopeGradient Slope Gradient minSlopeGradient Min Slope Gradient maxSlopeGradient Max Slope Gradient topoPosition Topographic Position landform Landform surficialDeposits Surficial Deposits rockType Rock Type stateProvince State or Province country Country dateentered Date Entered submitter_surname Submitter_surname submitter_givenname Submitter_givenname submitter_email Submitter_email accessionCode Accession Code notesPublic Notes Public notesMgt Notes Mgt revisions Revisions emb_plot this row embargoed. ' + ); + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'plot', + 'PLOT_ID', + 'ID', + 'logical', + 'yes', + 'serial', + 'PK', + 'n/a', + 'no', + 'Primary key for plot', + 'Database generated identifier assigned to each unique plot.', + + ' plot Plot PLOT_ID ID logical serial PK n/a no Primary key for plot Database generated identifier assigned to each unique plot. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'plot', + 'authorPlotCode', + 'Author Plot Code', + 'logical', + 'no', + 'varchar (30)', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'Author''s Plot number/code, or the original plot number if taken from literature.', + + ' plot Plot authorPlotCode Author Plot Code logical required varchar (30) n/a n/a no n/a Author''s Plot number/code, or the original plot number if taken from literature. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'plot', + 'reference_ID', + 'Reference', + 'logical', + 'yes', + 'Integer', + 'FK', + 'reference.reference_ID', + 'no', + 'Foreign key into the reference table', + 'Link to the source reference from which this plot record was taken', + + ' plot Plot reference_ID Reference logical Integer FK reference.reference_ID no Foreign key into the reference table Link to the source reference from which this plot record was taken ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'plot', + 'PARENT_ID', + 'Parent', + 'logical', + 'yes', + 'Integer', + 'FK', + 'plot.PLOT_ID', + 'no', + 'Recursive foreign key', + 'Link to the parent plot when plot is nested within another plot.', + + ' plot Plot PARENT_ID Parent logical Integer FK plot.PLOT_ID no Recursive foreign key Link to the parent plot when plot is nested within another plot. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'plot', + 'realLatitude', + 'Real Latitude', + 'logical', + 'yes', + 'Float', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'Latitude of the plot origin in degrees and decimals, datum =WGS84', + + ' plot Plot realLatitude Real Latitude logical Float n/a n/a no n/a Latitude of the plot origin in degrees and decimals, datum =WGS84 ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'plot', + 'realLongitude', + 'Real Longitude', + 'logical', + 'yes', + 'Float', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'Longitude of the plot origin in degrees and decimals, datum = WGS84', + + ' plot Plot realLongitude Real Longitude logical Float n/a n/a no n/a Longitude of the plot origin in degrees and decimals, datum = WGS84 ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'plot', + 'locationAccuracy', + 'Location Accuracy', + 'logical', + 'yes', + 'Float', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'Estimated accuracy of the location of the plot. Plot origin has a 95% or greater probability of being within this many meters of the reported location.', + + ' plot Plot locationAccuracy Location Accuracy logical Float n/a n/a no n/a Estimated accuracy of the location of the plot. Plot origin has a 95% or greater probability of being within this many meters of the reported location. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'plot', + 'confidentialityStatus', + 'Confidentiality Status', + 'logical', + 'no', + 'Integer', + 'n/a', + 'n/a', + 'closed', + 'closed list, default=0', + 'Are the data to be considered confidential? 0=no, 1= 1km radius, 2=10km radius, 3=100km radius, 4=location embargo, 5=public embargo on all plot data, 6=full embargo on all plot data. This applies also to region.', + + ' plot Plot confidentialityStatus Confidentiality Status logical required Integer n/a n/a closed closed list, default=0 Are the data to be considered confidential? 0=no, 1= 1km radius, 2=10km radius, 3=100km radius, 4=location embargo, 5=public embargo on all plot data, 6=full embargo on all plot data. This applies also to region. 0 Public 1 1 km radius (nearest 0.01 degree) 2 10 km radius (nearest 0.1 degree) 3 100 km radius (nearest degree) 4 Location embargo 5 Public embargo on data 6 Full embargo on data ' + + ); + + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'confidentialityStatus', + '0', + 'Public', + '1' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'confidentialityStatus', + '1', + '1 km radius (nearest 0.01 degree)', + '2' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'confidentialityStatus', + '2', + '10 km radius (nearest 0.1 degree)', + '3' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'confidentialityStatus', + '3', + '100 km radius (nearest degree)', + '4' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'confidentialityStatus', + '4', + 'Location embargo', + '5' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'confidentialityStatus', + '5', + 'Public embargo on data', + '6' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'confidentialityStatus', + '6', + 'Full embargo on data', + '7' + ); + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'plot', + 'confidentialityReason', + 'Confidentiality Reason', + 'logical', + 'yes', + 'varchar (200)', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'The reason for confidentiality. This field should not be open to public view. Reasons might include specific rare species, ownership, prepublication embargo, or many other reason', + + ' plot Plot confidentialityReason Confidentiality Reason logical varchar (200) n/a n/a no n/a The reason for confidentiality. This field should not be open to public view. Reasons might include specific rare species, ownership, prepublication embargo, or many other reason ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'plot', + 'latitude', + 'Latitude', + 'logical', + 'yes', + 'Float', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'Latitude of the plot origin in degrees and decimals, datum =WGS84, fuzzing applied', + + ' plot Plot latitude Latitude logical Float n/a n/a no n/a Latitude of the plot origin in degrees and decimals, datum =WGS84, fuzzing applied ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'plot', + 'longitude', + 'Longitude', + 'logical', + 'yes', + 'Float', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'Longitude of the plot origin in degrees and decimals, datum = WGS84, fuzzing applied', + + ' plot Plot longitude Longitude logical Float n/a n/a no n/a Longitude of the plot origin in degrees and decimals, datum = WGS84, fuzzing applied ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'plot', + 'authorE', + 'Author E', + 'logical', + 'yes', + 'varchar (20)', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'Original E-W coordinate as recorded by the author', + + ' plot Plot authorE Author E logical varchar (20) n/a n/a no n/a Original E-W coordinate as recorded by the author ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'plot', + 'authorN', + 'Author N', + 'logical', + 'yes', + 'varchar (20)', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'Original N-S coordinate as recorded by the author', + + ' plot Plot authorN Author N logical varchar (20) n/a n/a no n/a Original N-S coordinate as recorded by the author ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'plot', + 'authorZone', + 'Author Zone', + 'logical', + 'yes', + 'varchar (20)', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'Original UTM zone reported by the author', + + ' plot Plot authorZone Author Zone logical varchar (20) n/a n/a no n/a Original UTM zone reported by the author ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'plot', + 'authorDatum', + 'Author Datum', + 'logical', + 'yes', + 'varchar (20)', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'Original datum reported by the author', + + ' plot Plot authorDatum Author Datum logical varchar (20) n/a n/a no n/a Original datum reported by the author ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'plot', + 'authorLocation', + 'Author Location', + 'logical', + 'yes', + 'varchar (200)', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'Original location as described by author (e.g. Town-Range-Section)', + + ' plot Plot authorLocation Author Location logical varchar (200) n/a n/a no n/a Original location as described by author (e.g. Town-Range-Section) ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'plot', + 'locationNarrative', + 'Location Narrative', + 'logical', + 'yes', + 'text', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'Text description that provides information useful for plot relocation.', + + ' plot Plot locationNarrative Location Narrative logical text n/a n/a no n/a Text description that provides information useful for plot relocation. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'plot', + 'plotRationaleNarrative', + 'Plot Rationale Narrative', + 'logical', + 'yes', + 'text', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'Text description about why the plot was placed where it was.', + + ' plot Plot plotRationaleNarrative Plot Rationale Narrative logical text n/a n/a no n/a Text description about why the plot was placed where it was. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'plot', + 'azimuth', + 'Azimuth', + 'logical', + 'yes', + 'Float', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'This element stores the azimuth of the x-axis used to describe the relative coordinate system for plot shape (dsgpoly) and other spatial information about the plot. Typically the azimuth is parallel to the long axis of the plot (in the case of a rectangle).', + + ' plot Plot azimuth Azimuth logical Float n/a n/a no n/a This element stores the azimuth of the x-axis used to describe the relative coordinate system for plot shape (dsgpoly) and other spatial information about the plot. Typically the azimuth is parallel to the long axis of the plot (in the case of a rectangle). ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'plot', + 'dsgpoly', + 'DSG Polygon', + 'logical', + 'yes', + 'text', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'This field is a text string containing the points circumscribing a plot area. These points are anticipated to have been collected using tapes, GPS, or calculated from the plot shape and area. Points are X-Y coordinates in m relative to plot origin.', + + ' plot Plot dsgpoly DSG Polygon logical text n/a n/a no n/a This field is a text string containing the points circumscribing a plot area. These points are anticipated to have been collected using tapes, GPS, or calculated from the plot shape and area. Points are X-Y coordinates in m relative to plot origin. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'plot', + 'shape', + 'Shape', + 'logical', + 'yes', + 'varchar (50)', + 'n/a', + 'n/a', + 'open', + 'open list', + 'Shape of the plot area.', + + ' plot Plot shape Shape logical varchar (50) n/a n/a open open list Shape of the plot area. Circle Diffuse Plotless Rectangular Square Transect/Strip Other ' + + ); + + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'shape', + 'Rectangular', + null, + '1' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'shape', + 'Square', + null, + '2' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'shape', + 'Circle', + null, + '3' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'shape', + 'Transect/Strip', + null, + '4' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'shape', + 'Plotless', + null, + '5' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'shape', + 'Diffuse', + null, + '6' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'shape', + 'Other', + null, + '7' + ); + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'plot', + 'area', + 'Area', + 'logical', + 'yes', + 'Float', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'Total area of the plot in m2. If many subplots, this area includes the subplots and the interstitial space. RESERVED VALUE: -1 is used to indicate that the plot had no boundaries.', + + ' plot Plot area Area logical Float n/a n/a no n/a Total area of the plot in m2. If many subplots, this area includes the subplots and the interstitial space. RESERVED VALUE: -1 is used to indicate that the plot had no boundaries. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'plot', + 'standSize', + 'Stand Size', + 'logical', + 'yes', + 'varchar (50)', + 'n/a', + 'n/a', + 'closed', + 'closed list', + 'The extent of this community occurrence in relation to the plot size: very extensive (>1000x plot), extensive (>100x plot), large (10-100x plot), small (3-10x plot), very small (1-3x plot).', + + ' plot Plot standSize Stand Size logical varchar (50) n/a n/a closed closed list The extent of this community occurrence in relation to the plot size: very extensive (>1000x plot), extensive (>100x plot), large (10-100x plot), small (3-10x plot), very small (1-3x plot). Extensive greater than 100x plot size Large 10-100x plot size Small 3-10x plot size Very Extensive greater than 1000x plot size Very small 1-3x plot size Inclusion less than 1x plot size ' + + ); + + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'standSize', + 'Very Extensive', + 'greater than 1000x plot size', + '1' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'standSize', + 'Extensive', + 'greater than 100x plot size', + '2' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'standSize', + 'Large', + '10-100x plot size', + '3' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'standSize', + 'Small', + '3-10x plot size', + '4' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'standSize', + 'Very small', + '1-3x plot size', + '5' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'standSize', + 'Inclusion', + 'less than 1x plot size', + '6' + ); + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'plot', + 'placementMethod', + 'Placement Method', + 'logical', + 'yes', + 'varchar (50)', + 'n/a', + 'n/a', + 'closed', + 'closed list', + 'Brief description of strategy for determining plot placement within the stand.', + + ' plot Plot placementMethod Placement Method logical varchar (50) n/a n/a closed closed list Brief description of strategy for determining plot placement within the stand. Capture specific feature Random Regular Representative Stratified random Transect component ' + + ); + + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'placementMethod', + 'Regular', + null, + '1' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'placementMethod', + 'Random', + null, + '2' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'placementMethod', + 'Stratified random', + null, + '3' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'placementMethod', + 'Transect component', + null, + '4' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'placementMethod', + 'Representative', + null, + '5' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'placementMethod', + 'Capture specific feature', + null, + '6' + ); + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'plot', + 'permanence', + 'Permanence', + 'logical', + 'yes', + 'Boolean', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'Is the plot monumented so as to assure permanence? If so, this should be described in the layoutNarrative', + + ' plot Plot permanence Permanence logical Boolean n/a n/a no n/a Is the plot monumented so as to assure permanence? If so, this should be described in the layoutNarrative ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'plot', + 'layoutNarrative', + 'Layout Narrative', + 'logical', + 'yes', + 'text', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'Text description of and the rationale for the layout of the plot.', + + ' plot Plot layoutNarrative Layout Narrative logical text n/a n/a no n/a Text description of and the rationale for the layout of the plot. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'plot', + 'elevation', + 'Elevation', + 'logical', + 'yes', + 'Float', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'The elevation of the plot origin in meters above sea level.', + + ' plot Plot elevation Elevation logical Float n/a n/a no n/a The elevation of the plot origin in meters above sea level. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'plot', + 'elevationAccuracy', + 'Elevation Accuracy', + 'logical', + 'yes', + 'Float', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'The accuracy of the elevation in meters.', + + ' plot Plot elevationAccuracy Elevation Accuracy logical Float n/a n/a no n/a The accuracy of the elevation in meters. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'plot', + 'elevationRange', + 'Elevation Range', + 'logical', + 'yes', + 'Float', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'Meters of difference in elevations of the high and low points in the plot.', + + ' plot Plot elevationRange Elevation Range logical Float n/a n/a no n/a Meters of difference in elevations of the high and low points in the plot. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'plot', + 'slopeAspect', + 'Slope Aspect', + 'logical', + 'yes', + 'Float', + 'n/a', + 'n/a', + 'no', + 'optional list that converts', + 'Representative azimuth of slope gradient (0-360 degrees); if too flat to determine = -1; if too irregular to determine = -2.', + + ' plot Plot slopeAspect Slope Aspect logical Float n/a n/a no optional list that converts Representative azimuth of slope gradient (0-360 degrees); if too flat to determine = -1; if too irregular to determine = -2. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'plot', + 'minSlopeAspect', + 'Min Slope Aspect', + 'logical', + 'yes', + 'Float', + 'n/a', + 'n/a', + 'no', + 'optional list that converts', + 'Minimum azimuth of slope gradient (0-360 degrees), counterclockwise from representative azimuth.', + + ' plot Plot minSlopeAspect Min Slope Aspect logical Float n/a n/a no optional list that converts Minimum azimuth of slope gradient (0-360 degrees), counterclockwise from representative azimuth. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'plot', + 'maxSlopeAspect', + 'Max Slope Aspect', + 'logical', + 'yes', + 'Float', + 'n/a', + 'n/a', + 'no', + 'optional list that converts', + 'Maximum azimuth of slope gradient (0-360 degrees), clockwise from representative azimuth', + + ' plot Plot maxSlopeAspect Max Slope Aspect logical Float n/a n/a no optional list that converts Maximum azimuth of slope gradient (0-360 degrees), clockwise from representative azimuth ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'plot', + 'slopeGradient', + 'Slope Gradient', + 'logical', + 'yes', + 'Float', + 'n/a', + 'n/a', + 'no', + 'optional list that converts', + 'Representative inclination of slope in degrees; if too irregular to determine, = -1.', + + ' plot Plot slopeGradient Slope Gradient logical Float n/a n/a no optional list that converts Representative inclination of slope in degrees; if too irregular to determine, = -1. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'plot', + 'minSlopeGradient', + 'Min Slope Gradient', + 'logical', + 'yes', + 'Float', + 'n/a', + 'n/a', + 'no', + 'optional list that converts', + 'Minimum inclination of slope in degrees.', + + ' plot Plot minSlopeGradient Min Slope Gradient logical Float n/a n/a no optional list that converts Minimum inclination of slope in degrees. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'plot', + 'maxSlopeGradient', + 'Max Slope Gradient', + 'logical', + 'yes', + 'Float', + 'n/a', + 'n/a', + 'no', + 'optional list that converts', + 'Maximum inclination of slope in degrees.', + + ' plot Plot maxSlopeGradient Max Slope Gradient logical Float n/a n/a no optional list that converts Maximum inclination of slope in degrees. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'plot', + 'topoPosition', + 'Topographic Position', + 'logical', + 'yes', + 'varchar (90)', + 'n/a', + 'n/a', + 'closed', + 'n/a', + 'Position of the plot on land surface (e.g., Summit, shoulder, upper slope, middle slope, lower slope, toeslope, no slope, channel bed, dune swale, pond).', + + ' plot Plot topoPosition Topographic Position logical varchar (90) n/a n/a closed n/a Position of the plot on land surface (e.g., Summit, shoulder, upper slope, middle slope, lower slope, toeslope, no slope, channel bed, dune swale, pond). Interfluve (crest, summit, ridge): linear top of ridge, hill, or mountain; the elevated area between two fluves (drainageways) that sheds water to the drainageways. High slope (shoulder slope, upper slope, convex creep slope): geomorphic component that forms the uppermost inclined surface at the top of a slope. Comprises the transition zone from backslope to summit. Surface is dominantly convex in profile and erosional in origin. High level (mesa, high flat): level top of plateau Midslope (transportational midslope, middle slope): intermediate slope position Backslope (dipslope): subset of midslopes which are steep, linear, and may include cliff segments (fall faces). Step in slope (ledge, terracette): nearly level shelf interrupting a steep slope, rock wall, or cliff face. Lowslope (lower slope, foot slope, colluvial footslope): inner gently inclined surface at the base of a slope. Surface profile is generally concave and a transition between midslope or backslope, and toe slope. Toeslope (alluvial toeslope): outermost gently inclined surface at base of a slope. In profile, commonly gentle and linear and characterized by alluvial deposition. Low level (terrace, low flat): valley floor or shoreline representing the former position of an alluvial plain, lake, or shore. Channel wall (bank): sloping side of a channel. Channel bed (narrow valley bottom, gully arroyo): bed of single or braided watercourse commonly barren of vegetation and formed of modern alluvium. Basin floor (depression): nearly level to gently sloping, bottom surface of a basin. ' + + ); + + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'topoPosition', + 'Interfluve', + '(crest, summit, ridge): linear top of ridge, hill, or mountain; the elevated area between two fluves (drainageways) that sheds water to the drainageways.', + '1' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'topoPosition', + 'High slope', + '(shoulder slope, upper slope, convex creep slope): geomorphic component that forms the uppermost inclined surface at the top of a slope. Comprises the transition zone from backslope to summit. Surface is dominantly convex in profile and erosional in origin.', + '2' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'topoPosition', + 'High level', + '(mesa, high flat): level top of plateau', + '3' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'topoPosition', + 'Midslope', + '(transportational midslope, middle slope): intermediate slope position', + '4' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'topoPosition', + 'Backslope', + '(dipslope): subset of midslopes which are steep, linear, and may include cliff segments (fall faces).', + '5' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'topoPosition', + 'Step in slope', + '(ledge, terracette): nearly level shelf interrupting a steep slope, rock wall, or cliff face.', + '6' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'topoPosition', + 'Lowslope', + '(lower slope, foot slope, colluvial footslope): inner gently inclined surface at the base of a slope. Surface profile is generally concave and a transition between midslope or backslope, and toe slope.', + '7' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'topoPosition', + 'Toeslope', + '(alluvial toeslope): outermost gently inclined surface at base of a slope. In profile, commonly gentle and linear and characterized by alluvial deposition.', + '8' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'topoPosition', + 'Low level', + '(terrace, low flat): valley floor or shoreline representing the former position of an alluvial plain, lake, or shore.', + '9' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'topoPosition', + 'Channel wall', + '(bank): sloping side of a channel.', + '10' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'topoPosition', + 'Channel bed', + '(narrow valley bottom, gully arroyo): bed of single or braided watercourse commonly barren of vegetation and formed of modern alluvium.', + '11' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'topoPosition', + 'Basin floor', + '(depression): nearly level to gently sloping, bottom surface of a basin.', + '12' + ); + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'plot', + 'landform', + 'Landform', + 'logical', + 'yes', + 'varchar (50)', + 'n/a', + 'n/a', + 'open', + 'n/a', + 'A recognizable physical feature on the surface of the earth, often including consideration of the natural cause of its formation.', + + ' plot Plot landform Landform logical varchar (50) n/a n/a open n/a A recognizable physical feature on the surface of the earth, often including consideration of the natural cause of its formation. active slope (metastable slope) A mountain or hill slope that is responding to valley incision, and has detritus accumulated behind obstructions, indicating contemporary transport of slope alluvium. Slope gradients commonly exceed 45 percent. alluvial cone The material washed down mountain and hill slopes by ephemeral streams and deposited at the mouth of gorges in the form of a moderately steep, conical mass descending equally in all directions from the point of issue. alluvial fan A body of alluvium, with or without debris flow deposits, whose surface forms a segment of a cone that radiates downslope from the point where the stream emerges from a narrow valley onto a less sloping surface. Common longitudinal profiles are gently sloping and nearly linear. Source uplands range in relief and aerial extent from mountains and plateaus to gullied terrains on hill and piedmont slopes. alluvial flat A nearly level, graded, alluvial surface. alluvial plain A flood plain or a low-gradient delta. It may be modern or relict. alluvial terrace arroyo (wash) The flat-floored channel or an ephemeral stream, commonly with very steep to vertical banks cut in alluvium. backshore terrace backswamp (valley flat) Extensive marshy, depressed areas of flood plains between the natural levee borders of channel belts and valley sides or terraces. backwater badlands bajada bald bank bar An elongated landform generated by waves and currents and usually running parallel to the shore, composed predominantly of unconsolidated sand, gravel, cobbles, or stones with water on two sides. barrier beach barrier flat barrier island(s) barrier reef basin A depressed area with no or limited surface outlet. Examples are closed depressions in a glacial till plain, lake basin, river basin, or fault-bordered intermontane structure such as the Bighorn Basin of Wyoming. basin floor bay bayou beach The unconsolidated material that covers a gently sloping zone, typically with a concave profile, extending landward from the low-water line to the place where there is a definite change in material or physiographic form (such as a cliff) or to the line of permanent vegetation; the relatively thick and temporary accumulation of loose water-borne material (usually well-sorted sand and pebbles, accompanied by mud, cobbles, boulders, and smoothed rock and shell fragment) that is in active transit along, or deposited on the shore zone between the limits of low water and high water. beach ridge bench blowout bluff (a) A high bank or bold headland, with a broad, precipitous, sometimes rounded cliff face overlooking a plain or body of water, especially on the outside of a stream meander; (b) any cliff with a steep, broad face. bottomlands braided channel or stream (flood-plain landforms) A channel or stream with multiple channels that interweave as a result of repeated bifurcation and convergence of flow around interchannel bars, resembling in plan the strands of a complex braid. Braiding is generally confined to broad, shallow streams of low sinuosity, high bedload, non-cohesive bank material, and step gradient. At a given bank-full discharge, braided streams have steeper slopes and shallower, broader, and less stable channel cross sections than meandering streams. butte caldera canyon A long, deep, narrow, very steep-sided valley with high and precipitous walls in an area of high local relief. carolina bay channel chenier chenier plain cirque Semicircular, concave, bowl-like area with steep face primarily resulting from erosive activity of a mountain glacier. cirque floor cirque headwall cliff Any high, very steep to perpendicular or overhanging face of rock or earth; a precipice. coast coastal plain col collapse sinkhole colluvial shoulder colluvial slope cove crest (summit) The commonly linear top of a ridge, hill or mountain. cuesta debris slide delta A body of alluvium, nearly flat and fan-shaped, deposited at or near the mouth of a river or stream where it enters a body of relatively quiet water, usually a sea or lake. delta plain depositional levee depositional stream terrace depression desert pavement dike doline dome A roughly symmetrical upfold, with bed dipping in all directions, more or less equally, from a point. A smoothly rounded landform or rock mass such as a rock-capped mountain summit, roughly resembling the dome of a building. drainage drainage channel (undifferentiated) draw drumlin A low, smooth, elongated oval hill, mound, or ridge of compact glacial till that may or may not have a core of bedrock or stratified glacial drift. The longer axis is parallel to the general direction of glacier flow. Drumlins are products of streamline (laminar) flow of glaciers, which molded the subglacial floor through a combination of erosion and deposition. dune (undifferentiated) A mound, ridge, or hill of loose, windblown granular material (generally sand), either bare or covered with vegetation. dune field earth flow earth hummock eroded bench eroding stream channel system erosional stream terrace escarpment (scarp) A relatively continuous and steep slope or cliff breaking the general continuity of more gently sloping land surfaces and produced by erosion or faulting. The term is more often applied to cliffs produced by differential erosion. esker A long, narrow sinuous, steep-sided ridge composed of irregularly stratified sand and gravel that was deposited by a subsurface stream flowing between ice walls, or in an ice tunnel of a retreating glacier, and was left behind when the ice melted. estuary exogenous dome fan piedmont fault scarp fault terrace fissure fissure vent flat A general term for a level or nearly level surface or small area of land marked by little or no relief, eg. mud flat or valley flat. flood plain (bottomland) The nearly level alluvial plain that borders a stream and is subject to inundation under flood-stage conditions unless protected artificially. It is usually a constructional landform built of sediment deposited during overflow and lateral migration of the stream. fluvial foothills foredune frost creep slope frost mound frost scar gap glaciated uplands glacier gorge (a) A narrow, deep valley with nearly vertical rocky walls, enclosed by mountains, smaller than a canyon, and more steep-sided than a ravine; especially a restricted, steep-walled part of a canyon. (b) A narrow defile or passage between hills or mountains. graben ground moraine gulch hanging valley headland highland hills (foothills) A natural elevation of the land surface, rising as much as 300 m above the surrounding lowlands, usually of restricted summit area (relative to a tableland) and having a well-defined outline; hill slopes generally exceed 15%. The distinction between a hill and a mountain is often dependent on local usage. hillslope bedrock outcrop hogback hoodoo hummock A rounded or conical mound of knoll, hillock, or other small elevation. Also, a slight rise of ground above a level surface. inlet inselberg interdune flat interfluve island kame A moundlike hill of ice-contact glacial drift, composed chiefly of stratified sand and gravel. kame moraine kame terrace karst karst tower karst window kegel karst kettle A steep-sided bowl-shaped depression without surface drainage. It is in glacial drift deposits and believed to have formed by the melting of a large, detached block of stagnant ice buried in the glacial drift. kettled outwash plain knob (a) A rounded eminence, as a knoll, hillock, or small hill or mountain; especially a prominent or isolated hill with steep sides, commonly found in the southern United States. (b) A peak or other projection from the top of a hill or mountain. Also a boulder or group of boulders or an area of resistant rocks protruding from the side of a hill or mountain. knoll lagoon lake lake bed lake plain lake terrace lateral moraine lateral scarp (undifferentiated) lava flow (undifferentiated) ledge levee (floodwall, earth dike) An artificial or natural embankment built along the margin of a watercourse or an arm of the sea, to protect land from inundation or to confine streamflow to its channel. loess deposit (undifferentiated) longshore bar lowland marine terrace (undifferentiated) meander belt meander scar mesa mid slope mima mound monadnock moraine (undifferentiated) A drift topography characterized by chaotic mounds and pits, generally randomly oriented, developed in superglacial drift by collapse and flow as the underlying stagnant ice melted. Slopes may be steep and unstable and there will be used and unused stream coursed and lake depressions interspersed with the morainic ridges. Consequently, there will be rapid or abrupt changes between materials of differing lithology. mound mountain valley mountain(s) (hill) A natural elevation of the land surface, rising more than 300 m above surrounding lowlands, usually of restricted summit area (relative to a plateau), and generally having steep sides (greater than 25 percent slope) with or without considerable bare-rock surface. A mountain can occur as a single, isolated mass or in a group forming a chain or range. Mountains are primarily formed by deep-seated earth movements and/or volcanic action and secondarily by differential erosion. mountain-valley fan mud flat noseslope outwash fan outwash plain (glacial outwash, kettles) An extensive lowland area of coarse textured, glaciofluvial material. An outwash plain is commonly smooth; where pitted, due to melt-out of incorporated ice masses, it is generally low in relief. outwash terrace oxbow (meander belt, oxbow lake) A closely looping stream meander having an extreme curvature such that only a neck of land is left between the two parts of the stream. A term used in New England for the land enclosed, or partly enclosed, within an oxbow. patterned ground (undifferentiated) peat dome periglacial boulderfield piedmont pimple mounds pingo A large frost mound; especially a relatively large conical mound of soil-covered ice (commonly 30 to 50 m high and up to 400 m in diameter) raised in part by hydrostatic pressure within and below the permafrost of Arctic regions, and of more than 1 year’s duration. pinnacle plain (lowland, plateau) An extensive lowland area that ranges from level to gently sloping or undulating. A plain has few or no prominent hills or valleys, and usually occurs at low elevation with reference to surrounding areas (local relief generally less than 100m, although some, such as the Great Plains of the United States, are as much as 1000 to 1800 m above sea level.) Where dissected, remnants of a plain can form the local uplands. plateau (mesa, plain) An extensive upland mass with a relatively flat summit area that is considerably elevated (more than 100m) above adjacent lowlands, and is separated from them on one or more sides by escarpments. A comparatively large part of a plateau surface is near summit level. playa polygon (high-centered) polygon (low-centered) pothole raised beach raised estuary raised mudflat raised tidal flat ravine (gulch, draw) A small stream channel; narrow, steep-sided, and commonly V-shaped in cross section; and larger than a gully. relict coastline ridge A long, narrow elevation of the land surface, usually sharp rested with steep sides and forming an extended upland between valleys. The term is used in areas of both hill and mountain relief. ridge and valley ridgetop bedrock outcrop rift valley rim riverbed rock fall avalanche saddle A low point on a ridge or crestline, generally a divide (pass, col) between the heads of streams flowing in opposite directions. sag pond sandhills scarp scarp slope scour scoured basin sea cliff seep shoal shoreline shoulder (hill slope) The geomorphic component that form the uppermost inclined surface at the top of a hillslope. It comprises the transition zone from backslope to summit of an upland. The surface is dominantly convex in profile and erosional in origin. sinkhole (undifferentiated) (doline) A closed depression formed either by solution of the surficial bedrock (e.g. limestone, gypsum, salt) or by collapse of underlying caves. Complexes of sinkholes in carbonate-rock terraces are the main components of karst topography. slide slope slough slump and topple prone slope slump pond soil creep slope solution sinkhole spit (a) A small point or low tongue or narrow embankment of land, commonly consisting of sand or gravel deposited by longshore drifting and having one end attached to the mainland and the other terminating in open water, usually the sea; a fingerlike extension of the beach. (b) A relatively long, narrow shoal or reef extending from the shore into a body of water. splay A small alluvial fan or other outspread deposit formed where an overloaded stream breaks through a levee and deposits its material (often coarse-grained) on the flood plain. stone circle stone stripe stream terrace (undifferentiated) streambed subjacent karst collapse sinkhole subsidence sinkhole swale (a) A slight depression, sometimes swampy, in the midst of generally level land. (b) A shallow depression in an undulating ground moraine due to uneven glacial deposition. (c) A long, narrow, generally shallow, trough-like depression between two beach ridges, and aligned roughly parallel to the coastline. talus tarn terrace A step-like surface, bordering a valley floor or shoreline, that represent the former position of an alluvial plain, or lake or sea shore. The term is usually applied to both the relatively flat summit surface (platform, tread), cut or built by stream or wave action, and the steeper descending slope (scarp, riser), graded to a lower base level of erosion. tidal flat tidal gut till plain toe slope toe zone (undifferentiated) transverse dune trench trough valley (basin) An elongate, relatively large, externally drained depression of the earth''s surface that is primarily developed by stream erosion. valley floor wave-built terrace wave-cut platform ' + + ); + + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'landform', + 'active slope', + '(metastable slope) A mountain or hill slope that is responding to valley incision, and has detritus accumulated behind obstructions, indicating contemporary transport of slope alluvium. Slope gradients commonly exceed 45 percent.', + '2' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'landform', + 'alluvial cone', + 'The material washed down mountain and hill slopes by ephemeral streams and deposited at the mouth of gorges in the form of a moderately steep, conical mass descending equally in all directions from the point of issue.', + '6' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'landform', + 'alluvial fan', + 'A body of alluvium, with or without debris flow deposits, whose surface forms a segment of a cone that radiates downslope from the point where the stream emerges from a narrow valley onto a less sloping surface. Common longitudinal profiles are gently sloping and nearly linear. Source uplands range in relief and aerial extent from mountains and plateaus to gullied terrains on hill and piedmont slopes.', + '10' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'landform', + 'alluvial flat', + 'A nearly level, graded, alluvial surface.', + '15' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'landform', + 'alluvial plain', + 'A flood plain or a low-gradient delta. It may be modern or relict.', + '17' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'landform', + 'alluvial terrace', + null, + '20' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'landform', + 'arroyo', + '(wash) The flat-floored channel or an ephemeral stream, commonly with very steep to vertical banks cut in alluvium.', + '22' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'landform', + 'backshore terrace', + null, + '25' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'landform', + 'backswamp', + '(valley flat) Extensive marshy, depressed areas of flood plains between the natural levee borders of channel belts and valley sides or terraces.', + '27' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'landform', + 'backwater', + null, + '30' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'landform', + 'badlands', + null, + '35' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'landform', + 'bajada', + null, + '40' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'landform', + 'bald', + null, + '45' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'landform', + 'bank', + null, + '50' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'landform', + 'bar', + 'An elongated landform generated by waves and currents and usually running parallel to the shore, composed predominantly of unconsolidated sand, gravel, cobbles, or stones with water on two sides.', + '55' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'landform', + 'barrier beach', + null, + '60' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'landform', + 'barrier flat', + null, + '65' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'landform', + 'barrier island(s)', + null, + '70' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'landform', + 'barrier reef', + null, + '75' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'landform', + 'basin', + 'A depressed area with no or limited surface outlet. Examples are closed depressions in a glacial till plain, lake basin, river basin, or fault-bordered intermontane structure such as the Bighorn Basin of Wyoming.', + '80' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'landform', + 'basin floor', + null, + '85' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'landform', + 'bay', + null, + '90' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'landform', + 'bayou', + null, + '95' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'landform', + 'beach', + 'The unconsolidated material that covers a gently sloping zone, typically with a concave profile, extending landward from the low-water line to the place where there is a definite change in material or physiographic form (such as a cliff) or to the line of permanent vegetation; the relatively thick and temporary accumulation of loose water-borne material (usually well-sorted sand and pebbles, accompanied by mud, cobbles, boulders, and smoothed rock and shell fragment) that is in active transit along, or deposited on the shore zone between the limits of low water and high water.', + '100' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'landform', + 'beach ridge', + null, + '105' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'landform', + 'bench', + null, + '110' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'landform', + 'blowout', + null, + '115' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'landform', + 'bluff', + '(a) A high bank or bold headland, with a broad, precipitous, sometimes rounded cliff face overlooking a plain or body of water, especially on the outside of a stream meander; (b) any cliff with a steep, broad face.', + '117' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'landform', + 'bottomlands', + null, + '120' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'landform', + 'braided channel or stream', + '(flood-plain landforms) A channel or stream with multiple channels that interweave as a result of repeated bifurcation and convergence of flow around interchannel bars, resembling in plan the strands of a complex braid. Braiding is generally confined to broad, shallow streams of low sinuosity, high bedload, non-cohesive bank material, and step gradient. At a given bank-full discharge, braided streams have steeper slopes and shallower, broader, and less stable channel cross sections than meandering streams.', + '122' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'landform', + 'butte', + null, + '125' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'landform', + 'caldera', + null, + '130' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'landform', + 'canyon', + 'A long, deep, narrow, very steep-sided valley with high and precipitous walls in an area of high local relief.', + '135' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'landform', + 'carolina bay', + null, + '140' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'landform', + 'channel', + null, + '145' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'landform', + 'chenier', + null, + '150' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'landform', + 'chenier plain', + null, + '155' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'landform', + 'cirque', + 'Semicircular, concave, bowl-like area with steep face primarily resulting from erosive activity of a mountain glacier.', + '160' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'landform', + 'cirque floor', + null, + '165' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'landform', + 'cirque headwall', + null, + '170' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'landform', + 'cliff', + 'Any high, very steep to perpendicular or overhanging face of rock or earth; a precipice.', + '175' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'landform', + 'coast', + null, + '180' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'landform', + 'coastal plain', + null, + '185' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'landform', + 'col', + null, + '190' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'landform', + 'collapse sinkhole', + null, + '195' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'landform', + 'colluvial shoulder', + null, + '200' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'landform', + 'colluvial slope', + null, + '205' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'landform', + 'cove', + null, + '210' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'landform', + 'crest', + '(summit) The commonly linear top of a ridge, hill or mountain.', + '212' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'landform', + 'cuesta', + null, + '215' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'landform', + 'debris slide', + null, + '220' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'landform', + 'delta', + 'A body of alluvium, nearly flat and fan-shaped, deposited at or near the mouth of a river or stream where it enters a body of relatively quiet water, usually a sea or lake.', + '225' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'landform', + 'delta plain', + null, + '230' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'landform', + 'depositional levee', + null, + '235' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'landform', + 'depositional stream terrace', + null, + '240' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'landform', + 'depression', + null, + '245' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'landform', + 'desert pavement', + null, + '250' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'landform', + 'dike', + null, + '255' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'landform', + 'doline', + null, + '260' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'landform', + 'dome', + 'A roughly symmetrical upfold, with bed dipping in all directions, more or less equally, from a point. A smoothly rounded landform or rock mass such as a rock-capped mountain summit, roughly resembling the dome of a building.', + '265' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'landform', + 'drainage', + null, + '270' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'landform', + 'drainage channel (undifferentiated)', + null, + '275' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'landform', + 'draw', + null, + '280' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'landform', + 'drumlin', + 'A low, smooth, elongated oval hill, mound, or ridge of compact glacial till that may or may not have a core of bedrock or stratified glacial drift. The longer axis is parallel to the general direction of glacier flow. Drumlins are products of streamline (laminar) flow of glaciers, which molded the subglacial floor through a combination of erosion and deposition.', + '285' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'landform', + 'dune (undifferentiated)', + 'A mound, ridge, or hill of loose, windblown granular material (generally sand), either bare or covered with vegetation.', + '290' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'landform', + 'dune field', + null, + '295' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'landform', + 'earth flow', + null, + '300' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'landform', + 'earth hummock', + null, + '305' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'landform', + 'eroded bench', + null, + '310' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'landform', + 'eroding stream channel system', + null, + '315' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'landform', + 'erosional stream terrace', + null, + '320' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'landform', + 'escarpment', + '(scarp) A relatively continuous and steep slope or cliff breaking the general continuity of more gently sloping land surfaces and produced by erosion or faulting. The term is more often applied to cliffs produced by differential erosion.', + '325' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'landform', + 'esker', + 'A long, narrow sinuous, steep-sided ridge composed of irregularly stratified sand and gravel that was deposited by a subsurface stream flowing between ice walls, or in an ice tunnel of a retreating glacier, and was left behind when the ice melted.', + '330' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'landform', + 'estuary', + null, + '335' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'landform', + 'exogenous dome', + null, + '340' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'landform', + 'fan piedmont', + null, + '345' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'landform', + 'fault scarp', + null, + '350' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'landform', + 'fault terrace', + null, + '355' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'landform', + 'fissure', + null, + '360' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'landform', + 'fissure vent', + null, + '365' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'landform', + 'flat', + 'A general term for a level or nearly level surface or small area of land marked by little or no relief, eg. mud flat or valley flat.', + '367' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'landform', + 'flood plain', + '(bottomland) The nearly level alluvial plain that borders a stream and is subject to inundation under flood-stage conditions unless protected artificially. It is usually a constructional landform built of sediment deposited during overflow and lateral migration of the stream.', + '370' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'landform', + 'fluvial', + null, + '375' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'landform', + 'foothills', + null, + '380' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'landform', + 'foredune', + null, + '385' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'landform', + 'frost creep slope', + null, + '390' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'landform', + 'frost mound', + null, + '395' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'landform', + 'frost scar', + null, + '400' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'landform', + 'gap', + null, + '405' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'landform', + 'glaciated uplands', + null, + '410' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'landform', + 'glacier', + null, + '415' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'landform', + 'gorge', + '(a) A narrow, deep valley with nearly vertical rocky walls, enclosed by mountains, smaller than a canyon, and more steep-sided than a ravine; especially a restricted, steep-walled part of a canyon. (b) A narrow defile or passage between hills or mountains.', + '420' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'landform', + 'graben', + null, + '425' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'landform', + 'ground moraine', + null, + '430' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'landform', + 'gulch', + null, + '435' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'landform', + 'hanging valley', + null, + '440' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'landform', + 'headland', + null, + '445' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'landform', + 'highland', + null, + '450' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'landform', + 'hills', + '(foothills) A natural elevation of the land surface, rising as much as 300 m above the surrounding lowlands, usually of restricted summit area (relative to a tableland) and having a well-defined outline; hill slopes generally exceed 15%. The distinction between a hill and a mountain is often dependent on local usage.', + '455' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'landform', + 'hillslope bedrock outcrop', + null, + '460' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'landform', + 'hogback', + null, + '465' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'landform', + 'hoodoo', + null, + '470' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'landform', + 'hummock', + 'A rounded or conical mound of knoll, hillock, or other small elevation. Also, a slight rise of ground above a level surface.', + '475' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'landform', + 'inlet', + null, + '480' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'landform', + 'inselberg', + null, + '485' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'landform', + 'interdune flat', + null, + '490' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'landform', + 'interfluve', + null, + '495' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'landform', + 'island', + null, + '500' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'landform', + 'kame', + 'A moundlike hill of ice-contact glacial drift, composed chiefly of stratified sand and gravel.', + '505' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'landform', + 'kame moraine', + null, + '510' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'landform', + 'kame terrace', + null, + '515' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'landform', + 'karst', + null, + '520' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'landform', + 'karst tower', + null, + '525' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'landform', + 'karst window', + null, + '530' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'landform', + 'kegel karst', + null, + '535' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'landform', + 'kettle', + 'A steep-sided bowl-shaped depression without surface drainage. It is in glacial drift deposits and believed to have formed by the melting of a large, detached block of stagnant ice buried in the glacial drift.', + '540' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'landform', + 'kettled outwash plain', + null, + '545' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'landform', + 'knob', + '(a) A rounded eminence, as a knoll, hillock, or small hill or mountain; especially a prominent or isolated hill with steep sides, commonly found in the southern United States. (b) A peak or other projection from the top of a hill or mountain. Also a boulder or group of boulders or an area of resistant rocks protruding from the side of a hill or mountain.', + '550' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'landform', + 'knoll', + null, + '555' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'landform', + 'lagoon', + null, + '560' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'landform', + 'lake', + null, + '565' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'landform', + 'lake bed', + null, + '570' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'landform', + 'lake plain', + null, + '575' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'landform', + 'lake terrace', + null, + '580' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'landform', + 'lateral moraine', + null, + '585' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'landform', + 'lateral scarp (undifferentiated)', + null, + '590' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'landform', + 'lava flow (undifferentiated)', + null, + '595' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'landform', + 'ledge', + null, + '600' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'landform', + 'levee', + '(floodwall, earth dike) An artificial or natural embankment built along the margin of a watercourse or an arm of the sea, to protect land from inundation or to confine streamflow to its channel.', + '605' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'landform', + 'loess deposit (undifferentiated)', + null, + '610' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'landform', + 'longshore bar', + null, + '615' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'landform', + 'lowland', + null, + '620' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'landform', + 'marine terrace (undifferentiated)', + null, + '625' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'landform', + 'meander belt', + null, + '630' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'landform', + 'meander scar', + null, + '635' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'landform', + 'mesa', + null, + '640' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'landform', + 'mid slope', + null, + '645' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'landform', + 'mima mound', + null, + '650' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'landform', + 'monadnock', + null, + '655' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'landform', + 'moraine (undifferentiated)', + 'A drift topography characterized by chaotic mounds and pits, generally randomly oriented, developed in superglacial drift by collapse and flow as the underlying stagnant ice melted. Slopes may be steep and unstable and there will be used and unused stream coursed and lake depressions interspersed with the morainic ridges. Consequently, there will be rapid or abrupt changes between materials of differing lithology.', + '660' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'landform', + 'mound', + null, + '665' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'landform', + 'mountain valley', + null, + '670' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'landform', + 'mountain(s)', + '(hill) A natural elevation of the land surface, rising more than 300 m above surrounding lowlands, usually of restricted summit area (relative to a plateau), and generally having steep sides (greater than 25 percent slope) with or without considerable bare-rock surface. A mountain can occur as a single, isolated mass or in a group forming a chain or range. Mountains are primarily formed by deep-seated earth movements and/or volcanic action and secondarily by differential erosion.', + '675' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'landform', + 'mountain-valley fan', + null, + '680' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'landform', + 'mud flat', + null, + '685' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'landform', + 'noseslope', + null, + '690' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'landform', + 'outwash fan', + null, + '695' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'landform', + 'outwash plain', + '(glacial outwash, kettles) An extensive lowland area of coarse textured, glaciofluvial material. An outwash plain is commonly smooth; where pitted, due to melt-out of incorporated ice masses, it is generally low in relief.', + '700' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'landform', + 'outwash terrace', + null, + '705' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'landform', + 'oxbow', + '(meander belt, oxbow lake) A closely looping stream meander having an extreme curvature such that only a neck of land is left between the two parts of the stream. A term used in New England for the land enclosed, or partly enclosed, within an oxbow.', + '710' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'landform', + 'patterned ground (undifferentiated)', + null, + '715' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'landform', + 'peat dome', + null, + '720' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'landform', + 'periglacial boulderfield', + null, + '725' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'landform', + 'piedmont', + null, + '730' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'landform', + 'pimple mounds', + null, + '735' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'landform', + 'pingo', + 'A large frost mound; especially a relatively large conical mound of soil-covered ice (commonly 30 to 50 m high and up to 400 m in diameter) raised in part by hydrostatic pressure within and below the permafrost of Arctic regions, and of more than 1 year’s duration.', + '740' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'landform', + 'pinnacle', + null, + '745' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'landform', + 'plain', + '(lowland, plateau) An extensive lowland area that ranges from level to gently sloping or undulating. A plain has few or no prominent hills or valleys, and usually occurs at low elevation with reference to surrounding areas (local relief generally less than 100m, although some, such as the Great Plains of the United States, are as much as 1000 to 1800 m above sea level.) Where dissected, remnants of a plain can form the local uplands.', + '750' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'landform', + 'plateau', + '(mesa, plain) An extensive upland mass with a relatively flat summit area that is considerably elevated (more than 100m) above adjacent lowlands, and is separated from them on one or more sides by escarpments. A comparatively large part of a plateau surface is near summit level.', + '755' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'landform', + 'playa', + null, + '760' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'landform', + 'polygon (high-centered)', + null, + '765' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'landform', + 'polygon (low-centered)', + null, + '770' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'landform', + 'pothole', + null, + '775' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'landform', + 'raised beach', + null, + '780' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'landform', + 'raised estuary', + null, + '785' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'landform', + 'raised mudflat', + null, + '790' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'landform', + 'raised tidal flat', + null, + '795' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'landform', + 'ravine', + '(gulch, draw) A small stream channel; narrow, steep-sided, and commonly V-shaped in cross section; and larger than a gully.', + '800' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'landform', + 'relict coastline', + null, + '805' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'landform', + 'ridge', + 'A long, narrow elevation of the land surface, usually sharp rested with steep sides and forming an extended upland between valleys. The term is used in areas of both hill and mountain relief.', + '810' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'landform', + 'ridge and valley', + null, + '815' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'landform', + 'ridgetop bedrock outcrop', + null, + '820' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'landform', + 'rift valley', + null, + '825' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'landform', + 'rim', + null, + '830' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'landform', + 'riverbed', + null, + '835' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'landform', + 'rock fall avalanche', + null, + '840' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'landform', + 'saddle', + 'A low point on a ridge or crestline, generally a divide (pass, col) between the heads of streams flowing in opposite directions.', + '845' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'landform', + 'sag pond', + null, + '850' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'landform', + 'sandhills', + null, + '855' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'landform', + 'scarp', + null, + '860' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'landform', + 'scarp slope', + null, + '865' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'landform', + 'scour', + null, + '870' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'landform', + 'scoured basin', + null, + '875' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'landform', + 'sea cliff', + null, + '880' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'landform', + 'seep', + null, + '885' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'landform', + 'shoal', + null, + '890' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'landform', + 'shoreline', + null, + '895' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'landform', + 'shoulder', + '(hill slope) The geomorphic component that form the uppermost inclined surface at the top of a hillslope. It comprises the transition zone from backslope to summit of an upland. The surface is dominantly convex in profile and erosional in origin.', + '897' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'landform', + 'sinkhole (undifferentiated)', + '(doline) A closed depression formed either by solution of the surficial bedrock (e.g. limestone, gypsum, salt) or by collapse of underlying caves. Complexes of sinkholes in carbonate-rock terraces are the main components of karst topography.', + '900' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'landform', + 'slide', + null, + '905' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'landform', + 'slope', + null, + '910' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'landform', + 'slough', + null, + '915' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'landform', + 'slump and topple prone slope', + null, + '920' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'landform', + 'slump pond', + null, + '925' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'landform', + 'soil creep slope', + null, + '930' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'landform', + 'solution sinkhole', + null, + '935' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'landform', + 'spit', + '(a) A small point or low tongue or narrow embankment of land, commonly consisting of sand or gravel deposited by longshore drifting and having one end attached to the mainland and the other terminating in open water, usually the sea; a fingerlike extension of the beach. (b) A relatively long, narrow shoal or reef extending from the shore into a body of water.', + '940' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'landform', + 'splay', + 'A small alluvial fan or other outspread deposit formed where an overloaded stream breaks through a levee and deposits its material (often coarse-grained) on the flood plain.', + '945' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'landform', + 'stone circle', + null, + '950' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'landform', + 'stone stripe', + null, + '955' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'landform', + 'stream terrace (undifferentiated)', + null, + '960' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'landform', + 'streambed', + null, + '965' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'landform', + 'subjacent karst collapse sinkhole', + null, + '970' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'landform', + 'subsidence sinkhole', + null, + '975' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'landform', + 'swale', + '(a) A slight depression, sometimes swampy, in the midst of generally level land. (b) A shallow depression in an undulating ground moraine due to uneven glacial deposition. (c) A long, narrow, generally shallow, trough-like depression between two beach ridges, and aligned roughly parallel to the coastline.', + '980' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'landform', + 'talus', + null, + '985' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'landform', + 'tarn', + null, + '990' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'landform', + 'terrace', + 'A step-like surface, bordering a valley floor or shoreline, that represent the former position of an alluvial plain, or lake or sea shore. The term is usually applied to both the relatively flat summit surface (platform, tread), cut or built by stream or wave action, and the steeper descending slope (scarp, riser), graded to a lower base level of erosion.', + '992' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'landform', + 'tidal flat', + null, + '995' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'landform', + 'tidal gut', + null, + '1000' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'landform', + 'till plain', + null, + '1005' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'landform', + 'toe slope', + null, + '1010' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'landform', + 'toe zone (undifferentiated)', + null, + '1015' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'landform', + 'transverse dune', + null, + '1020' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'landform', + 'trench', + null, + '1025' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'landform', + 'trough', + null, + '1030' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'landform', + 'valley', + '(basin) An elongate, relatively large, externally drained depression of the earth''s surface that is primarily developed by stream erosion.', + '1035' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'landform', + 'valley floor', + null, + '1040' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'landform', + 'wave-built terrace', + null, + '1045' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'landform', + 'wave-cut platform', + null, + '1050' + ); + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'plot', + 'surficialDeposits', + 'Surficial Deposits', + 'logical', + 'yes', + 'varchar (90)', + 'n/a', + 'n/a', + 'closed', + 'n/a', + 'Surficial deposits represent the parent material that are the geologic or organic precursors to the soil. They may either have been deposited by geologic (wind, ice, gravity or water) or biologic (organic) activity, or formed in place more-or-less directly from rocks and minerals below.', + + ' plot Plot surficialDeposits Surficial Deposits logical varchar (90) n/a n/a closed n/a Surficial deposits represent the parent material that are the geologic or organic precursors to the soil. They may either have been deposited by geologic (wind, ice, gravity or water) or biologic (organic) activity, or formed in place more-or-less directly from rocks and minerals below. Aeolian Deposits: Aeolian sand flats and cover sands Aeolian Deposits: Dunes Aeolian Deposits: Loess deposits Aeolian Deposits: Volcanic Ash Alluvial Deposits: Alluvial Fan Alluvial Deposits: Deltas Alluvial Deposits: Floodplain Chemical Deposits: Evaporites and Precipitates Glacial Deposits: Bedrock and till Glacial Deposits: Deltaic deposits Glacial Deposits: Glaciofluvial Glacial Deposits: Glaciolacustrine Glacial Deposits: Glaciomarine Glacial Deposits: Moraine Glacial Deposits: Till Glacial Deposits: Undifferentiated glacial deposit Lacustrine Deposits: Coarse sediments Lacustrine Deposits: Fine-grained sediments Lacustrine Deposits: Unconsolidated Sediments Marine Deposits: Coarse sediments Marine Deposits: Fine-grained sediments Marine Deposits: Unconsolidated Sediments Organic Deposits: Muck Organic Deposits: Peat Other Residual Material: Bedrock Residual Material: Deeply Weathered Rock Residual Material: Disintegrated Rock Slope and Modified Deposits: Colluvial Slope and Modified Deposits: Solifluction, landslide Slope and Modified Deposits: Talus and scree slopes Variable ' + + ); + + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'surficialDeposits', + 'Aeolian Deposits: Aeolian sand flats and cover sands', + null, + '10' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'surficialDeposits', + 'Aeolian Deposits: Dunes', + null, + '20' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'surficialDeposits', + 'Aeolian Deposits: Loess deposits', + null, + '30' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'surficialDeposits', + 'Aeolian Deposits: Volcanic Ash', + null, + '40' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'surficialDeposits', + 'Alluvial Deposits: Alluvial Fan', + null, + '50' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'surficialDeposits', + 'Alluvial Deposits: Deltas', + null, + '60' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'surficialDeposits', + 'Alluvial Deposits: Floodplain', + null, + '70' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'surficialDeposits', + 'Chemical Deposits: Evaporites and Precipitates', + null, + '80' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'surficialDeposits', + 'Glacial Deposits: Bedrock and till', + null, + '90' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'surficialDeposits', + 'Glacial Deposits: Deltaic deposits', + null, + '100' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'surficialDeposits', + 'Glacial Deposits: Glaciofluvial', + null, + '110' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'surficialDeposits', + 'Glacial Deposits: Glaciolacustrine', + null, + '120' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'surficialDeposits', + 'Glacial Deposits: Glaciomarine', + null, + '130' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'surficialDeposits', + 'Glacial Deposits: Moraine', + null, + '140' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'surficialDeposits', + 'Glacial Deposits: Till', + null, + '150' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'surficialDeposits', + 'Glacial Deposits: Undifferentiated glacial deposit', + null, + '160' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'surficialDeposits', + 'Lacustrine Deposits: Coarse sediments', + null, + '170' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'surficialDeposits', + 'Lacustrine Deposits: Fine-grained sediments', + null, + '180' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'surficialDeposits', + 'Lacustrine Deposits: Unconsolidated Sediments', + null, + '190' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'surficialDeposits', + 'Marine Deposits: Coarse sediments', + null, + '200' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'surficialDeposits', + 'Marine Deposits: Fine-grained sediments', + null, + '210' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'surficialDeposits', + 'Marine Deposits: Unconsolidated Sediments', + null, + '220' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'surficialDeposits', + 'Organic Deposits: Muck', + null, + '230' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'surficialDeposits', + 'Organic Deposits: Peat', + null, + '240' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'surficialDeposits', + 'Residual Material: Bedrock', + null, + '260' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'surficialDeposits', + 'Residual Material: Deeply Weathered Rock', + null, + '270' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'surficialDeposits', + 'Residual Material: Disintegrated Rock', + null, + '280' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'surficialDeposits', + 'Slope and Modified Deposits: Colluvial', + null, + '290' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'surficialDeposits', + 'Slope and Modified Deposits: Solifluction, landslide', + null, + '300' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'surficialDeposits', + 'Slope and Modified Deposits: Talus and scree slopes', + null, + '310' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'surficialDeposits', + 'Variable', + null, + '320' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'surficialDeposits', + 'Other', + null, + '330' + ); + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'plot', + 'rockType', + 'Rock Type', + 'logical', + 'yes', + 'varchar (90)', + 'n/a', + 'n/a', + 'closed', + 'n/a', + 'RockType values conform to the lithic types in the FGDC Soil Geographic Data Standards, September 1997. http://www.fgdc.gov/standards/documents/standards/soils/soil997.PDF (pages 56-59).', + + ' plot Plot rockType Rock Type logical varchar (90) n/a n/a closed n/a RockType values conform to the lithic types in the FGDC Soil Geographic Data Standards, September 1997. http://www.fgdc.gov/standards/documents/standards/soils/soil997.PDF (pages 56-59). aa acidic-ash andesite andesitic-ash arkose basalt basaltic-ash basic-ash chalk charcoal chert cinders coal conglomerate, calcareous conglomerate, noncalcareous conglomerate, unspecified diorite dolostone ejecta-ash gabbro glauconite gneiss gneiss-acidic gneiss-basic granite graywacke gypsum hornfels igneous, acid igneous, basic igneous, coarse crystal igneous, fine crystal igneous, intermediate igneous, ultrabasic igneous, unspecified interbedded sedimentary limestone, arenaceous limestone, argillaceous limestone, cherty limestone, phosphatic limestone, unspecified limestone-sandstone limestone-sandstone-shale limestone-shale limestone-siltstone marble marl metaconglomerate metamorphic, unspecified mixed mixed calcareous mixed igneous-metamorphic mixed igneous-metamorphic-sedimentary mixed igneous-sedimentary mixed metamorphic-sedimentary mixed noncalcareous obsidian pahoehoe phyllite pumice pyroclastic, unspecified quartzite rhyolite sandstone, calcareous sandstone, noncalcareous sandstone, unspecified sandstone-shale sandstone-siltstone schist, acidic schist, basic schist, unspecified scoria sedimentary, unspecified serpentinite shale, acid shale, calcareous shale, clayey shale, noncalcareous shale, unspecified shale-siltstone siltstone, calcareous siltstone, noncalcareous siltstone, unspecified slate tuff breccia tuff, acidic tuff, basic tuff, unspecified volcanic bombs volcanic breccia, acidic volcanic breccia, basic volcanic breccia, unspecified wood other no rock visible no observation ' + + ); + + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'rockType', + 'aa', + null, + '10' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'rockType', + 'acidic-ash', + null, + '20' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'rockType', + 'andesite', + null, + '30' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'rockType', + 'andesitic-ash', + null, + '40' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'rockType', + 'arkose', + null, + '50' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'rockType', + 'basalt', + null, + '60' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'rockType', + 'basaltic-ash', + null, + '70' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'rockType', + 'basic-ash', + null, + '80' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'rockType', + 'chalk', + null, + '90' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'rockType', + 'charcoal', + null, + '100' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'rockType', + 'chert', + null, + '110' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'rockType', + 'cinders', + null, + '120' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'rockType', + 'coal', + null, + '130' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'rockType', + 'conglomerate, calcareous', + null, + '140' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'rockType', + 'conglomerate, noncalcareous', + null, + '150' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'rockType', + 'conglomerate, unspecified', + null, + '160' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'rockType', + 'diorite', + null, + '170' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'rockType', + 'dolostone', + null, + '180' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'rockType', + 'ejecta-ash', + null, + '190' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'rockType', + 'gabbro', + null, + '200' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'rockType', + 'glauconite', + null, + '210' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'rockType', + 'gneiss', + null, + '220' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'rockType', + 'gneiss-acidic', + null, + '230' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'rockType', + 'gneiss-basic', + null, + '240' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'rockType', + 'granite', + null, + '250' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'rockType', + 'graywacke', + null, + '260' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'rockType', + 'gypsum', + null, + '270' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'rockType', + 'hornfels', + null, + '280' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'rockType', + 'igneous, acid', + null, + '290' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'rockType', + 'igneous, basic', + null, + '300' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'rockType', + 'igneous, coarse crystal', + null, + '310' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'rockType', + 'igneous, fine crystal', + null, + '320' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'rockType', + 'igneous, intermediate', + null, + '330' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'rockType', + 'igneous, ultrabasic', + null, + '340' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'rockType', + 'igneous, unspecified', + null, + '350' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'rockType', + 'interbedded sedimentary', + null, + '360' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'rockType', + 'limestone, arenaceous', + null, + '370' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'rockType', + 'limestone, argillaceous', + null, + '380' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'rockType', + 'limestone, cherty', + null, + '390' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'rockType', + 'limestone, phosphatic', + null, + '400' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'rockType', + 'limestone, unspecified', + null, + '410' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'rockType', + 'limestone-sandstone', + null, + '420' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'rockType', + 'limestone-sandstone-shale', + null, + '430' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'rockType', + 'limestone-shale', + null, + '440' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'rockType', + 'limestone-siltstone', + null, + '450' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'rockType', + 'marble', + null, + '460' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'rockType', + 'marl', + null, + '470' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'rockType', + 'metaconglomerate', + null, + '480' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'rockType', + 'metamorphic, unspecified', + null, + '490' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'rockType', + 'mixed', + null, + '500' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'rockType', + 'mixed calcareous', + null, + '510' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'rockType', + 'mixed igneous-metamorphic', + null, + '520' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'rockType', + 'mixed igneous-metamorphic-sedimentary', + null, + '530' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'rockType', + 'mixed igneous-sedimentary', + null, + '540' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'rockType', + 'mixed metamorphic-sedimentary', + null, + '550' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'rockType', + 'mixed noncalcareous', + null, + '560' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'rockType', + 'obsidian', + null, + '570' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'rockType', + 'pahoehoe', + null, + '580' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'rockType', + 'phyllite', + null, + '590' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'rockType', + 'pumice', + null, + '600' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'rockType', + 'pyroclastic, unspecified', + null, + '610' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'rockType', + 'quartzite', + null, + '620' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'rockType', + 'rhyolite', + null, + '630' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'rockType', + 'sandstone, calcareous', + null, + '640' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'rockType', + 'sandstone, noncalcareous', + null, + '650' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'rockType', + 'sandstone, unspecified', + null, + '660' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'rockType', + 'sandstone-shale', + null, + '670' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'rockType', + 'sandstone-siltstone', + null, + '680' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'rockType', + 'schist, acidic', + null, + '690' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'rockType', + 'schist, basic', + null, + '700' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'rockType', + 'schist, unspecified', + null, + '710' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'rockType', + 'scoria', + null, + '720' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'rockType', + 'sedimentary, unspecified', + null, + '730' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'rockType', + 'serpentinite', + null, + '740' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'rockType', + 'shale, acid', + null, + '750' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'rockType', + 'shale, calcareous', + null, + '760' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'rockType', + 'shale, clayey', + null, + '770' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'rockType', + 'shale, noncalcareous', + null, + '780' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'rockType', + 'shale, unspecified', + null, + '790' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'rockType', + 'shale-siltstone', + null, + '800' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'rockType', + 'siltstone, calcareous', + null, + '810' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'rockType', + 'siltstone, noncalcareous', + null, + '820' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'rockType', + 'siltstone, unspecified', + null, + '830' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'rockType', + 'slate', + null, + '840' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'rockType', + 'tuff breccia', + null, + '850' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'rockType', + 'tuff, acidic', + null, + '860' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'rockType', + 'tuff, basic', + null, + '870' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'rockType', + 'tuff, unspecified', + null, + '880' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'rockType', + 'volcanic bombs', + null, + '890' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'rockType', + 'volcanic breccia, acidic', + null, + '900' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'rockType', + 'volcanic breccia, basic', + null, + '910' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'rockType', + 'volcanic breccia, unspecified', + null, + '920' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'rockType', + 'wood', + null, + '930' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'rockType', + 'other', + null, + '1000' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'rockType', + 'no rock visible', + null, + '1010' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'plot', + 'rockType', + 'no observation', + null, + '1020' + ); + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'plot', + 'stateProvince', + 'State or Province', + 'logical', + 'yes', + 'varchar (55)', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'State or Province Name (full name) where the plot is located (US and Canada only).', + + ' plot Plot stateProvince State or Province logical varchar (55) n/a n/a no n/a State or Province Name (full name) where the plot is located (US and Canada only). ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'plot', + 'country', + 'Country', + 'logical', + 'yes', + 'varchar (100)', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'Country where the plot is located.', + + ' plot Plot country Country logical varchar (100) n/a n/a no n/a Country where the plot is located. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'plot', + 'dateentered', + 'Date Entered', + 'implementation', + 'yes', + 'Date', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'Date this plot was entered into VegBank', + + ' plot Plot dateentered Date Entered implementation Date n/a n/a no n/a Date this plot was entered into VegBank ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'plot', + 'submitter_surname', + 'Submitter_surname', + 'implementation', + 'yes', + 'varchar (100)', + 'n/a', + 'n/a', + 'no', + 'n/a', + null, + + ' plot Plot submitter_surname Submitter_surname implementation varchar (100) n/a n/a no n/a ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'plot', + 'submitter_givenname', + 'Submitter_givenname', + 'implementation', + 'yes', + 'varchar (100)', + 'n/a', + 'n/a', + 'no', + 'n/a', + null, + + ' plot Plot submitter_givenname Submitter_givenname implementation varchar (100) n/a n/a no n/a ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'plot', + 'submitter_email', + 'Submitter_email', + 'implementation', + 'yes', + 'varchar (100)', + 'n/a', + 'n/a', + 'no', + 'n/a', + null, + + ' plot Plot submitter_email Submitter_email implementation varchar (100) n/a n/a no n/a ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'plot', + 'accessionCode', + 'Accession Code', + 'logical', + 'yes', + 'varchar (255)', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'Code that uniquely references this record, allowing reference to this record for this version of this database. Better than a primary key, which is automatically generated by a database and not globally unique. VegBank Accession codes are only generated by VegBank, and therefore data integrity can be guaranteed, unlike with a primary key (number).', + + ' plot Plot accessionCode Accession Code logical varchar (255) n/a n/a no n/a Code that uniquely references this record, allowing reference to this record for this version of this database. Better than a primary key, which is automatically generated by a database and not globally unique. VegBank Accession codes are only generated by VegBank, and therefore data integrity can be guaranteed, unlike with a primary key (number). ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'plot', + 'notesPublic', + 'Notes Public', + 'logical', + 'yes', + 'Boolean', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'TRUE indicates that public notes pertaining to this plot exist in "vegPlot.note"', + + ' plot Plot notesPublic Notes Public logical Boolean n/a n/a no n/a TRUE indicates that public notes pertaining to this plot exist in "vegPlot.note" ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'plot', + 'notesMgt', + 'Notes Mgt', + 'logical', + 'yes', + 'Boolean', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'TRUE indicates that nonpublic management notes pertaining to this plot exist in "vegPlot.note"', + + ' plot Plot notesMgt Notes Mgt logical Boolean n/a n/a no n/a TRUE indicates that nonpublic management notes pertaining to this plot exist in "vegPlot.note" ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'plot', + 'revisions', + 'Revisions', + 'logical', + 'yes', + 'Boolean', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'TRUE indicates that revisions exist in vegPlot.Revision', + + ' plot Plot revisions Revisions logical Boolean n/a n/a no n/a TRUE indicates that revisions exist in vegPlot.Revision ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'plot', + 'emb_plot', + 'this row embargoed.', + 'denorm', + 'yes', + 'Integer', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'This value mimics the default embargo value for the plot that this record belongs to.', + + ' plot Plot emb_plot this row embargoed. denorm Integer n/a n/a no n/a This value mimics the default embargo value for the plot that this record belongs to. ' + + ); + + + INSERT INTO dba_tableDescription ( tableName , tableLabel , tableNotes , tableDescription , tableKeywords ) values ( + 'project', + 'Project', + 'This table stores information about a project established to collect vegetation plot data.', + 'Each plot originates as part of a project. A project can contain from one to many plots.', + ' project Project This table stores information about a project established to collect vegetation plot data. Each plot originates as part of a project. A project can contain from one to many plots. PROJECT_ID ID projectName Project Name projectDescription Project Description startDate Start Date stopDate Stop Date accessionCode Accession Code d_obscount Plot Count d_lastplotaddeddate date last plot added ' + ); + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'project', + 'PROJECT_ID', + 'ID', + 'logical', + 'yes', + 'serial', + 'PK', + 'n/a', + 'no', + 'Primary key for the project table.', + 'Database generated identifier assigned to each unique project.', + + ' project Project PROJECT_ID ID logical serial PK n/a no Primary key for the project table. Database generated identifier assigned to each unique project. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'project', + 'projectName', + 'Project Name', + 'logical', + 'no', + 'varchar (150)', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'Project name as defined by the principal investigator.', + + ' project Project projectName Project Name logical required varchar (150) n/a n/a no n/a Project name as defined by the principal investigator. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'project', + 'projectDescription', + 'Project Description', + 'logical', + 'yes', + 'text', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'Short description of the project including the original purpose for conducting the project. This can be viewed as the project abstract plus supporting metadata.', + + ' project Project projectDescription Project Description logical text n/a n/a no n/a Short description of the project including the original purpose for conducting the project. This can be viewed as the project abstract plus supporting metadata. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'project', + 'startDate', + 'Start Date', + 'logical', + 'yes', + 'Date', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'Project start date.', + + ' project Project startDate Start Date logical Date n/a n/a no n/a Project start date. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'project', + 'stopDate', + 'Stop Date', + 'logical', + 'yes', + 'Date', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'Project stop date.', + + ' project Project stopDate Stop Date logical Date n/a n/a no n/a Project stop date. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'project', + 'accessionCode', + 'Accession Code', + 'logical', + 'yes', + 'varchar (255)', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'Code that uniquely references this record, allowing reference to this record for this version of this database. Better than a primary key, which is automatically generated by a database and not globally unique. VegBank Accession codes are only generated by VegBank, and therefore data integrity can be guaranteed, unlike with a primary key (number).', + + ' project Project accessionCode Accession Code logical varchar (255) n/a n/a no n/a Code that uniquely references this record, allowing reference to this record for this version of this database. Better than a primary key, which is automatically generated by a database and not globally unique. VegBank Accession codes are only generated by VegBank, and therefore data integrity can be guaranteed, unlike with a primary key (number). ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'project', + 'd_obscount', + 'Plot Count', + 'denorm', + 'yes', + 'Integer', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'Number of observations associated with this entity.', + + ' project Project d_obscount Plot Count denorm Integer n/a n/a no n/a Number of observations associated with this entity. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'project', + 'd_lastplotaddeddate', + 'date last plot added', + 'denorm', + 'yes', + 'Date', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'Date a plot was last added to this project.', + + ' project Project d_lastplotaddeddate date last plot added denorm Date n/a n/a no n/a Date a plot was last added to this project. ' + + ); + + + INSERT INTO dba_tableDescription ( tableName , tableLabel , tableNotes , tableDescription , tableKeywords ) values ( + 'projectContributor', + 'Project Contributor', + 'This table stores information about a party contributing to a project.', + 'This table serves as an intersection entity used to ''link'' a party with a specific project wherein vegetation plots are described.', + ' projectContributor Project Contributor This table stores information about a party contributing to a project. This table serves as an intersection entity used to ''link'' a party with a specific project wherein vegetation plots are described. PROJECTCONTRIBUTOR_ID ID PROJECT_ID Project PARTY_ID Party ROLE_ID Role surname Surname cheatRole Role ' + ); + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'projectContributor', + 'PROJECTCONTRIBUTOR_ID', + 'ID', + 'logical', + 'yes', + 'serial', + 'PK', + 'n/a', + 'no', + 'Primary key for the projectContributor table.', + 'Database generated identifier assigned to each unique contribution to a project.', + + ' projectContributor Project Contributor PROJECTCONTRIBUTOR_ID ID logical serial PK n/a no Primary key for the projectContributor table. Database generated identifier assigned to each unique contribution to a project. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'projectContributor', + 'PROJECT_ID', + 'Project', + 'logical', + 'no', + 'Integer', + 'FK', + 'project.PROJECT_ID', + 'no', + 'Foreign key into the project table', + 'Foreign key linking the contribution to a specific project.', + + ' projectContributor Project Contributor PROJECT_ID Project logical required Integer FK project.PROJECT_ID no Foreign key into the project table Foreign key linking the contribution to a specific project. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'projectContributor', + 'PARTY_ID', + 'Party', + 'logical', + 'no', + 'Integer', + 'FK', + 'party.PARTY_ID', + 'no', + 'Foreign key into the party table', + 'Foreign key linking the contribution to a specific party.', + + ' projectContributor Project Contributor PARTY_ID Party logical required Integer FK party.PARTY_ID no Foreign key into the party table Foreign key linking the contribution to a specific party. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'projectContributor', + 'ROLE_ID', + 'Role', + 'logical', + 'yes', + 'Integer', + 'FK', + 'aux_Role.ROLE_ID', + 'no', + 'Foreign key into aux_Role table', + 'Foreign key that identifies the role that a specific party played in the project (e.g., PI, coPI, contact, author, research advisor, etc.).', + + ' projectContributor Project Contributor ROLE_ID Role logical Integer FK aux_Role.ROLE_ID no Foreign key into aux_Role table Foreign key that identifies the role that a specific party played in the project (e.g., PI, coPI, contact, author, research advisor, etc.). ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'projectContributor', + 'surname', + 'Surname', + 'implementation', + 'yes', + 'varchar (50)', + 'n/a', + 'n/a', + 'no', + null, + null, + + ' projectContributor Project Contributor surname Surname implementation varchar (50) n/a n/a no ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'projectContributor', + 'cheatRole', + 'Role', + 'implementation', + 'yes', + 'varchar (50)', + 'n/a', + 'n/a', + 'no', + null, + null, + + ' projectContributor Project Contributor cheatRole Role implementation varchar (50) n/a n/a no ' + + ); + + + INSERT INTO dba_tableDescription ( tableName , tableLabel , tableNotes , tableDescription , tableKeywords ) values ( + 'revision', + 'Revision', + 'This table constitutes a log of changes in data deposited in the database.', + 'This table was designed to store as a single, stand-alone table information about attributes in any of the database tables.', + ' revision Revision This table constitutes a log of changes in data deposited in the database. This table was designed to store as a single, stand-alone table information about attributes in any of the database tables. REVISION_ID ID tableName Table Name tableAttribute Table Attribute tableRecord Table Record revisionDate Revision Date previousValueText Previous Value Text previousValueType Previous Value Type previousRevision_ID Previous Revision ' + ); + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'revision', + 'REVISION_ID', + 'ID', + 'logical', + 'yes', + 'serial', + 'PK', + 'n/a', + 'no', + 'Primary key for the revision table', + 'Database generated identifier assigned to each unique revision.', + + ' revision Revision REVISION_ID ID logical serial PK n/a no Primary key for the revision table Database generated identifier assigned to each unique revision. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'revision', + 'tableName', + 'Table Name', + 'logical', + 'no', + 'varchar (50)', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'Name of the table where the change occurred.', + + ' revision Revision tableName Table Name logical required varchar (50) n/a n/a no n/a Name of the table where the change occurred. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'revision', + 'tableAttribute', + 'Table Attribute', + 'logical', + 'no', + 'varchar (50)', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'The name of the attribute where the chance occurred.', + + ' revision Revision tableAttribute Table Attribute logical required varchar (50) n/a n/a no n/a The name of the attribute where the chance occurred. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'revision', + 'tableRecord', + 'Table Record', + 'logical', + 'no', + 'Integer', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'The number of the record in which the change occurred (i.e., the value of the primary key associated with the value in which the change occurred)', + + ' revision Revision tableRecord Table Record logical required Integer n/a n/a no n/a The number of the record in which the change occurred (i.e., the value of the primary key associated with the value in which the change occurred) ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'revision', + 'revisionDate', + 'Revision Date', + 'logical', + 'no', + 'Date', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'The date on which the revision was made.', + + ' revision Revision revisionDate Revision Date logical required Date n/a n/a no n/a The date on which the revision was made. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'revision', + 'previousValueText', + 'Previous Value Text', + 'logical', + 'no', + 'text', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'The previous value as a character string.', + + ' revision Revision previousValueText Previous Value Text logical required text n/a n/a no n/a The previous value as a character string. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'revision', + 'previousValueType', + 'Previous Value Type', + 'logical', + 'no', + 'varchar (20)', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'The data type of the attribute changed.', + + ' revision Revision previousValueType Previous Value Type logical required varchar (20) n/a n/a no n/a The data type of the attribute changed. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'revision', + 'previousRevision_ID', + 'Previous Revision', + 'logical', + 'yes', + 'Integer', + 'FK', + 'revision.REVISION_ID', + 'no', + 'Recursive foreign key', + 'Pointer to a previous record of a revision.', + + ' revision Revision previousRevision_ID Previous Revision logical Integer FK revision.REVISION_ID no Recursive foreign key Pointer to a previous record of a revision. ' + + ); + + + INSERT INTO dba_tableDescription ( tableName , tableLabel , tableNotes , tableDescription , tableKeywords ) values ( + 'soilObs', + 'Soil Observation', + 'This table stores observation on soil horizons made during the plot observation event.', + 'soilObs is child of observation in recognition of the fact that the horizons observed vary among plot observation events as a results of real change plus changes in investigators, methods and circumstances.', + ' soilObs Soil Observation This table stores observation on soil horizons made during the plot observation event. soilObs is child of observation in recognition of the fact that the horizons observed vary among plot observation events as a results of real change plus changes in investigators, methods and circumstances. SOILOBS_ID ID OBSERVATION_ID Observation soilHorizon Soil Horizon soilDepthTop Soil Depth Top soilDepthBottom Soil Depth Bottom soilColor Soil Color soilOrganic Soil Organic soilTexture Soil Texture soilSand Soil Sand soilSilt Soil Silt soilClay Soil Clay soilCoarse Soil Coarse soilPH Soil PH exchangeCapacity Exchange Capacity baseSaturation Base Saturation soilDescription Soil Description emb_soilObs this row embargoed. ' + ); + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'soilObs', + 'SOILOBS_ID', + 'ID', + 'logical', + 'yes', + 'serial', + 'PK', + 'n/a', + 'no', + 'Primary key for observation', + 'Database generated identifier assigned to each unique soil observation.', + + ' soilObs Soil Observation SOILOBS_ID ID logical serial PK n/a no Primary key for observation Database generated identifier assigned to each unique soil observation. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'soilObs', + 'OBSERVATION_ID', + 'Observation', + 'logical', + 'no', + 'Integer', + 'FK', + 'observation.OBSERVATION_ID', + 'no', + 'Foreign key to parent plot', + 'Link to the observation event to which this soil observation is associated.', + + ' soilObs Soil Observation OBSERVATION_ID Observation logical required Integer FK observation.OBSERVATION_ID no Foreign key to parent plot Link to the observation event to which this soil observation is associated. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'soilObs', + 'soilHorizon', + 'Soil Horizon', + 'logical', + 'no', + 'varchar (15)', + 'n/a', + 'n/a', + 'closed', + 'closed list - USDA', + 'The horizon to which this observation applies.', + + ' soilObs Soil Observation soilHorizon Soil Horizon logical required varchar (15) n/a n/a closed closed list - USDA The horizon to which this observation applies. A B C E L O R unknown ' + + ); + + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'soilObs', + 'soilHorizon', + 'L', + null, + '1' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'soilObs', + 'soilHorizon', + 'O', + null, + '2' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'soilObs', + 'soilHorizon', + 'A', + null, + '3' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'soilObs', + 'soilHorizon', + 'E', + null, + '4' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'soilObs', + 'soilHorizon', + 'B', + null, + '5' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'soilObs', + 'soilHorizon', + 'C', + null, + '6' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'soilObs', + 'soilHorizon', + 'R', + null, + '7' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'soilObs', + 'soilHorizon', + 'unknown', + null, + '8' + ); + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'soilObs', + 'soilDepthTop', + 'Soil Depth Top', + 'logical', + 'yes', + 'Float', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'The depth at which the horizon observation starts.', + + ' soilObs Soil Observation soilDepthTop Soil Depth Top logical Float n/a n/a no n/a The depth at which the horizon observation starts. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'soilObs', + 'soilDepthBottom', + 'Soil Depth Bottom', + 'logical', + 'yes', + 'Float', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'The depth at which the horizon observation ends.', + + ' soilObs Soil Observation soilDepthBottom Soil Depth Bottom logical Float n/a n/a no n/a The depth at which the horizon observation ends. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'soilObs', + 'soilColor', + 'Soil Color', + 'logical', + 'yes', + 'varchar (30)', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'Soil color (USDA guidelines recommended).', + + ' soilObs Soil Observation soilColor Soil Color logical varchar (30) n/a n/a no n/a Soil color (USDA guidelines recommended). ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'soilObs', + 'soilOrganic', + 'Soil Organic', + 'logical', + 'yes', + 'Float', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'Percent organic content of the soil (for methods see observation.methodsNarrative).', + + ' soilObs Soil Observation soilOrganic Soil Organic logical Float n/a n/a no n/a Percent organic content of the soil (for methods see observation.methodsNarrative). ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'soilObs', + 'soilTexture', + 'Soil Texture', + 'logical', + 'yes', + 'varchar (50)', + 'n/a', + 'n/a', + 'closed', + 'closed list - USDA', + 'Soil texture class.The texture classes sands, loamy sands, and sandy loams (plural terms) correspond to sand, loamy sand, and sandy loam (singular terms) in the textural triangle.', + + ' soilObs Soil Observation soilTexture Soil Texture logical varchar (50) n/a n/a closed closed list - USDA Soil texture class.The texture classes sands, loamy sands, and sandy loams (plural terms) correspond to sand, loamy sand, and sandy loam (singular terms) in the textural triangle. Sands: Coarse Sand Texture Group: Sandy soils | General Term: Coarse-textured | Texture Class: Sands | Texture Subclass: Coarse Sand Sands: Sand Texture Group: Sandy soils | General Term: Coarse-textured | Texture Class: Sands | Texture Subclass: Sand Sands: Fine Sand Texture Group: Sandy soils | General Term: Coarse-textured | Texture Class: Sands | Texture Subclass: Fine Sand Sands: Very Fine Sand Texture Group: Sandy soils | General Term: Coarse-textured | Texture Class: Sands | Texture Subclass: Very Fine Sand Sands: (unspecified) Texture Group: Sandy soils | General Term: Coarse-textured | Texture Class: Sands | Texture Subclass: (unspecified) Loamy Sands: Loamy Coarse Sand Texture Group: Sandy soils | General Term: Coarse-textured | Texture Class: Loamy Sands | Texture Subclass: Loamy Coarse Sand Loamy Sands: Loamy Sand Texture Group: Sandy soils | General Term: Coarse-textured | Texture Class: Loamy Sands | Texture Subclass: Loamy Sand Loamy Sands: Loamy Fine Sand Texture Group: Sandy soils | General Term: Coarse-textured | Texture Class: Loamy Sands | Texture Subclass: Loamy Fine Sand Loamy Sands: Loamy Very Fine Sand Texture Group: Sandy soils | General Term: Coarse-textured | Texture Class: Loamy Sands | Texture Subclass: Loamy Very Fine Sand Loamy Sands: (unspecified) Texture Group: Sandy soils | General Term: Coarse-textured | Texture Class: Loamy Sands | Texture Subclass: (unspecified) Sandy Loams: Coarse Sandy Loam Texture Group: Loamy soils | General Term: Moderately coarse-textured | Texture Class: Sandy Loams | Texture Subclass: Coarse Sandy Loam Sandy Loams: Sandy Loam Texture Group: Loamy soils | General Term: Moderately coarse-textured | Texture Class: Sandy Loams | Texture Subclass: Sandy Loam Sandy Loams: Fine Sandy Loam Texture Group: Loamy soils | General Term: Moderately coarse-textured | Texture Class: Sandy Loams | Texture Subclass: Fine Sandy Loam Sandy Loams: Very Fine Sandy Loam Texture Group: Loamy soils | General Term: Medium-textured | Texture Class: Sandy Loams | Texture Subclass: Very Fine Sandy Loam Sandy Loams: (unspecified) Texture Group: Loamy soils | General Term: Moderately coarse-textured to Medium-textured | Texture Class: Sandy Loams | Texture Subclass: (unspecified) Loam Texture Group: Loamy soils | General Term: Medium-textured | Texture Class: Loam | Texture Subclass: Loam Silt Loam Texture Group: Loamy soils | General Term: Medium-textured | Texture Class: Silt Loam | Texture Subclass: Silt Loam Silt Texture Group: Loamy soils | General Term: Medium-textured | Texture Class: Silt | Texture Subclass: Silt Sandy Clay Loam Texture Group: Loamy soils | General Term: Moderately fine-textured | Texture Class: Sandy Clay Loam | Texture Subclass: Sandy Clay Loam Clay Loam Texture Group: Loamy soils | General Term: Moderately fine-textured | Texture Class: Clay Loam | Texture Subclass: Clay Loam Silty Clay Loam Texture Group: Loamy soils | General Term: Moderately fine-textured | Texture Class: Silty Clay Loam | Texture Subclass: Silty Clay Loam Sandy Clay Texture Group: Clayey soils | General Term: Fine-textured | Texture Class: Sandy Clay | Texture Subclass: Sandy Clay Silty Clay Texture Group: Clayey soils | General Term: Fine-textured | Texture Class: Silty Clay | Texture Subclass: Silty Clay Clay Texture Group: Clayey soils | General Term: Fine-textured | Texture Class: Clay | Texture Subclass: Clay ' + + ); + + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'soilObs', + 'soilTexture', + 'Sands: Coarse Sand', + 'Texture Group: Sandy soils | General Term: Coarse-textured | Texture Class: Sands | Texture Subclass: Coarse Sand', + '1' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'soilObs', + 'soilTexture', + 'Sands: Sand', + 'Texture Group: Sandy soils | General Term: Coarse-textured | Texture Class: Sands | Texture Subclass: Sand', + '2' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'soilObs', + 'soilTexture', + 'Sands: Fine Sand', + 'Texture Group: Sandy soils | General Term: Coarse-textured | Texture Class: Sands | Texture Subclass: Fine Sand', + '3' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'soilObs', + 'soilTexture', + 'Sands: Very Fine Sand', + 'Texture Group: Sandy soils | General Term: Coarse-textured | Texture Class: Sands | Texture Subclass: Very Fine Sand', + '4' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'soilObs', + 'soilTexture', + 'Sands: (unspecified)', + 'Texture Group: Sandy soils | General Term: Coarse-textured | Texture Class: Sands | Texture Subclass: (unspecified)', + '5' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'soilObs', + 'soilTexture', + 'Loamy Sands: Loamy Coarse Sand', + 'Texture Group: Sandy soils | General Term: Coarse-textured | Texture Class: Loamy Sands | Texture Subclass: Loamy Coarse Sand', + '6' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'soilObs', + 'soilTexture', + 'Loamy Sands: Loamy Sand', + 'Texture Group: Sandy soils | General Term: Coarse-textured | Texture Class: Loamy Sands | Texture Subclass: Loamy Sand', + '7' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'soilObs', + 'soilTexture', + 'Loamy Sands: Loamy Fine Sand', + 'Texture Group: Sandy soils | General Term: Coarse-textured | Texture Class: Loamy Sands | Texture Subclass: Loamy Fine Sand', + '8' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'soilObs', + 'soilTexture', + 'Loamy Sands: Loamy Very Fine Sand', + 'Texture Group: Sandy soils | General Term: Coarse-textured | Texture Class: Loamy Sands | Texture Subclass: Loamy Very Fine Sand', + '9' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'soilObs', + 'soilTexture', + 'Loamy Sands: (unspecified)', + 'Texture Group: Sandy soils | General Term: Coarse-textured | Texture Class: Loamy Sands | Texture Subclass: (unspecified)', + '10' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'soilObs', + 'soilTexture', + 'Sandy Loams: Coarse Sandy Loam', + 'Texture Group: Loamy soils | General Term: Moderately coarse-textured | Texture Class: Sandy Loams | Texture Subclass: Coarse Sandy Loam', + '11' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'soilObs', + 'soilTexture', + 'Sandy Loams: Sandy Loam', + 'Texture Group: Loamy soils | General Term: Moderately coarse-textured | Texture Class: Sandy Loams | Texture Subclass: Sandy Loam', + '12' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'soilObs', + 'soilTexture', + 'Sandy Loams: Fine Sandy Loam', + 'Texture Group: Loamy soils | General Term: Moderately coarse-textured | Texture Class: Sandy Loams | Texture Subclass: Fine Sandy Loam', + '13' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'soilObs', + 'soilTexture', + 'Sandy Loams: Very Fine Sandy Loam', + 'Texture Group: Loamy soils | General Term: Medium-textured | Texture Class: Sandy Loams | Texture Subclass: Very Fine Sandy Loam', + '14' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'soilObs', + 'soilTexture', + 'Sandy Loams: (unspecified)', + 'Texture Group: Loamy soils | General Term: Moderately coarse-textured to Medium-textured | Texture Class: Sandy Loams | Texture Subclass: (unspecified)', + '15' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'soilObs', + 'soilTexture', + 'Loam', + 'Texture Group: Loamy soils | General Term: Medium-textured | Texture Class: Loam | Texture Subclass: Loam', + '16' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'soilObs', + 'soilTexture', + 'Silt Loam', + 'Texture Group: Loamy soils | General Term: Medium-textured | Texture Class: Silt Loam | Texture Subclass: Silt Loam', + '17' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'soilObs', + 'soilTexture', + 'Silt', + 'Texture Group: Loamy soils | General Term: Medium-textured | Texture Class: Silt | Texture Subclass: Silt', + '18' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'soilObs', + 'soilTexture', + 'Sandy Clay Loam', + 'Texture Group: Loamy soils | General Term: Moderately fine-textured | Texture Class: Sandy Clay Loam | Texture Subclass: Sandy Clay Loam', + '19' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'soilObs', + 'soilTexture', + 'Clay Loam', + 'Texture Group: Loamy soils | General Term: Moderately fine-textured | Texture Class: Clay Loam | Texture Subclass: Clay Loam', + '20' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'soilObs', + 'soilTexture', + 'Silty Clay Loam', + 'Texture Group: Loamy soils | General Term: Moderately fine-textured | Texture Class: Silty Clay Loam | Texture Subclass: Silty Clay Loam', + '21' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'soilObs', + 'soilTexture', + 'Sandy Clay', + 'Texture Group: Clayey soils | General Term: Fine-textured | Texture Class: Sandy Clay | Texture Subclass: Sandy Clay', + '22' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'soilObs', + 'soilTexture', + 'Silty Clay', + 'Texture Group: Clayey soils | General Term: Fine-textured | Texture Class: Silty Clay | Texture Subclass: Silty Clay', + '23' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'soilObs', + 'soilTexture', + 'Clay', + 'Texture Group: Clayey soils | General Term: Fine-textured | Texture Class: Clay | Texture Subclass: Clay', + '24' + ); + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'soilObs', + 'soilSand', + 'Soil Sand', + 'logical', + 'yes', + 'Float', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'Percent sand in the soil horizon.', + + ' soilObs Soil Observation soilSand Soil Sand logical Float n/a n/a no n/a Percent sand in the soil horizon. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'soilObs', + 'soilSilt', + 'Soil Silt', + 'logical', + 'yes', + 'Float', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'Percent silt in the soil horizon.', + + ' soilObs Soil Observation soilSilt Soil Silt logical Float n/a n/a no n/a Percent silt in the soil horizon. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'soilObs', + 'soilClay', + 'Soil Clay', + 'logical', + 'yes', + 'Float', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'Percent clay in the soil horizon.', + + ' soilObs Soil Observation soilClay Soil Clay logical Float n/a n/a no n/a Percent clay in the soil horizon. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'soilObs', + 'soilCoarse', + 'Soil Coarse', + 'logical', + 'yes', + 'Float', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'percent coarse fragments in the soil, prior to removal for textural analysis', + + ' soilObs Soil Observation soilCoarse Soil Coarse logical Float n/a n/a no n/a percent coarse fragments in the soil, prior to removal for textural analysis ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'soilObs', + 'soilPH', + 'Soil PH', + 'logical', + 'yes', + 'Float', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'pH of the soil (for methods see observation.methodsNarrative).', + + ' soilObs Soil Observation soilPH Soil PH logical Float n/a n/a no n/a pH of the soil (for methods see observation.methodsNarrative). ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'soilObs', + 'exchangeCapacity', + 'Exchange Capacity', + 'logical', + 'yes', + 'Float', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'Cation exchange capacity (for methods see observation.methodsNarrative).', + + ' soilObs Soil Observation exchangeCapacity Exchange Capacity logical Float n/a n/a no n/a Cation exchange capacity (for methods see observation.methodsNarrative). ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'soilObs', + 'baseSaturation', + 'Base Saturation', + 'logical', + 'yes', + 'Float', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'Percent base saturation (for methods see observation.methodsNarrative).', + + ' soilObs Soil Observation baseSaturation Base Saturation logical Float n/a n/a no n/a Percent base saturation (for methods see observation.methodsNarrative). ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'soilObs', + 'soilDescription', + 'Soil Description', + 'logical', + 'yes', + 'text', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'Text description of the soil.', + + ' soilObs Soil Observation soilDescription Soil Description logical text n/a n/a no n/a Text description of the soil. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'soilObs', + 'emb_soilObs', + 'this row embargoed.', + 'denorm', + 'yes', + 'Integer', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'This value mimics the default embargo value for the plot that this record belongs to.', + + ' soilObs Soil Observation emb_soilObs this row embargoed. denorm Integer n/a n/a no n/a This value mimics the default embargo value for the plot that this record belongs to. ' + + ); + + + INSERT INTO dba_tableDescription ( tableName , tableLabel , tableNotes , tableDescription , tableKeywords ) values ( + 'soilTaxon', + 'Soil Taxon', + 'This table stores the valid soilTaxon records that may be used to describe the soil of a plot.', + null, + ' soilTaxon Soil Taxon This table stores the valid soilTaxon records that may be used to describe the soil of a plot. SOILTAXON_ID ID soilCode Soil Code soilName Soil Name soilLevel Soil Level SOILPARENT_ID Soil Parent soilFramework Soil Framework accessionCode Accession Code ' + ); + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'soilTaxon', + 'SOILTAXON_ID', + 'ID', + 'logical', + 'yes', + 'serial', + 'PK', + 'n/a', + 'no', + 'Primary key for the aux_Soil table.', + 'Database assigned value for a unique soil type', + + ' soilTaxon Soil Taxon SOILTAXON_ID ID logical serial PK n/a no Primary key for the aux_Soil table. Database assigned value for a unique soil type ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'soilTaxon', + 'soilCode', + 'Soil Code', + 'logical', + 'yes', + 'varchar (15)', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'SCS Code', + + ' soilTaxon Soil Taxon soilCode Soil Code logical varchar (15) n/a n/a no n/a SCS Code ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'soilTaxon', + 'soilName', + 'Soil Name', + 'logical', + 'yes', + 'varchar (100)', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'Name of soil type', + + ' soilTaxon Soil Taxon soilName Soil Name logical varchar (100) n/a n/a no n/a Name of soil type ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'soilTaxon', + 'soilLevel', + 'Soil Level', + 'logical', + 'yes', + 'Integer', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'Hierarchical level; 1=Order, 2=Suborder, 3=GreatGroup, 4=SubGroup, 5=Family, 6=Series', + + ' soilTaxon Soil Taxon soilLevel Soil Level logical Integer n/a n/a no n/a Hierarchical level; 1=Order, 2=Suborder, 3=GreatGroup, 4=SubGroup, 5=Family, 6=Series ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'soilTaxon', + 'SOILPARENT_ID', + 'Soil Parent', + 'logical', + 'yes', + 'Integer', + 'FK', + 'soilTaxon.SOILTAXON_ID', + 'no', + 'n/a', + 'Parent soil taxon in the soil taxon hierarchy for this particular framwork. For example, in USDA soils list, the parent of a soil SubGroup would be the GreatGroup.', + + ' soilTaxon Soil Taxon SOILPARENT_ID Soil Parent logical Integer FK soilTaxon.SOILTAXON_ID no n/a Parent soil taxon in the soil taxon hierarchy for this particular framwork. For example, in USDA soils list, the parent of a soil SubGroup would be the GreatGroup. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'soilTaxon', + 'soilFramework', + 'Soil Framework', + 'logical', + 'yes', + 'varchar (33)', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'System in which this soil taxon is part. This field may be used to separate multiple soil taxonomic systems. Each unique soil taxonomic system should have all its soilTaxon records with the same soilFramework value. Correlation of different framework taxa is not currently possible.', + + ' soilTaxon Soil Taxon soilFramework Soil Framework logical varchar (33) n/a n/a no n/a System in which this soil taxon is part. This field may be used to separate multiple soil taxonomic systems. Each unique soil taxonomic system should have all its soilTaxon records with the same soilFramework value. Correlation of different framework taxa is not currently possible. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'soilTaxon', + 'accessionCode', + 'Accession Code', + 'logical', + 'yes', + 'varchar (255)', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'Code that uniquely references this record, allowing reference to this record for this version of this database. Better than a primary key, which is automatically generated by a database and not globally unique. VegBank Accession codes are only generated by VegBank, and therefore data integrity can be guaranteed, unlike with a primary key (number).', + + ' soilTaxon Soil Taxon accessionCode Accession Code logical varchar (255) n/a n/a no n/a Code that uniquely references this record, allowing reference to this record for this version of this database. Better than a primary key, which is automatically generated by a database and not globally unique. VegBank Accession codes are only generated by VegBank, and therefore data integrity can be guaranteed, unlike with a primary key (number). ' + + ); + + + INSERT INTO dba_tableDescription ( tableName , tableLabel , tableNotes , tableDescription , tableKeywords ) values ( + 'stemCount', + 'Stem Count', + 'This table is intended to store information about the abundance of tree stems of a specific size.', + null, + ' stemCount Stem Count This table is intended to store information about the abundance of tree stems of a specific size. STEMCOUNT_ID ID TAXONIMPORTANCE_ID Taxon Importance stemDiameter DBH stemDiameterAccuracy DBH err stemHeight Ht. stemHeightAccuracy Ht. Err stemCount # stemTaxonArea Stem Taxon Area emb_stemCount this row embargoed. ' + ); + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'stemCount', + 'STEMCOUNT_ID', + 'ID', + 'logical', + 'yes', + 'serial', + 'PK', + 'n/a', + 'no', + 'Primary Key for the stemSize table.', + 'Database generated identifier assigned to each unique stem tally.', + + ' stemCount Stem Count STEMCOUNT_ID ID logical serial PK n/a no Primary Key for the stemSize table. Database generated identifier assigned to each unique stem tally. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'stemCount', + 'TAXONIMPORTANCE_ID', + 'Taxon Importance', + 'logical', + 'no', + 'Integer', + 'FK', + 'taxonImportance.taxonImportance_ID', + 'no', + 'Foreign key into the taxonImportance table', + 'Foreign key into the taxonImportance table, thereby associating a taxon identification with the tree stem(s).', + + ' stemCount Stem Count TAXONIMPORTANCE_ID Taxon Importance logical required Integer FK taxonImportance.taxonImportance_ID no Foreign key into the taxonImportance table Foreign key into the taxonImportance table, thereby associating a taxon identification with the tree stem(s). ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'stemCount', + 'stemDiameter', + 'DBH', + 'logical', + 'yes', + 'Float', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'The diameter of the stem in centimeters. When diameter classes are used, the stemDiameter is the midpoint between the low end and high end for the diameter class; the offset between this and the endpoints is stored in the stemDiameterAccuracy attribute.', + + ' stemCount Stem Count stemDiameter DBH logical Float n/a n/a no n/a The diameter of the stem in centimeters. When diameter classes are used, the stemDiameter is the midpoint between the low end and high end for the diameter class; the offset between this and the endpoints is stored in the stemDiameterAccuracy attribute. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'stemCount', + 'stemDiameterAccuracy', + 'DBH err', + 'logical', + 'yes', + 'Float', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'The accuracy of the stem diameter measurements in centimeters. This represents the distance between the diameter class midpoint and endpoint.', + + ' stemCount Stem Count stemDiameterAccuracy DBH err logical Float n/a n/a no n/a The accuracy of the stem diameter measurements in centimeters. This represents the distance between the diameter class midpoint and endpoint. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'stemCount', + 'stemHeight', + 'Ht.', + 'logical', + 'yes', + 'Float', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'The measured height of the stem in meters. When height classes are used, the stemHeight is the midpoint between the low end and high end for the height class; the offset between this and the endpoint is stored in the stemHeightAccuracy field.', + + ' stemCount Stem Count stemHeight Ht. logical Float n/a n/a no n/a The measured height of the stem in meters. When height classes are used, the stemHeight is the midpoint between the low end and high end for the height class; the offset between this and the endpoint is stored in the stemHeightAccuracy field. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'stemCount', + 'stemHeightAccuracy', + 'Ht. Err', + 'logical', + 'yes', + 'Float', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'The accuracy of the measured height of a stem, being the offset between the midpoint of the class and the endpoint, in meters.', + + ' stemCount Stem Count stemHeightAccuracy Ht. Err logical Float n/a n/a no n/a The accuracy of the measured height of a stem, being the offset between the midpoint of the class and the endpoint, in meters. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'stemCount', + 'stemCount', + '#', + 'logical', + 'no', + 'Integer', + 'n/a', + 'n/a', + 'no', + 'The default value is 1. This field is not logically necessary, but allows for more compact entry and storage of tree stem tally data.', + 'The number of stems of a single species that have these specific stem diameter and height data in common.', + + ' stemCount Stem Count stemCount # logical required Integer n/a n/a no The default value is 1. This field is not logically necessary, but allows for more compact entry and storage of tree stem tally data. The number of stems of a single species that have these specific stem diameter and height data in common. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'stemCount', + 'stemTaxonArea', + 'Stem Taxon Area', + 'logical', + 'yes', + 'Float', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'This is the area in m2 used to infer the presence of the stem(s) referenced in this record. Overrides similar area field in taxonObservation, taxonImportance, and/or observation. RESERVED VALUE: -1 is used to indicate no known boundaries were used while collecting this stem size.', + + ' stemCount Stem Count stemTaxonArea Stem Taxon Area logical Float n/a n/a no n/a This is the area in m2 used to infer the presence of the stem(s) referenced in this record. Overrides similar area field in taxonObservation, taxonImportance, and/or observation. RESERVED VALUE: -1 is used to indicate no known boundaries were used while collecting this stem size. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'stemCount', + 'emb_stemCount', + 'this row embargoed.', + 'denorm', + 'yes', + 'Integer', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'This value mimics the default embargo value for the plot that this record belongs to.', + + ' stemCount Stem Count emb_stemCount this row embargoed. denorm Integer n/a n/a no n/a This value mimics the default embargo value for the plot that this record belongs to. ' + + ); + + + INSERT INTO dba_tableDescription ( tableName , tableLabel , tableNotes , tableDescription , tableKeywords ) values ( + 'stemLocation', + 'Stem Location', + 'This table is intended to store location information about individual tree stems.', + null, + ' stemLocation Stem Location This table is intended to store location information about individual tree stems. STEMLOCATION_ID ID STEMCOUNT_ID Stem Count stemCode Stem Code stemXPosition Stem X Position stemYPosition Stem Y Position stemHealth Stem Health emb_stemLocation this row embargoed. ' + ); + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'stemLocation', + 'STEMLOCATION_ID', + 'ID', + 'logical', + 'yes', + 'serial', + 'PK', + 'n/a', + 'no', + 'Primary Key for the stemLocation table.', + 'Database generated identifier assigned to each unique stem observation.', + + ' stemLocation Stem Location STEMLOCATION_ID ID logical serial PK n/a no Primary Key for the stemLocation table. Database generated identifier assigned to each unique stem observation. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'stemLocation', + 'STEMCOUNT_ID', + 'Stem Count', + 'logical', + 'no', + 'Integer', + 'FK', + 'stemCount.STEMCOUNT_ID', + 'no', + 'Foreign key into the stemSize table', + 'Foreign key into the stemSize table, thereby assigning a location to a particular stem of a specific size', + + ' stemLocation Stem Location STEMCOUNT_ID Stem Count logical required Integer FK stemCount.STEMCOUNT_ID no Foreign key into the stemSize table Foreign key into the stemSize table, thereby assigning a location to a particular stem of a specific size ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'stemLocation', + 'stemCode', + 'Stem Code', + 'logical', + 'yes', + 'varchar (20)', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'Name or code applied to a specific stem in the plot. This is generally a numeric label to associate a field data entry with a stem in the database.', + + ' stemLocation Stem Location stemCode Stem Code logical varchar (20) n/a n/a no n/a Name or code applied to a specific stem in the plot. This is generally a numeric label to associate a field data entry with a stem in the database. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'stemLocation', + 'stemXPosition', + 'Stem X Position', + 'logical', + 'yes', + 'Float', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'The X-coordinate of the stem position in m. The user will enter the relative position of stems with respect to the plot origin (in meters) with the x-axis defined by the plot azimuth.', + + ' stemLocation Stem Location stemXPosition Stem X Position logical Float n/a n/a no n/a The X-coordinate of the stem position in m. The user will enter the relative position of stems with respect to the plot origin (in meters) with the x-axis defined by the plot azimuth. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'stemLocation', + 'stemYPosition', + 'Stem Y Position', + 'logical', + 'yes', + 'Float', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'The Y-coordinate of the stem position, as above.', + + ' stemLocation Stem Location stemYPosition Stem Y Position logical Float n/a n/a no n/a The Y-coordinate of the stem position, as above. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'stemLocation', + 'stemHealth', + 'Stem Health', + 'logical', + 'yes', + 'varchar (50)', + 'n/a', + 'n/a', + 'open', + 'n/a', + 'Health of the stem referenced in this stemLocation record. Usually used to describe "dead" stems.', + + ' stemLocation Stem Location stemHealth Stem Health logical varchar (50) n/a n/a open n/a Health of the stem referenced in this stemLocation record. Usually used to describe "dead" stems. dead stem is dead uprooted, but alive stem is uprooted, but still alive leaning stem leans in a non-trivial manner ' + + ); + + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'stemLocation', + 'stemHealth', + 'dead', + 'stem is dead', + '1' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'stemLocation', + 'stemHealth', + 'uprooted, but alive', + 'stem is uprooted, but still alive', + '2' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'stemLocation', + 'stemHealth', + 'leaning', + 'stem leans in a non-trivial manner', + '3' + ); + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'stemLocation', + 'emb_stemLocation', + 'this row embargoed.', + 'denorm', + 'yes', + 'Integer', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'This value mimics the default embargo value for the plot that this record belongs to.', + + ' stemLocation Stem Location emb_stemLocation this row embargoed. denorm Integer n/a n/a no n/a This value mimics the default embargo value for the plot that this record belongs to. ' + + ); + + + INSERT INTO dba_tableDescription ( tableName , tableLabel , tableNotes , tableDescription , tableKeywords ) values ( + 'stratum', + 'Stratum Definition', + 'This table stores collective information about strata defined within a plot observation.', + 'This table is used to record non-species-specific information about a stratum. Examples include total cover of the stratum and maximum height of the stratum.', + ' stratum Stratum Definition This table stores collective information about strata defined within a plot observation. This table is used to record non-species-specific information about a stratum. Examples include total cover of the stratum and maximum height of the stratum. STRATUM_ID ID OBSERVATION_ID Observation STRATUMTYPE_ID Stratum Type STRATUMMETHOD_ID Stratum Method stratumName Stratum Name stratumHeight Stratum Height stratumBase Stratum Base stratumCover Stratum Cover stratumDescription Stratum Description ' + ); + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'stratum', + 'STRATUM_ID', + 'ID', + 'logical', + 'yes', + 'serial', + 'PK', + 'n/a', + 'no', + 'Primary key for the stratum table.', + 'Database assigned value for a unique existence of a stratum within a plot observation.', + + ' stratum Stratum Definition STRATUM_ID ID logical serial PK n/a no Primary key for the stratum table. Database assigned value for a unique existence of a stratum within a plot observation. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'stratum', + 'OBSERVATION_ID', + 'Observation', + 'logical', + 'no', + 'Integer', + 'FK', + 'observation.OBSERVATION_ID', + 'no', + 'Foreign key into the observation table.', + 'Link to the plot observation event with which this stratum observation is associated.', + + ' stratum Stratum Definition OBSERVATION_ID Observation logical required Integer FK observation.OBSERVATION_ID no Foreign key into the observation table. Link to the plot observation event with which this stratum observation is associated. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'stratum', + 'STRATUMTYPE_ID', + 'Stratum Type', + 'logical', + 'no', + 'Integer', + 'FK', + 'stratumType.STRATUMTYPE_ID', + 'no', + 'Foreign key into the stratumType table.', + 'This attribute will link to the definition of the specific stratum observed.', + + ' stratum Stratum Definition STRATUMTYPE_ID Stratum Type logical required Integer FK stratumType.STRATUMTYPE_ID no Foreign key into the stratumType table. This attribute will link to the definition of the specific stratum observed. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'stratum', + 'STRATUMMETHOD_ID', + 'Stratum Method', + 'denorm', + 'yes', + 'Integer', + 'FK', + 'stratumMethod.STRATUMMETHOD_ID', + 'no', + null, + null, + + ' stratum Stratum Definition STRATUMMETHOD_ID Stratum Method denorm Integer FK stratumMethod.STRATUMMETHOD_ID no ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'stratum', + 'stratumName', + 'Stratum Name', + 'denorm', + 'yes', + 'varchar (30)', + 'n/a', + 'n/a', + 'no', + null, + null, + + ' stratum Stratum Definition stratumName Stratum Name denorm varchar (30) n/a n/a no ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'stratum', + 'stratumHeight', + 'Stratum Height', + 'logical', + 'yes', + 'Float', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'Average height to the top of the stratum in meters.', + + ' stratum Stratum Definition stratumHeight Stratum Height logical Float n/a n/a no n/a Average height to the top of the stratum in meters. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'stratum', + 'stratumBase', + 'Stratum Base', + 'logical', + 'yes', + 'Float', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'Average height of the bottom of the stratum in meters.', + + ' stratum Stratum Definition stratumBase Stratum Base logical Float n/a n/a no n/a Average height of the bottom of the stratum in meters. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'stratum', + 'stratumCover', + 'Stratum Cover', + 'logical', + 'yes', + 'Float', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'Cover of the vegetation within the given stratum in percent.', + + ' stratum Stratum Definition stratumCover Stratum Cover logical Float n/a n/a no n/a Cover of the vegetation within the given stratum in percent. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'stratum', + 'stratumDescription', + 'Stratum Description', + 'implementation', + 'yes', + 'varchar (200)', + 'n/a', + 'n/a', + 'no', + null, + null, + + ' stratum Stratum Definition stratumDescription Stratum Description implementation varchar (200) n/a n/a no ' + + ); + + + INSERT INTO dba_tableDescription ( tableName , tableLabel , tableNotes , tableDescription , tableKeywords ) values ( + 'stratumMethod', + 'Stratum Method', + 'This table links a set of strata to a sampling protocol . This table, when combined a set of linked stratum occurrences, defines the strata used by a plot observer.', + null, + ' stratumMethod Stratum Method This table links a set of strata to a sampling protocol . This table, when combined a set of linked stratum occurrences, defines the strata used by a plot observer. STRATUMMETHOD_ID ID reference_ID Reference stratumMethodName Stratum Method Name stratumMethodDescription Stratum Method Description stratumAssignment Stratum Assignment accessionCode Accession Code ' + ); + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'stratumMethod', + 'STRATUMMETHOD_ID', + 'ID', + 'logical', + 'yes', + 'serial', + 'PK', + 'n/a', + 'no', + 'Primary Key for the stratumMethod table.', + 'Database generated identifier assigned to each unique stratum methodology.', + + ' stratumMethod Stratum Method STRATUMMETHOD_ID ID logical serial PK n/a no Primary Key for the stratumMethod table. Database generated identifier assigned to each unique stratum methodology. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'stratumMethod', + 'reference_ID', + 'Reference', + 'logical', + 'yes', + 'Integer', + 'FK', + 'reference.reference_ID', + 'no', + 'Foreign key into the reference table', + 'Link to a publication defining the stratum method.', + + ' stratumMethod Stratum Method reference_ID Reference logical Integer FK reference.reference_ID no Foreign key into the reference table Link to a publication defining the stratum method. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'stratumMethod', + 'stratumMethodName', + 'Stratum Method Name', + 'logical', + 'no', + 'varchar (30)', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'Name of the stratum method (e.g., Braun-Blanquet, TNC-ABI, NC Vegetation Survey #1, NC Vegetation Survey #2, etc.)', + + ' stratumMethod Stratum Method stratumMethodName Stratum Method Name logical required varchar (30) n/a n/a no n/a Name of the stratum method (e.g., Braun-Blanquet, TNC-ABI, NC Vegetation Survey #1, NC Vegetation Survey #2, etc.) ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'stratumMethod', + 'stratumMethodDescription', + 'Stratum Method Description', + 'logical', + 'yes', + 'text', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'This field describes the general methods used for strata. For example, this field should distinguish as to whether strata are defined as including all foliage on plants that predominantly occupy the stratum regardless of the height of that foliage, or only the foliage that actually occurs within a specified vertical slice of the community.', + + ' stratumMethod Stratum Method stratumMethodDescription Stratum Method Description logical text n/a n/a no n/a This field describes the general methods used for strata. For example, this field should distinguish as to whether strata are defined as including all foliage on plants that predominantly occupy the stratum regardless of the height of that foliage, or only the foliage that actually occurs within a specified vertical slice of the community. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'stratumMethod', + 'stratumAssignment', + 'Stratum Assignment', + 'logical', + 'yes', + 'varchar (50)', + 'n/a', + 'n/a', + 'closed', + 'n/a', + 'The way that an individual''s cover is assigned to the different stratum. Some methodologies allow an individul to span multiple strata and have stratumCover values in each stratum. Other methodologies require that all cover from an individual be assigned to the upper-most stratum. Further information about the specifics of stratum Methodologies that deviate from the standard practice of the stratumMethod referened in the field stratumMethod_ID should be described in methodNarrative.', + + ' stratumMethod Stratum Method stratumAssignment Stratum Assignment logical varchar (50) n/a n/a closed n/a The way that an individual''s cover is assigned to the different stratum. Some methodologies allow an individul to span multiple strata and have stratumCover values in each stratum. Other methodologies require that all cover from an individual be assigned to the upper-most stratum. Further information about the specifics of stratum Methodologies that deviate from the standard practice of the stratumMethod referened in the field stratumMethod_ID should be described in methodNarrative. predominant stratum Each individual is assigned to one and only one stratum in which it most significantly occurs. Generally, this is the tallest stratum that the individual occupies. soley height determined Individuals are included in each stratum they occupy, allowing one individual to be assigned to multiple strata, if it crosses the height boundary between strata. ' + + ); + + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'stratumMethod', + 'stratumAssignment', + 'predominant stratum', + 'Each individual is assigned to one and only one stratum in which it most significantly occurs. Generally, this is the tallest stratum that the individual occupies.', + '1' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'stratumMethod', + 'stratumAssignment', + 'soley height determined', + 'Individuals are included in each stratum they occupy, allowing one individual to be assigned to multiple strata, if it crosses the height boundary between strata.', + '2' + ); + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'stratumMethod', + 'accessionCode', + 'Accession Code', + 'logical', + 'yes', + 'varchar (255)', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'Code that uniquely references this record, allowing reference to this record for this version of this database. Better than a primary key, which is automatically generated by a database and not globally unique. VegBank Accession codes are only generated by VegBank, and therefore data integrity can be guaranteed, unlike with a primary key (number).', + + ' stratumMethod Stratum Method accessionCode Accession Code logical varchar (255) n/a n/a no n/a Code that uniquely references this record, allowing reference to this record for this version of this database. Better than a primary key, which is automatically generated by a database and not globally unique. VegBank Accession codes are only generated by VegBank, and therefore data integrity can be guaranteed, unlike with a primary key (number). ' + + ); + + + INSERT INTO dba_tableDescription ( tableName , tableLabel , tableNotes , tableDescription , tableKeywords ) values ( + 'stratumType', + 'Stratum Type', + 'This table stores collective information about strata defined within a plot observation.', + 'This table is used to record non-species-specific information about a stratum. Examples include total cover of the stratum and maximum height of the stratum.', + ' stratumType Stratum Type This table stores collective information about strata defined within a plot observation. This table is used to record non-species-specific information about a stratum. Examples include total cover of the stratum and maximum height of the stratum. STRATUMTYPE_ID ID STRATUMMETHOD_ID Stratum Method stratumIndex Stratum Index stratumName Stratum Name stratumDescription Stratum Description ' + ); + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'stratumType', + 'STRATUMTYPE_ID', + 'ID', + 'logical', + 'yes', + 'serial', + 'PK', + 'n/a', + 'no', + 'Primary key for the stratum table.', + 'Database assigned value for a unique existence of a stratum within a plot observation.', + + ' stratumType Stratum Type STRATUMTYPE_ID ID logical serial PK n/a no Primary key for the stratum table. Database assigned value for a unique existence of a stratum within a plot observation. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'stratumType', + 'STRATUMMETHOD_ID', + 'Stratum Method', + 'logical', + 'no', + 'Integer', + 'FK', + 'stratumMethod.STRATUMMETHOD_ID', + 'no', + 'Foreign key into the stratumMethod table.', + 'This attribute will link to the stratum to the stratum methodology used.', + + ' stratumType Stratum Type STRATUMMETHOD_ID Stratum Method logical required Integer FK stratumMethod.STRATUMMETHOD_ID no Foreign key into the stratumMethod table. This attribute will link to the stratum to the stratum methodology used. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'stratumType', + 'stratumIndex', + 'Stratum Index', + 'logical', + 'yes', + 'varchar (10)', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'Short code used to identify the stratum', + + ' stratumType Stratum Type stratumIndex Stratum Index logical varchar (10) n/a n/a no n/a Short code used to identify the stratum ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'stratumType', + 'stratumName', + 'Stratum Name', + 'logical', + 'yes', + 'varchar (30)', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'Name associated with this stratum by the stratumMethod', + + ' stratumType Stratum Type stratumName Stratum Name logical varchar (30) n/a n/a no n/a Name associated with this stratum by the stratumMethod ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'stratumType', + 'stratumDescription', + 'Stratum Description', + 'logical', + 'yes', + 'text', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'This field describes the specific stratum. For example, a value of "F" under stratumIndex might have a stratumName = "Floating" and a stratumDescription = "foliage floating on or near the surface of water"', + + ' stratumType Stratum Type stratumDescription Stratum Description logical text n/a n/a no n/a This field describes the specific stratum. For example, a value of "F" under stratumIndex might have a stratumName = "Floating" and a stratumDescription = "foliage floating on or near the surface of water" ' + + ); + + + INSERT INTO dba_tableDescription ( tableName , tableLabel , tableNotes , tableDescription , tableKeywords ) values ( + 'taxonImportance', + 'Taxon Importance', + 'This table stores information about the importance (i.e. cover, basal area, biomass) of each taxon observed on a plot. Records may be limited to one stratum or apply to all strata.', + null, + ' taxonImportance Taxon Importance This table stores information about the importance (i.e. cover, basal area, biomass) of each taxon observed on a plot. Records may be limited to one stratum or apply to all strata. taxonImportance_ID Taxon Importance ID taxonObservation_ID Taxon stratum_ID Stratum cover Cover coverCode Original Cover Code basalArea Basal Area biomass Biomass inferenceArea Inference Area stratumBase Stratum Base Ht stratumHeight Stratum Max Ht emb_taxonImportance this row embargoed. ' + ); + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'taxonImportance', + 'taxonImportance_ID', + 'Taxon Importance ID', + 'logical', + 'no', + 'serial', + 'PK', + 'n/a', + 'no', + 'n/a', + 'Database generated number which uniquely identifies this record of the table.', + + ' taxonImportance Taxon Importance taxonImportance_ID Taxon Importance ID logical required serial PK n/a no n/a Database generated number which uniquely identifies this record of the table. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'taxonImportance', + 'taxonObservation_ID', + 'Taxon', + 'logical', + 'no', + 'Integer', + 'FK', + 'taxonObservation.TAXONOBSERVATION_ID', + 'no', + 'n/a', + 'Foreign Key into the TaxonObservation table to link to the information about the taxon for which this importance value applies.', + + ' taxonImportance Taxon Importance taxonObservation_ID Taxon logical required Integer FK taxonObservation.TAXONOBSERVATION_ID no n/a Foreign Key into the TaxonObservation table to link to the information about the taxon for which this importance value applies. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'taxonImportance', + 'stratum_ID', + 'Stratum', + 'logical', + 'yes', + 'Integer', + 'FK', + 'stratum.STRATUM_ID', + 'no', + 'n/a', + 'Foreign Key into the stratum table, if this record is limited to the importance of a taxon in one stratum. If null, all values in this record speak of the importance of the entire taxon across all strata.', + + ' taxonImportance Taxon Importance stratum_ID Stratum logical Integer FK stratum.STRATUM_ID no n/a Foreign Key into the stratum table, if this record is limited to the importance of a taxon in one stratum. If null, all values in this record speak of the importance of the entire taxon across all strata. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'taxonImportance', + 'cover', + 'Cover', + 'logical', + 'yes', + 'Float', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'Cover, in percent, of the taxon (potentially limitied to one stratum if stratum_ID has a value).', + + ' taxonImportance Taxon Importance cover Cover logical Float n/a n/a no n/a Cover, in percent, of the taxon (potentially limitied to one stratum if stratum_ID has a value). ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'taxonImportance', + 'coverCode', + 'Original Cover Code', + 'denorm', + 'yes', + 'varchar (10)', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'The original cover code used by the author in the Cover Method for the plot.', + + ' taxonImportance Taxon Importance coverCode Original Cover Code denorm varchar (10) n/a n/a no n/a The original cover code used by the author in the Cover Method for the plot. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'taxonImportance', + 'basalArea', + 'Basal Area', + 'logical', + 'yes', + 'Float', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'Total basal area of the species in m2/ha (potentially limitied to one stratum if stratum_ID has a value).', + + ' taxonImportance Taxon Importance basalArea Basal Area logical Float n/a n/a no n/a Total basal area of the species in m2/ha (potentially limitied to one stratum if stratum_ID has a value). ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'taxonImportance', + 'biomass', + 'Biomass', + 'logical', + 'yes', + 'Float', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'The biomass of the species in g/m2 (potentially limitied to one stratum if stratum_ID has a value).', + + ' taxonImportance Taxon Importance biomass Biomass logical Float n/a n/a no n/a The biomass of the species in g/m2 (potentially limitied to one stratum if stratum_ID has a value). ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'taxonImportance', + 'inferenceArea', + 'Inference Area', + 'logical', + 'yes', + 'Float', + 'n/a', + 'n/a', + 'no', + 'The area used to infer the importance values of the taxon, if not the same as observation.taxonInferenceArea.', + 'This is the area in m2 used to infer the importance values (i.e. cover, biomass, basal area) in this record. RESERVED VALUE: -1 is used to indicate no plot boundaries were used when estimating importance values.', + + ' taxonImportance Taxon Importance inferenceArea Inference Area logical Float n/a n/a no The area used to infer the importance values of the taxon, if not the same as observation.taxonInferenceArea. This is the area in m2 used to infer the importance values (i.e. cover, biomass, basal area) in this record. RESERVED VALUE: -1 is used to indicate no plot boundaries were used when estimating importance values. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'taxonImportance', + 'stratumBase', + 'Stratum Base Ht', + 'denorm', + 'yes', + 'Float', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'The Base of the Stratum in meters.', + + ' taxonImportance Taxon Importance stratumBase Stratum Base Ht denorm Float n/a n/a no n/a The Base of the Stratum in meters. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'taxonImportance', + 'stratumHeight', + 'Stratum Max Ht', + 'denorm', + 'yes', + 'Float', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'The Tallest part of the Stratum in meters.', + + ' taxonImportance Taxon Importance stratumHeight Stratum Max Ht denorm Float n/a n/a no n/a The Tallest part of the Stratum in meters. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'taxonImportance', + 'emb_taxonImportance', + 'this row embargoed.', + 'denorm', + 'yes', + 'Integer', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'This value mimics the default embargo value for the plot that this record belongs to.', + + ' taxonImportance Taxon Importance emb_taxonImportance this row embargoed. denorm Integer n/a n/a no n/a This value mimics the default embargo value for the plot that this record belongs to. ' + + ); + + + INSERT INTO dba_tableDescription ( tableName , tableLabel , tableNotes , tableDescription , tableKeywords ) values ( + 'taxonInterpretation', + 'Taxon Interpretation', + 'This table allows all users, including the author and/or subsequent interpreters, to attach taxon names and authorities to a specific taxon observation', + null, + ' taxonInterpretation Taxon Interpretation This table allows all users, including the author and/or subsequent interpreters, to attach taxon names and authorities to a specific taxon observation TAXONINTERPRETATION_ID ID TAXONOBSERVATION_ID Taxon Observation stemLocation_ID Stem Location PLANTCONCEPT_ID Plant Concept interpretationDate Interpretation Date PLANTNAME_ID Plant Name PARTY_ID Party ROLE_ID Role interpretationType Interpretation Type reference_ID Reference originalInterpretation Original Interpretation currentInterpretation Current Interpretation taxonFit Taxon Fit taxonConfidence Taxon Confidence collector_ID Collector collectionNumber Collection Number collectionDate Collection Date museum_ID Museum museumAccessionNumber Museum Accession Number groupType Group Type notes Notes notesPublic Notes Public notesMgt Notes Mgt revisions Revisions emb_taxonInterpretation this row embargoed. accessionCode Accession Code ' + ); + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'taxonInterpretation', + 'TAXONINTERPRETATION_ID', + 'ID', + 'logical', + 'yes', + 'serial', + 'PK', + 'n/a', + 'no', + 'Primary key for the TaxonInterpretation table.', + 'Database generated identifier assigned to each unique interpretation of a taxon.', + + ' taxonInterpretation Taxon Interpretation TAXONINTERPRETATION_ID ID logical serial PK n/a no Primary key for the TaxonInterpretation table. Database generated identifier assigned to each unique interpretation of a taxon. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'taxonInterpretation', + 'TAXONOBSERVATION_ID', + 'Taxon Observation', + 'logical', + 'no', + 'Integer', + 'FK', + 'taxonObservation.TAXONOBSERVATION_ID', + 'no', + 'Foreign key into the taxonObservation table.', + 'Link to a particular taxon observation.', + + ' taxonInterpretation Taxon Interpretation TAXONOBSERVATION_ID Taxon Observation logical required Integer FK taxonObservation.TAXONOBSERVATION_ID no Foreign key into the taxonObservation table. Link to a particular taxon observation. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'taxonInterpretation', + 'stemLocation_ID', + 'Stem Location', + 'logical', + 'yes', + 'Integer', + 'FK', + 'stemLocation.STEMLOCATION_ID', + 'no', + 'Foreign key into the StemLocation table.', + 'StemLocation record of a particular stem that is to be interpreted by this taxonInterpretation record.', + + ' taxonInterpretation Taxon Interpretation stemLocation_ID Stem Location logical Integer FK stemLocation.STEMLOCATION_ID no Foreign key into the StemLocation table. StemLocation record of a particular stem that is to be interpreted by this taxonInterpretation record. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'taxonInterpretation', + 'PLANTCONCEPT_ID', + 'Plant Concept', + 'logical', + 'no', + 'Integer', + 'FK', + 'plantConcept.PLANTCONCEPT_ID', + 'no', + 'Foreign key into the plantConcept table.', + 'Link to a taxon in the plantConcept table. The entry in the plantConcept table will in turn point to a reference and a name used in the reference, thereby defining the taxon concept. The name that should be applied to the plantConcept will be party specific and will be found in the plantUsage table. For other than legacy data, the first interpretation recorded for a taxon observation should be redundant with the information contained in taxonObservation.PLANTNAME_ID + PLANTREFERENCE_ID.', + + ' taxonInterpretation Taxon Interpretation PLANTCONCEPT_ID Plant Concept logical required Integer FK plantConcept.PLANTCONCEPT_ID no Foreign key into the plantConcept table. Link to a taxon in the plantConcept table. The entry in the plantConcept table will in turn point to a reference and a name used in the reference, thereby defining the taxon concept. The name that should be applied to the plantConcept will be party specific and will be found in the plantUsage table. For other than legacy data, the first interpretation recorded for a taxon observation should be redundant with the information contained in taxonObservation.PLANTNAME_ID + PLANTREFERENCE_ID. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'taxonInterpretation', + 'interpretationDate', + 'Interpretation Date', + 'logical', + 'no', + 'Date', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'The date that the interpretation was made.', + + ' taxonInterpretation Taxon Interpretation interpretationDate Interpretation Date logical required Date n/a n/a no n/a The date that the interpretation was made. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'taxonInterpretation', + 'PLANTNAME_ID', + 'Plant Name', + 'logical', + 'yes', + 'Integer', + 'FK', + 'plantName.PLANTNAME_ID', + 'no', + 'Foreign key into the taxonName table.', + 'Foreign key into the plantName (in the plantTaxa database) table to identify the name applied by the interpreter to the plantConcept. This field is not needed except in cases where there is a publication associated with the interpretation.', + + ' taxonInterpretation Taxon Interpretation PLANTNAME_ID Plant Name logical Integer FK plantName.PLANTNAME_ID no Foreign key into the taxonName table. Foreign key into the plantName (in the plantTaxa database) table to identify the name applied by the interpreter to the plantConcept. This field is not needed except in cases where there is a publication associated with the interpretation. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'taxonInterpretation', + 'PARTY_ID', + 'Party', + 'logical', + 'no', + 'Integer', + 'FK', + 'party.PARTY_ID', + 'no', + 'Foreign key into the party table.', + 'Foreign key that identifies the party that made the interpretation, which could be the observation author.', + + ' taxonInterpretation Taxon Interpretation PARTY_ID Party logical required Integer FK party.PARTY_ID no Foreign key into the party table. Foreign key that identifies the party that made the interpretation, which could be the observation author. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'taxonInterpretation', + 'ROLE_ID', + 'Role', + 'logical', + 'no', + 'Integer', + 'FK', + 'aux_Role.ROLE_ID', + 'no', + 'Foreign key into aux_Role table', + 'Foreign key that identifies the role of the party making the interpretation (e.g., plot author, publication author, database manager, automated, plot contributor).', + + ' taxonInterpretation Taxon Interpretation ROLE_ID Role logical required Integer FK aux_Role.ROLE_ID no Foreign key into aux_Role table Foreign key that identifies the role of the party making the interpretation (e.g., plot author, publication author, database manager, automated, plot contributor). ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'taxonInterpretation', + 'interpretationType', + 'Interpretation Type', + 'logical', + 'yes', + 'varchar (30)', + 'n/a', + 'n/a', + 'closed', + 'closed list', + 'Categories for the interpretation (e.g., author, computer generated, simplified for comparative analysis, correction, finer resolution).', + + ' taxonInterpretation Taxon Interpretation interpretationType Interpretation Type logical varchar (30) n/a n/a closed closed list Categories for the interpretation (e.g., author, computer generated, simplified for comparative analysis, correction, finer resolution). Author Ideally, the field workers who sampled to plot, but it could also be the person who compiled and submitted the plot to the database, or the person who published the plot. Computer (automated) Automated taxonomic change following a taxonomic revision. Correction A new interpretation was made because the interpreter has reason to believe that another determination was incorrect or of different certainty than stated. Finer resolution The interpreter has reason to believe that determination can be made at a finer level of taxonomic resolution. Simplification for analysis This is for the case where one marks up a plot to reflect the interpretaions used in an analysis of multiple plots where the plots had to have a common taxonomy for comparison purposes. These interpretations are of relatively limited value except for documenting the analysis conducted, and many times this is better done in the supplemental material attached to the paper than in the plot database. Taxonomic revision Changes in interpretation made to reflect taxonomic changes. ' + + ); + + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'taxonInterpretation', + 'interpretationType', + 'Author', + 'Ideally, the field workers who sampled to plot, but it could also be the person who compiled and submitted the plot to the database, or the person who published the plot.', + '1' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'taxonInterpretation', + 'interpretationType', + 'Computer (automated)', + 'Automated taxonomic change following a taxonomic revision.', + '2' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'taxonInterpretation', + 'interpretationType', + 'Simplification for analysis', + 'This is for the case where one marks up a plot to reflect the interpretaions used in an analysis of multiple plots where the plots had to have a common taxonomy for comparison purposes. These interpretations are of relatively limited value except for documenting the analysis conducted, and many times this is better done in the supplemental material attached to the paper than in the plot database.', + '3' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'taxonInterpretation', + 'interpretationType', + 'Correction', + 'A new interpretation was made because the interpreter has reason to believe that another determination was incorrect or of different certainty than stated.', + '4' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'taxonInterpretation', + 'interpretationType', + 'Taxonomic revision', + 'Changes in interpretation made to reflect taxonomic changes.', + '5' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'taxonInterpretation', + 'interpretationType', + 'Finer resolution', + 'The interpreter has reason to believe that determination can be made at a finer level of taxonomic resolution.', + '6' + ); + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'taxonInterpretation', + 'reference_ID', + 'Reference', + 'logical', + 'yes', + 'Integer', + 'FK', + 'reference.reference_ID', + 'no', + 'Foreign key into the reference table.', + 'Foreign key into reference table, which identifies a publication in which the interpretation was formally made, or in which the plot was used in a formal analysis.', + + ' taxonInterpretation Taxon Interpretation reference_ID Reference logical Integer FK reference.reference_ID no Foreign key into the reference table. Foreign key into reference table, which identifies a publication in which the interpretation was formally made, or in which the plot was used in a formal analysis. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'taxonInterpretation', + 'originalInterpretation', + 'Original Interpretation', + 'logical', + 'no', + 'Boolean', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'This interpretation corresponds to the original interpretation of the plot author, as best as can be determined. There is no requirement that the authority match the authority of the author; only that the concepts are synonymous.', + + ' taxonInterpretation Taxon Interpretation originalInterpretation Original Interpretation logical required Boolean n/a n/a no n/a This interpretation corresponds to the original interpretation of the plot author, as best as can be determined. There is no requirement that the authority match the authority of the author; only that the concepts are synonymous. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'taxonInterpretation', + 'currentInterpretation', + 'Current Interpretation', + 'logical', + 'no', + 'Boolean', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'This interpretation is the most accurate and precise interpretation currently available.', + + ' taxonInterpretation Taxon Interpretation currentInterpretation Current Interpretation logical required Boolean n/a n/a no n/a This interpretation is the most accurate and precise interpretation currently available. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'taxonInterpretation', + 'taxonFit', + 'Taxon Fit', + 'logical', + 'yes', + 'varchar (50)', + 'n/a', + 'n/a', + 'closed', + 'n/a', + 'Indicates the degree of fit with the plant concept being assigned. Values derive from Gopal, S., and Woodcock, C. (1994), Theory and methods for accuracy assessment of thematic maps using fuzzy sets. Photogrammetric Engineering and Remote Sensing 60(2):181-188.', + + ' taxonInterpretation Taxon Interpretation taxonFit Taxon Fit logical varchar (50) n/a n/a closed n/a Indicates the degree of fit with the plant concept being assigned. Values derive from Gopal, S., and Woodcock, C. (1994), Theory and methods for accuracy assessment of thematic maps using fuzzy sets. Photogrammetric Engineering and Remote Sensing 60(2):181-188. Absolutely correct (Fits well) No doubt about the match. Perfect fit. Absolutely wrong (Absolutely doesn''t fit) This answer is absolutely unacceptable. Unambiguously incorrect. Good answer (Fits reasonably well) Good match with the concept. Unambiguously correct. Reasonable or acceptable answer (Possibly fits) Maybe not the best possible answer but it is acceptable; this answer does not pose a problem to the user. Correct. Understandable but wrong (Doesn''t fit but is close) Not a good answer. There is something about the plot that makes the answer understandable, but there is clearly a better answer. This answer would pose a problem for users. Incorrect. ' + + ); + + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'taxonInterpretation', + 'taxonFit', + 'Absolutely wrong', + '(Absolutely doesn''t fit) This answer is absolutely unacceptable. Unambiguously incorrect.', + '1' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'taxonInterpretation', + 'taxonFit', + 'Understandable but wrong', + '(Doesn''t fit but is close) Not a good answer. There is something about the plot that makes the answer understandable, but there is clearly a better answer. This answer would pose a problem for users. Incorrect.', + '2' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'taxonInterpretation', + 'taxonFit', + 'Reasonable or acceptable answer', + '(Possibly fits) Maybe not the best possible answer but it is acceptable; this answer does not pose a problem to the user. Correct.', + '3' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'taxonInterpretation', + 'taxonFit', + 'Good answer', + '(Fits reasonably well) Good match with the concept. Unambiguously correct.', + '4' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'taxonInterpretation', + 'taxonFit', + 'Absolutely correct', + '(Fits well) No doubt about the match. Perfect fit.', + '5' + ); + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'taxonInterpretation', + 'taxonConfidence', + 'Taxon Confidence', + 'logical', + 'yes', + 'varchar (50)', + 'n/a', + 'n/a', + 'closed', + 'n/a', + 'Indicates the degree of confidence of the interpreter(s) in the interpretation made. This can reflect the level of familiarity with the classification or the sufficiency of information about the plot (e.g., High, Moderate, Low).', + + ' taxonInterpretation Taxon Interpretation taxonConfidence Taxon Confidence logical varchar (50) n/a n/a closed n/a Indicates the degree of confidence of the interpreter(s) in the interpretation made. This can reflect the level of familiarity with the classification or the sufficiency of information about the plot (e.g., High, Moderate, Low). High The party making the taxon interpretation has a high confidence in the accuracy of this interpretation. A party can have high confidence that a plot has a fit of "absolutely wrong" for a particular community. Low The party making the taxon interpretation has a low confidence in the accuracy of this interpretation. Medium The party making the taxon interpretation has a medium amount of confidence in the accuracy of this interpretation. ' + + ); + + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'taxonInterpretation', + 'taxonConfidence', + 'High', + 'The party making the taxon interpretation has a high confidence in the accuracy of this interpretation. A party can have high confidence that a plot has a fit of "absolutely wrong" for a particular community.', + '1' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'taxonInterpretation', + 'taxonConfidence', + 'Medium', + 'The party making the taxon interpretation has a medium amount of confidence in the accuracy of this interpretation.', + '2' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'taxonInterpretation', + 'taxonConfidence', + 'Low', + 'The party making the taxon interpretation has a low confidence in the accuracy of this interpretation.', + '3' + ); + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'taxonInterpretation', + 'collector_ID', + 'Collector', + 'logical', + 'yes', + 'Integer', + 'FK', + 'party.PARTY_ID', + 'no', + 'foreign key into the Party table', + 'Party who collected the voucher which was used to make this taxonInterpretation.', + + ' taxonInterpretation Taxon Interpretation collector_ID Collector logical Integer FK party.PARTY_ID no foreign key into the Party table Party who collected the voucher which was used to make this taxonInterpretation. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'taxonInterpretation', + 'collectionNumber', + 'Collection Number', + 'logical', + 'yes', + 'varchar (100)', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'The Collector''s identification code for the voucher.', + + ' taxonInterpretation Taxon Interpretation collectionNumber Collection Number logical varchar (100) n/a n/a no n/a The Collector''s identification code for the voucher. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'taxonInterpretation', + 'collectionDate', + 'Collection Date', + 'logical', + 'yes', + 'Date', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'Date on which the voucher was collected.', + + ' taxonInterpretation Taxon Interpretation collectionDate Collection Date logical Date n/a n/a no n/a Date on which the voucher was collected. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'taxonInterpretation', + 'museum_ID', + 'Museum', + 'logical', + 'yes', + 'Integer', + 'FK', + 'party.PARTY_ID', + 'no', + 'foreign key into the Party table', + 'Link to the Party which is the museum which archives the voucher.', + + ' taxonInterpretation Taxon Interpretation museum_ID Museum logical Integer FK party.PARTY_ID no foreign key into the Party table Link to the Party which is the museum which archives the voucher. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'taxonInterpretation', + 'museumAccessionNumber', + 'Museum Accession Number', + 'logical', + 'yes', + 'varchar (100)', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'Museum Code which identifies the voucher.', + + ' taxonInterpretation Taxon Interpretation museumAccessionNumber Museum Accession Number logical varchar (100) n/a n/a no n/a Museum Code which identifies the voucher. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'taxonInterpretation', + 'groupType', + 'Group Type', + 'logical', + 'yes', + 'varchar (20)', + 'n/a', + 'n/a', + 'closed', + 'n/a', + 'The type of group formed for this taxonInterpretation_ID. ', + + ' taxonInterpretation Taxon Interpretation groupType Group Type logical varchar (20) n/a n/a closed n/a The type of group formed for this taxonInterpretation_ID. one of One of several plant concepts is interpreted to be the TaxonObservation in question. For example, this is either species A OR species B. Plants observed were one or the other, but not both, but which species cannot be determined. union Several plant concepts are grouped to describe this taxon. For example, taxonObservation applies to the union of both species A and species B. Plants observed were from both species. unknown It is not specified how the plant concepts are grouped. Not recommended value. ' + + ); + + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'taxonInterpretation', + 'groupType', + 'one of', + 'One of several plant concepts is interpreted to be the TaxonObservation in question. For example, this is either species A OR species B. Plants observed were one or the other, but not both, but which species cannot be determined.', + '1' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'taxonInterpretation', + 'groupType', + 'union', + 'Several plant concepts are grouped to describe this taxon. For example, taxonObservation applies to the union of both species A and species B. Plants observed were from both species.', + '2' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'taxonInterpretation', + 'groupType', + 'unknown', + 'It is not specified how the plant concepts are grouped. Not recommended value.', + '3' + ); + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'taxonInterpretation', + 'notes', + 'Notes', + 'logical', + 'yes', + 'text', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'These are notes that the interpreter has included with the interpretation (generally, the reason for the interpretation).', + + ' taxonInterpretation Taxon Interpretation notes Notes logical text n/a n/a no n/a These are notes that the interpreter has included with the interpretation (generally, the reason for the interpretation). ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'taxonInterpretation', + 'notesPublic', + 'Notes Public', + 'logical', + 'yes', + 'Boolean', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'TRUE indicates that public notes pertaining to this plot exist in "vegPlot.note"', + + ' taxonInterpretation Taxon Interpretation notesPublic Notes Public logical Boolean n/a n/a no n/a TRUE indicates that public notes pertaining to this plot exist in "vegPlot.note" ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'taxonInterpretation', + 'notesMgt', + 'Notes Mgt', + 'logical', + 'yes', + 'Boolean', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'TRUE indicates that nonpublic management notes pertaining to this plot exist in "vegPlot.note"', + + ' taxonInterpretation Taxon Interpretation notesMgt Notes Mgt logical Boolean n/a n/a no n/a TRUE indicates that nonpublic management notes pertaining to this plot exist in "vegPlot.note" ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'taxonInterpretation', + 'revisions', + 'Revisions', + 'logical', + 'yes', + 'Boolean', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'TRUE indicates that revisions exist in vegPlot.Revision', + + ' taxonInterpretation Taxon Interpretation revisions Revisions logical Boolean n/a n/a no n/a TRUE indicates that revisions exist in vegPlot.Revision ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'taxonInterpretation', + 'emb_taxonInterpretation', + 'this row embargoed.', + 'denorm', + 'yes', + 'Integer', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'This value mimics the default embargo value for the plot that this record belongs to.', + + ' taxonInterpretation Taxon Interpretation emb_taxonInterpretation this row embargoed. denorm Integer n/a n/a no n/a This value mimics the default embargo value for the plot that this record belongs to. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'taxonInterpretation', + 'accessionCode', + 'Accession Code', + 'logical', + 'yes', + 'varchar (255)', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'Code that uniquely references this record, allowing reference to this record for this version of this database. Better than a primary key, which is automatically generated by a database and not globally unique. VegBank Accession codes are only generated by VegBank, and therefore data integrity can be guaranteed, unlike with a primary key (number).', + + ' taxonInterpretation Taxon Interpretation accessionCode Accession Code logical varchar (255) n/a n/a no n/a Code that uniquely references this record, allowing reference to this record for this version of this database. Better than a primary key, which is automatically generated by a database and not globally unique. VegBank Accession codes are only generated by VegBank, and therefore data integrity can be guaranteed, unlike with a primary key (number). ' + + ); + + + INSERT INTO dba_tableDescription ( tableName , tableLabel , tableNotes , tableDescription , tableKeywords ) values ( + 'taxonObservation', + 'Taxon Observation', + 'This table contains the author''s determination of a taxon and the overall cover of that taxon.', + 'This table stores information about the original identification by the author of the plot and the taxonomic authority used by that author (i.e. a name - citation pair constituting a taxonomic concept). The table also contains a record of cumulative cover (cover across all strata) of the taxon when not divided into strata.', + ' taxonObservation Taxon Observation This table contains the author''s determination of a taxon and the overall cover of that taxon. This table stores information about the original identification by the author of the plot and the taxonomic authority used by that author (i.e. a name - citation pair constituting a taxonomic concept). The table also contains a record of cumulative cover (cover across all strata) of the taxon when not divided into strata. TAXONOBSERVATION_ID ID OBSERVATION_ID Observation authorPlantName Author Plant Name reference_ID Reference taxonInferenceArea Taxon Inference Area accessionCode Accession Code emb_taxonObservation this row embargoed. int_origPlantConcept_ID Original Interpretation, Plant Concept ID int_origPlantSciFull Original Interpretation, full Scientific Name int_origPlantSciNameNoAuth Original Interpretation, Scientific Name without authors int_origPlantCommon Original Interpretation, Common Name int_origPlantCode Original Interpretation, USDA Code int_currPlantConcept_ID Current Interpretation, Plant Concept ID int_currPlantSciFull Current Interpretation, full Scientific Name int_currPlantSciNameNoAuth Current Interpretation, Scientific Name without authors int_currPlantCommon Current Interpretation, Common Name int_currPlantCode Current Interpretation, USDA Code ' + ); + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'taxonObservation', + 'TAXONOBSERVATION_ID', + 'ID', + 'logical', + 'yes', + 'serial', + 'PK', + 'n/a', + 'no', + 'Primary key of the table.', + 'Database generated identifier assigned to each unique observation of a taxon in a plot.', + + ' taxonObservation Taxon Observation TAXONOBSERVATION_ID ID logical serial PK n/a no Primary key of the table. Database generated identifier assigned to each unique observation of a taxon in a plot. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'taxonObservation', + 'OBSERVATION_ID', + 'Observation', + 'logical', + 'no', + 'Integer', + 'FK', + 'observation.OBSERVATION_ID', + 'no', + 'Foreign key into the Observation table.', + 'Link to the parent observation event of this taxon observation.', + + ' taxonObservation Taxon Observation OBSERVATION_ID Observation logical required Integer FK observation.OBSERVATION_ID no Foreign key into the Observation table. Link to the parent observation event of this taxon observation. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'taxonObservation', + 'authorPlantName', + 'Author Plant Name', + 'logical', + 'yes', + 'varchar (255)', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'The taxon name that the author of the plot used to refer to a taxon observed within the plot.', + + ' taxonObservation Taxon Observation authorPlantName Author Plant Name logical varchar (255) n/a n/a no n/a The taxon name that the author of the plot used to refer to a taxon observed within the plot. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'taxonObservation', + 'reference_ID', + 'Reference', + 'logical', + 'yes', + 'Integer', + 'FK', + 'reference.reference_ID', + 'no', + 'Foreign key into the reference table.', + 'The authority for the taxon that was used by the plot author. If the authority is unknown the author of the plot is the authority. For other than legacy data, this field plus plantName_ID will be sufficient to determine taxonInterpretation.plantConcept_ID.', + + ' taxonObservation Taxon Observation reference_ID Reference logical Integer FK reference.reference_ID no Foreign key into the reference table. The authority for the taxon that was used by the plot author. If the authority is unknown the author of the plot is the authority. For other than legacy data, this field plus plantName_ID will be sufficient to determine taxonInterpretation.plantConcept_ID. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'taxonObservation', + 'taxonInferenceArea', + 'Taxon Inference Area', + 'logical', + 'yes', + 'Float', + 'n/a', + 'n/a', + 'no', + 'The area used to infer the presence of the taxon, if not the same as observation.taxonInferenceArea.', + 'This is the area in m2 used to infer the presence of a given taxon. Generally this should be equal to observation.taxonInferenceArea, but at times this area may be larger or smaller for a specific taxon. RESERVED VALUE: -1 is used to indicate that no known plot boundaries were used when recording this species on the plot. That is, this species may occur outside the plot area as indicated in the plot and observation tables.', + + ' taxonObservation Taxon Observation taxonInferenceArea Taxon Inference Area logical Float n/a n/a no The area used to infer the presence of the taxon, if not the same as observation.taxonInferenceArea. This is the area in m2 used to infer the presence of a given taxon. Generally this should be equal to observation.taxonInferenceArea, but at times this area may be larger or smaller for a specific taxon. RESERVED VALUE: -1 is used to indicate that no known plot boundaries were used when recording this species on the plot. That is, this species may occur outside the plot area as indicated in the plot and observation tables. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'taxonObservation', + 'accessionCode', + 'Accession Code', + 'logical', + 'yes', + 'varchar (255)', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'Code that uniquely references this record, allowing reference to this record for this version of this database. Better than a primary key, which is automatically generated by a database and not globally unique. VegBank Accession codes are only generated by VegBank, and therefore data integrity can be guaranteed, unlike with a primary key (number).', + + ' taxonObservation Taxon Observation accessionCode Accession Code logical varchar (255) n/a n/a no n/a Code that uniquely references this record, allowing reference to this record for this version of this database. Better than a primary key, which is automatically generated by a database and not globally unique. VegBank Accession codes are only generated by VegBank, and therefore data integrity can be guaranteed, unlike with a primary key (number). ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'taxonObservation', + 'emb_taxonObservation', + 'this row embargoed.', + 'denorm', + 'yes', + 'Integer', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'This value mimics the default embargo value for the plot that this record belongs to.', + + ' taxonObservation Taxon Observation emb_taxonObservation this row embargoed. denorm Integer n/a n/a no n/a This value mimics the default embargo value for the plot that this record belongs to. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'taxonObservation', + 'int_origPlantConcept_ID', + 'Original Interpretation, Plant Concept ID', + 'denorm', + 'yes', + 'Integer', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'The Plant Concept ID for the Original Interpretation.', + + ' taxonObservation Taxon Observation int_origPlantConcept_ID Original Interpretation, Plant Concept ID denorm Integer n/a n/a no n/a The Plant Concept ID for the Original Interpretation. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'taxonObservation', + 'int_origPlantSciFull', + 'Original Interpretation, full Scientific Name', + 'denorm', + 'yes', + 'varchar (255)', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'The full Scientific Name, with authors, for the Original Interpretation.', + + ' taxonObservation Taxon Observation int_origPlantSciFull Original Interpretation, full Scientific Name denorm varchar (255) n/a n/a no n/a The full Scientific Name, with authors, for the Original Interpretation. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'taxonObservation', + 'int_origPlantSciNameNoAuth', + 'Original Interpretation, Scientific Name without authors', + 'denorm', + 'yes', + 'varchar (255)', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'The Scientific Name without authors for the Original Interpretation.', + + ' taxonObservation Taxon Observation int_origPlantSciNameNoAuth Original Interpretation, Scientific Name without authors denorm varchar (255) n/a n/a no n/a The Scientific Name without authors for the Original Interpretation. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'taxonObservation', + 'int_origPlantCommon', + 'Original Interpretation, Common Name', + 'denorm', + 'yes', + 'varchar (255)', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'The Common Name for the Original Interpretation.', + + ' taxonObservation Taxon Observation int_origPlantCommon Original Interpretation, Common Name denorm varchar (255) n/a n/a no n/a The Common Name for the Original Interpretation. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'taxonObservation', + 'int_origPlantCode', + 'Original Interpretation, USDA Code', + 'denorm', + 'yes', + 'varchar (255)', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'The USDA Code, if available, for the Original Interpretation.', + + ' taxonObservation Taxon Observation int_origPlantCode Original Interpretation, USDA Code denorm varchar (255) n/a n/a no n/a The USDA Code, if available, for the Original Interpretation. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'taxonObservation', + 'int_currPlantConcept_ID', + 'Current Interpretation, Plant Concept ID', + 'denorm', + 'yes', + 'Integer', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'The Plant Concept ID for the Current Interpretation, which is often that same as the Original Interpretation.', + + ' taxonObservation Taxon Observation int_currPlantConcept_ID Current Interpretation, Plant Concept ID denorm Integer n/a n/a no n/a The Plant Concept ID for the Current Interpretation, which is often that same as the Original Interpretation. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'taxonObservation', + 'int_currPlantSciFull', + 'Current Interpretation, full Scientific Name', + 'denorm', + 'yes', + 'varchar (255)', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'The full Scientific Name, with authors,for the Current Interpretation.', + + ' taxonObservation Taxon Observation int_currPlantSciFull Current Interpretation, full Scientific Name denorm varchar (255) n/a n/a no n/a The full Scientific Name, with authors,for the Current Interpretation. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'taxonObservation', + 'int_currPlantSciNameNoAuth', + 'Current Interpretation, Scientific Name without authors', + 'denorm', + 'yes', + 'varchar (255)', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'The Scientific Name without authors for the Current Interpretation.', + + ' taxonObservation Taxon Observation int_currPlantSciNameNoAuth Current Interpretation, Scientific Name without authors denorm varchar (255) n/a n/a no n/a The Scientific Name without authors for the Current Interpretation. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'taxonObservation', + 'int_currPlantCommon', + 'Current Interpretation, Common Name', + 'denorm', + 'yes', + 'varchar (255)', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'The Common Name for the Current Interpretation.', + + ' taxonObservation Taxon Observation int_currPlantCommon Current Interpretation, Common Name denorm varchar (255) n/a n/a no n/a The Common Name for the Current Interpretation. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'taxonObservation', + 'int_currPlantCode', + 'Current Interpretation, USDA Code', + 'denorm', + 'yes', + 'varchar (255)', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'The USDA Code, if available, for the Current Interpretation.', + + ' taxonObservation Taxon Observation int_currPlantCode Current Interpretation, USDA Code denorm varchar (255) n/a n/a no n/a The USDA Code, if available, for the Current Interpretation. ' + + ); + + + INSERT INTO dba_tableDescription ( tableName , tableLabel , tableNotes , tableDescription , tableKeywords ) values ( + 'taxonAlt', + 'Taxon Alt', + 'This table shows alternate taxa that are to be grouped for a taxonInterpretation.', + 'When this table is used, the taxonInterpretation that is referenced here is interpreting the taxonObservation as the combination of all plantConcepts referenced in this table with the same taxonInterpretation_ID. TaxonInterpretation.groupType shows what type of group this is (one of, union, unknown).', + ' taxonAlt Taxon Alt This table shows alternate taxa that are to be grouped for a taxonInterpretation. When this table is used, the taxonInterpretation that is referenced here is interpreting the taxonObservation as the combination of all plantConcepts referenced in this table with the same taxonInterpretation_ID. TaxonInterpretation.groupType shows what type of group this is (one of, union, unknown). taxonAlt_ID ID taxonInterpretation_ID Taxon Interpretation plantConcept_ID Plant Concept taxonAltFit Taxon Fit taxonAltConfidence Taxon Confidence taxonAltNotes Taxon Alt Notes emb_taxonAlt this row embargoed. ' + ); + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'taxonAlt', + 'taxonAlt_ID', + 'ID', + 'logical', + 'yes', + 'serial', + 'PK', + 'n/a', + 'no', + 'n/a', + 'Database generated number to uniquely identify this record, and thus taxonGroup.', + + ' taxonAlt Taxon Alt taxonAlt_ID ID logical serial PK n/a no n/a Database generated number to uniquely identify this record, and thus taxonGroup. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'taxonAlt', + 'taxonInterpretation_ID', + 'Taxon Interpretation', + 'logical', + 'no', + 'Integer', + 'FK', + 'taxonInterpretation.TAXONINTERPRETATION_ID', + 'no', + 'n/a', + 'Links to the taxonInterpretation for which several plantConcepts are grouped to form an irregular taxon. The plantConcept referenced here is one member of the group.', + + ' taxonAlt Taxon Alt taxonInterpretation_ID Taxon Interpretation logical required Integer FK taxonInterpretation.TAXONINTERPRETATION_ID no n/a Links to the taxonInterpretation for which several plantConcepts are grouped to form an irregular taxon. The plantConcept referenced here is one member of the group. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'taxonAlt', + 'plantConcept_ID', + 'Plant Concept', + 'logical', + 'no', + 'Integer', + 'FK', + 'plantConcept.PLANTCONCEPT_ID', + 'no', + 'n/a', + 'Links to the plantConcept that is part of the taxonGroup formed by all records in this table with the same taxonInterpretation_ID.', + + ' taxonAlt Taxon Alt plantConcept_ID Plant Concept logical required Integer FK plantConcept.PLANTCONCEPT_ID no n/a Links to the plantConcept that is part of the taxonGroup formed by all records in this table with the same taxonInterpretation_ID. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'taxonAlt', + 'taxonAltFit', + 'Taxon Fit', + 'logical', + 'yes', + 'varchar (50)', + 'n/a', + 'n/a', + 'closed', + 'n/a', + 'Indicates the degree of fit with the plant concept being assigned. Values derive from Gopal, S., and Woodcock, C. (1994), Theory and methods for accuracy assessment of thematic maps using fuzzy sets. Photogrammetric Engineering and Remote Sensing 60(2):181-188.', + + ' taxonAlt Taxon Alt taxonAltFit Taxon Fit logical varchar (50) n/a n/a closed n/a Indicates the degree of fit with the plant concept being assigned. Values derive from Gopal, S., and Woodcock, C. (1994), Theory and methods for accuracy assessment of thematic maps using fuzzy sets. Photogrammetric Engineering and Remote Sensing 60(2):181-188. Absolutely correct (Fits well) No doubt about the match. Perfect fit. Absolutely wrong (Absolutely doesn''t fit) This answer is absolutely unacceptable. Unambiguously incorrect. Good answer (Fits reasonably well) Good match with the concept. Unambiguously correct. Reasonable or acceptable answer (Possibly fits) Maybe not the best possible answer but it is acceptable; this answer does not pose a problem to the user. Correct. Understandable but wrong (Doesn''t fit but is close) Not a good answer. There is something about the plot that makes the answer understandable, but there is clearly a better answer. This answer would pose a problem for users. Incorrect. ' + + ); + + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'taxonAlt', + 'taxonAltFit', + 'Absolutely wrong', + '(Absolutely doesn''t fit) This answer is absolutely unacceptable. Unambiguously incorrect.', + '1' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'taxonAlt', + 'taxonAltFit', + 'Understandable but wrong', + '(Doesn''t fit but is close) Not a good answer. There is something about the plot that makes the answer understandable, but there is clearly a better answer. This answer would pose a problem for users. Incorrect.', + '2' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'taxonAlt', + 'taxonAltFit', + 'Reasonable or acceptable answer', + '(Possibly fits) Maybe not the best possible answer but it is acceptable; this answer does not pose a problem to the user. Correct.', + '3' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'taxonAlt', + 'taxonAltFit', + 'Good answer', + '(Fits reasonably well) Good match with the concept. Unambiguously correct.', + '4' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'taxonAlt', + 'taxonAltFit', + 'Absolutely correct', + '(Fits well) No doubt about the match. Perfect fit.', + '5' + ); + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'taxonAlt', + 'taxonAltConfidence', + 'Taxon Confidence', + 'logical', + 'yes', + 'varchar (50)', + 'n/a', + 'n/a', + 'closed', + 'n/a', + 'Indicates the degree of confidence of the interpreter(s) in the interpretation made. This can reflect the level of familiarity with the classification or the sufficiency of information about the plot (e.g., High, Moderate, Low).', + + ' taxonAlt Taxon Alt taxonAltConfidence Taxon Confidence logical varchar (50) n/a n/a closed n/a Indicates the degree of confidence of the interpreter(s) in the interpretation made. This can reflect the level of familiarity with the classification or the sufficiency of information about the plot (e.g., High, Moderate, Low). High The party making the taxon interpretation has a high confidence in the accuracy of this interpretation. A party can have high confidence that a plot has a fit of "absolutely wrong" for a particular community. Low The party making the taxon interpretation has a low confidence in the accuracy of this interpretation. Medium The party making the taxon interpretation has a medium amount of confidence in the accuracy of this interpretation. ' + + ); + + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'taxonAlt', + 'taxonAltConfidence', + 'High', + 'The party making the taxon interpretation has a high confidence in the accuracy of this interpretation. A party can have high confidence that a plot has a fit of "absolutely wrong" for a particular community.', + '1' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'taxonAlt', + 'taxonAltConfidence', + 'Medium', + 'The party making the taxon interpretation has a medium amount of confidence in the accuracy of this interpretation.', + '2' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'taxonAlt', + 'taxonAltConfidence', + 'Low', + 'The party making the taxon interpretation has a low confidence in the accuracy of this interpretation.', + '3' + ); + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'taxonAlt', + 'taxonAltNotes', + 'Taxon Alt Notes', + 'logical', + 'yes', + 'text', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'These are notes that the interpreter has included with the interpretation (generally, the reason for the interpretation).', + + ' taxonAlt Taxon Alt taxonAltNotes Taxon Alt Notes logical text n/a n/a no n/a These are notes that the interpreter has included with the interpretation (generally, the reason for the interpretation). ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'taxonAlt', + 'emb_taxonAlt', + 'this row embargoed.', + 'denorm', + 'yes', + 'Integer', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'This value mimics the default embargo value for the plot that this record belongs to.', + + ' taxonAlt Taxon Alt emb_taxonAlt this row embargoed. denorm Integer n/a n/a no n/a This value mimics the default embargo value for the plot that this record belongs to. ' + + ); + + + INSERT INTO dba_tableDescription ( tableName , tableLabel , tableNotes , tableDescription , tableKeywords ) values ( + 'telephone', + 'Telephone', + 'Telephone numbers for the various individuals and organizations in the party table.', + null, + ' telephone Telephone Telephone numbers for the various individuals and organizations in the party table. TELEPHONE_ID ID PARTY_ID Party phoneNumber Phone Number phoneType Phone Type ' + ); + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'telephone', + 'TELEPHONE_ID', + 'ID', + 'logical', + 'yes', + 'serial', + 'PK', + 'n/a', + 'no', + 'Primary key for the telephone table.', + 'Database generated identifier assigned to each unique telephone contact record.', + + ' telephone Telephone TELEPHONE_ID ID logical serial PK n/a no Primary key for the telephone table. Database generated identifier assigned to each unique telephone contact record. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'telephone', + 'PARTY_ID', + 'Party', + 'logical', + 'no', + 'Integer', + 'FK', + 'party.PARTY_ID', + 'no', + 'Foreign key into the party table', + 'This is the ''link'' between a PARTY and an entry in the TELEPHONE table.', + + ' telephone Telephone PARTY_ID Party logical required Integer FK party.PARTY_ID no Foreign key into the party table This is the ''link'' between a PARTY and an entry in the TELEPHONE table. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'telephone', + 'phoneNumber', + 'Phone Number', + 'logical', + 'no', + 'varchar (30)', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'Telephone number.', + + ' telephone Telephone phoneNumber Phone Number logical required varchar (30) n/a n/a no n/a Telephone number. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'telephone', + 'phoneType', + 'Phone Type', + 'logical', + 'no', + 'varchar (20)', + 'n/a', + 'n/a', + 'closed', + 'closed list', + 'This is the type of telephone: home, work, fax, cell, secretary, other.', + + ' telephone Telephone phoneType Phone Type logical required varchar (20) n/a n/a closed closed list This is the type of telephone: home, work, fax, cell, secretary, other. Cell Fax Home Not specified Secretary Work ' + + ); + + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'telephone', + 'phoneType', + 'Work', + null, + '1' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'telephone', + 'phoneType', + 'Home', + null, + '2' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'telephone', + 'phoneType', + 'Cell', + null, + '3' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'telephone', + 'phoneType', + 'Fax', + null, + '4' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'telephone', + 'phoneType', + 'Secretary', + null, + '5' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'telephone', + 'phoneType', + 'Not specified', + null, + '6' + ); + + INSERT INTO dba_tableDescription ( tableName , tableLabel , tableNotes , tableDescription , tableKeywords ) values ( + 'userDefined', + 'User Defined', + 'This table contains the definitions of user-defined variables. The table structure stems from desire to keep the user-defined variables separate from the main body of the database.', + 'This table contains the definitions of user-defined variables. The table structure stems from desire to keep the user-defined variables separate from the main body of the database.', + ' userDefined User Defined This table contains the definitions of user-defined variables. The table structure stems from desire to keep the user-defined variables separate from the main body of the database. This table contains the definitions of user-defined variables. The table structure stems from desire to keep the user-defined variables separate from the main body of the database. USERDEFINED_ID ID userDefinedName User Defined Name userDefinedMetadata User Defined Metadata userDefinedCategory User Defined Category userDefinedType User Defined Type tableName Table Name accessionCode Accession Code ' + ); + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'userDefined', + 'USERDEFINED_ID', + 'ID', + 'logical', + 'yes', + 'serial', + 'PK', + 'n/a', + 'no', + 'Primary key for userDefined', + 'Database generated identifier assigned to each unique user-defined variable.', + + ' userDefined User Defined USERDEFINED_ID ID logical serial PK n/a no Primary key for userDefined Database generated identifier assigned to each unique user-defined variable. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'userDefined', + 'userDefinedName', + 'User Defined Name', + 'logical', + 'yes', + 'varchar (50)', + 'n/a', + 'n/a', + 'open', + 'open list', + 'Name of the user-defined variable.', + + ' userDefined User Defined userDefinedName User Defined Name logical varchar (50) n/a n/a open open list Name of the user-defined variable. Depth to permafrost Microbial biomass Slope convexity ' + + ); + + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'userDefined', + 'userDefinedName', + 'Microbial biomass', + null, + '1' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'userDefined', + 'userDefinedName', + 'Slope convexity', + null, + '2' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'userDefined', + 'userDefinedName', + 'Depth to permafrost', + null, + '3' + ); + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'userDefined', + 'userDefinedMetadata', + 'User Defined Metadata', + 'logical', + 'yes', + 'text', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'Metadata about this user-defined variable.', + + ' userDefined User Defined userDefinedMetadata User Defined Metadata logical text n/a n/a no n/a Metadata about this user-defined variable. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'userDefined', + 'userDefinedCategory', + 'User Defined Category', + 'logical', + 'yes', + 'varchar (30)', + 'n/a', + 'n/a', + 'closed', + 'closed list', + 'Category of variable; included to facilitate queries for specific types of data.', + + ' userDefined User Defined userDefinedCategory User Defined Category logical varchar (30) n/a n/a closed closed list Category of variable; included to facilitate queries for specific types of data. Disturbance and land use Environment Geology and geomorphology Moisture Not specified Soil, chemical attributes Soil, physical attributes Subplots Topography ' + + ); + + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'userDefined', + 'userDefinedCategory', + 'Soil, physical attributes', + null, + '1' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'userDefined', + 'userDefinedCategory', + 'Soil, chemical attributes', + null, + '2' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'userDefined', + 'userDefinedCategory', + 'Geology and geomorphology', + null, + '3' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'userDefined', + 'userDefinedCategory', + 'Moisture', + null, + '4' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'userDefined', + 'userDefinedCategory', + 'Environment', + null, + '5' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'userDefined', + 'userDefinedCategory', + 'Topography', + null, + '6' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'userDefined', + 'userDefinedCategory', + 'Disturbance and land use', + null, + '7' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'userDefined', + 'userDefinedCategory', + 'Subplots', + null, + '8' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'userDefined', + 'userDefinedCategory', + 'Not specified', + null, + '9' + ); + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'userDefined', + 'userDefinedType', + 'User Defined Type', + 'logical', + 'no', + 'varchar (20)', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'Database data type of the user-defined variable.', + + ' userDefined User Defined userDefinedType User Defined Type logical required varchar (20) n/a n/a no n/a Database data type of the user-defined variable. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'userDefined', + 'tableName', + 'Table Name', + 'logical', + 'no', + 'varchar (50)', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'Name of table with which this user-defined variable is associated. For example soilBHorizonColor may be defined by the data contributor as associated with the observation table.', + + ' userDefined User Defined tableName Table Name logical required varchar (50) n/a n/a no n/a Name of table with which this user-defined variable is associated. For example soilBHorizonColor may be defined by the data contributor as associated with the observation table. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'userDefined', + 'accessionCode', + 'Accession Code', + 'logical', + 'yes', + 'varchar (255)', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'Code that uniquely references this record, allowing reference to this record for this version of this database. Better than a primary key, which is automatically generated by a database and not globally unique. VegBank Accession codes are only generated by VegBank, and therefore data integrity can be guaranteed, unlike with a primary key (number).', + + ' userDefined User Defined accessionCode Accession Code logical varchar (255) n/a n/a no n/a Code that uniquely references this record, allowing reference to this record for this version of this database. Better than a primary key, which is automatically generated by a database and not globally unique. VegBank Accession codes are only generated by VegBank, and therefore data integrity can be guaranteed, unlike with a primary key (number). ' + + ); + + + INSERT INTO dba_tableDescription ( tableName , tableLabel , tableNotes , tableDescription , tableKeywords ) values ( + 'embargo', + 'Embargo on Plot', + 'Embargo of plot data.', + null, + ' embargo Embargo on Plot Embargo of plot data. embargo_ID Embargo ID plot_ID Plot ID embargoReason Embargo Reason embargoStart Embargo Start embargoStop Embargo Stop defaultStatus Default Status ' + ); + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'embargo', + 'embargo_ID', + 'Embargo ID', + 'logical', + 'no', + 'serial', + 'PK', + 'n/a', + 'no', + 'n/a', + 'Database generated unique key for each record in this table.', + + ' embargo Embargo on Plot embargo_ID Embargo ID logical required serial PK n/a no n/a Database generated unique key for each record in this table. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'embargo', + 'plot_ID', + 'Plot ID', + 'logical', + 'no', + 'Integer', + 'FK', + 'plot.PLOT_ID', + 'no', + 'n/a', + 'Foreign key to the plot to which this embargo applies.', + + ' embargo Embargo on Plot plot_ID Plot ID logical required Integer FK plot.PLOT_ID no n/a Foreign key to the plot to which this embargo applies. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'embargo', + 'embargoReason', + 'Embargo Reason', + 'logical', + 'no', + 'text', + 'n/a', + 'n/a', + 'closed', + 'Author stipulation,Rare species,Landownership,Bad data,Other', + 'Reason why the plot is embargoed. This field, as all fields in this table, are private and cannot be viewed or downloaded by VegBank users.', + + ' embargo Embargo on Plot embargoReason Embargo Reason logical required text n/a n/a closed Author stipulation,Rare species,Landownership,Bad data,Other Reason why the plot is embargoed. This field, as all fields in this table, are private and cannot be viewed or downloaded by VegBank users. Author stipulation Plot Author requires that plot be embargoed Rare Species There are rare species on this plot whose exact location should not be revealed to all users. Land Ownership Land owner requires plot data to be embargoed Bad Data The data pertaining to this plot have been determined to have errors. Other None of the above reasons. ' + + ); + + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'embargo', + 'embargoReason', + 'Author stipulation', + 'Plot Author requires that plot be embargoed', + '1' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'embargo', + 'embargoReason', + 'Rare Species', + 'There are rare species on this plot whose exact location should not be revealed to all users.', + '2' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'embargo', + 'embargoReason', + 'Land Ownership', + 'Land owner requires plot data to be embargoed', + '3' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'embargo', + 'embargoReason', + 'Bad Data', + 'The data pertaining to this plot have been determined to have errors.', + '4' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'embargo', + 'embargoReason', + 'Other', + 'None of the above reasons.', + '99' + ); + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'embargo', + 'embargoStart', + 'Embargo Start', + 'logical', + 'no', + 'Date', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'Start date for the embargo.', + + ' embargo Embargo on Plot embargoStart Embargo Start logical required Date n/a n/a no n/a Start date for the embargo. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'embargo', + 'embargoStop', + 'Embargo Stop', + 'logical', + 'no', + 'Date', + 'n/a', + 'n/a', + 'no', + 'n/a', + 'Stop date for the embargo.', + + ' embargo Embargo on Plot embargoStop Embargo Stop logical required Date n/a n/a no n/a Stop date for the embargo. ' + + ); + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + 'embargo', + 'defaultStatus', + 'Default Status', + 'logical', + 'no', + 'Integer', + 'n/a', + 'n/a', + 'closed', + '0-6, according to confidStatus values', + 'Level of embargo for users that do not have special permission found in userPermission table.', + + ' embargo Embargo on Plot defaultStatus Default Status logical required Integer n/a n/a closed 0-6, according to confidStatus values Level of embargo for users that do not have special permission found in userPermission table. 0 Public 1 1 km radius 2 10 km radius 3 100 km radius 4 Location embargo 5 Public embargo on data 6 Full embargo on data ' + + ); + + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'embargo', + 'defaultStatus', + '0', + 'Public', + '1' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'embargo', + 'defaultStatus', + '1', + '1 km radius', + '2' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'embargo', + 'defaultStatus', + '2', + '10 km radius', + '3' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'embargo', + 'defaultStatus', + '3', + '100 km radius', + '4' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'embargo', + 'defaultStatus', + '4', + 'Location embargo', + '5' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'embargo', + 'defaultStatus', + '5', + 'Public embargo on data', + '6' + ); + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + 'embargo', + 'defaultStatus', + '6', + 'Full embargo on data', + '7' + ); + \ No newline at end of file diff --git a/sql-transformations/INSTALL.md b/sql-transformations/INSTALL.md index 8638359..19d952d 100644 --- a/sql-transformations/INSTALL.md +++ b/sql-transformations/INSTALL.md @@ -32,6 +32,7 @@ CREATE TABLE dba_preassignacccode ); ``` +- And has been amended to: @@ -94,6 +95,16 @@ To find all the different updates, you can perform the following: When reviewing Vegbank's 'db_model_vegbank.xml', there appears to be specific update versions to attributes for vegbank changes 1.0.*, which leads me to believe we can safely omit the respective `vegbank-changes-1.0.*.sql` files. -## The remaining migrations +## Step 2: The remaining migrations The other migration sqls (Steps 1 to 8) were obtained by following the 'build.xml' structure in the [Vegbank repo](https://github.com/NCEAS/vegbank/). + +## Step 3: Populating the Data Dictionary + +To help devs better understand the database's structure, we then need to populate the data dictionary. + +Run the following to create the relevant 'populate-datadictionary.sql' sql file. + +```sh +./getvegbanksql_datadictionary.sh +``` diff --git a/sql-transformations/csvtools.xsl b/sql-transformations/csvtools.xsl new file mode 100644 index 0000000..ae29562 --- /dev/null +++ b/sql-transformations/csvtools.xsl @@ -0,0 +1,66 @@ + + + + " + | +| + + + + + + + + + + + \n\n\n + + + \n + + + null + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/sql-transformations/dbmodel-to-ddtables.xsl b/sql-transformations/dbmodel-to-ddtables.xsl new file mode 100644 index 0000000..6dccb2b --- /dev/null +++ b/sql-transformations/dbmodel-to-ddtables.xsl @@ -0,0 +1,131 @@ + + + + | +| + + + + + -- + -- This is a generated SQL script for postgresql + -- + + -- first delete any info out of the tables + DELETE FROM dba_tableDescription; + DELETE FROM dba_fieldDescription; + DELETE FROM dba_fieldList; + + + + INSERT INTO dba_tableDescription ( tableName , tableLabel , tableNotes , tableDescription , tableKeywords ) values ( + , + , + , + , + ' + + + + + + + ' + ); + + + + INSERT INTO dba_fieldDescription ( tableName, fieldName , fieldLabel , fieldModel , fieldNulls , fieldType , fieldKey , fieldReferences , fieldList , fieldNotes , fieldDefinition, fieldKeywords ) + values ( + , + , + , + , + , + , + , + , + , + , + , + + ' + + + + + required + + + + + + + + + + + ' + + ); + + + + + + + + + + + INSERT INTO dba_fieldlist ( tableName , fieldName , listValue , listValueDescription , listValueSortOrder ) + values ( + , + , + , + , + + ); + + + + + + + + + + + + + + + + ' + + + + + + + null + + + + + ''' + + + + + + + + true + true + + + + diff --git a/sql-transformations/getvegbanksql_datadictionary.sh b/sql-transformations/getvegbanksql_datadictionary.sh new file mode 100755 index 0000000..7a59ac6 --- /dev/null +++ b/sql-transformations/getvegbanksql_datadictionary.sh @@ -0,0 +1,29 @@ +#/bin/bash + +# Define the input and output file names +INPUT_XML="db_model_vegbank.xml" +STYLESHEET_XSL="dbmodel-to-ddtables.xsl" +OUTPUT_SQL="populate-datadictionary.sql" + +# Confirm input XML file exists +if [ ! -f "$INPUT_XML" ]; then + echo "Input XML file '$INPUT_XML' not found!" + exit 1 +fi + +# Confirm XSL stylesheet file exists +if [ ! -f "$STYLESHEET_XSL" ]; then + echo "XSL stylesheet file '$STYLESHEET_XSL' not found!" + exit 1 +fi + +# Run the XSLT transformation to get 'populate-datadictionary.sql' +xsltproc -o "$OUTPUT_SQL" "$STYLESHEET_XSL" "$INPUT_XML" + +# Check if the process was successful +if [ $? -eq 0 ]; then + echo "Transformation successful. Output saved to '$OUTPUT_SQL'." +else + echo "Transformation failed." + exit 1 +fi \ No newline at end of file From c0afa7a5a0bf502bb16855449dc7d88eab3799e5 Mon Sep 17 00:00:00 2001 From: Dou Mok Date: Mon, 5 Aug 2024 14:15:05 -0700 Subject: [PATCH 08/49] Add TODO item in 'INSTALL.md' to review 'dbVerify' target --- sql-transformations/INSTALL.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sql-transformations/INSTALL.md b/sql-transformations/INSTALL.md index 19d952d..7cacede 100644 --- a/sql-transformations/INSTALL.md +++ b/sql-transformations/INSTALL.md @@ -108,3 +108,7 @@ Run the following to create the relevant 'populate-datadictionary.sql' sql file. ```sh ./getvegbanksql_datadictionary.sh ``` + +## Step 4: Verify that the DB matches the model XML + +// TODO - Sort dbVerify \ No newline at end of file From 9312f9c5c85687f7c7cc9ae8ec2874f2c1b25d09 Mon Sep 17 00:00:00 2001 From: Dou Mok Date: Wed, 7 Aug 2024 09:45:34 -0700 Subject: [PATCH 09/49] Remove dbVerify TODO in 'INSTALL.md' - not necessary --- sql-transformations/INSTALL.md | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/sql-transformations/INSTALL.md b/sql-transformations/INSTALL.md index 7cacede..d8b50e8 100644 --- a/sql-transformations/INSTALL.md +++ b/sql-transformations/INSTALL.md @@ -107,8 +107,4 @@ Run the following to create the relevant 'populate-datadictionary.sql' sql file. ```sh ./getvegbanksql_datadictionary.sh -``` - -## Step 4: Verify that the DB matches the model XML - -// TODO - Sort dbVerify \ No newline at end of file +``` \ No newline at end of file From cea47f6ac6bafc77fed1d8d253e2aa4ef1892046 Mon Sep 17 00:00:00 2001 From: Dou Mok Date: Wed, 7 Aug 2024 09:47:45 -0700 Subject: [PATCH 10/49] Add 'create_admin_user.sql' to migrations --- ...ate-datadictionary.sql => 10_populate-datadictionary.sql} | 0 migrations/9_create_admin_user.sql | 5 +++++ 2 files changed, 5 insertions(+) rename migrations/{9_populate-datadictionary.sql => 10_populate-datadictionary.sql} (100%) create mode 100644 migrations/9_create_admin_user.sql diff --git a/migrations/9_populate-datadictionary.sql b/migrations/10_populate-datadictionary.sql similarity index 100% rename from migrations/9_populate-datadictionary.sql rename to migrations/10_populate-datadictionary.sql diff --git a/migrations/9_create_admin_user.sql b/migrations/9_create_admin_user.sql new file mode 100644 index 0000000..9d40f73 --- /dev/null +++ b/migrations/9_create_admin_user.sql @@ -0,0 +1,5 @@ +insert into party (surname, email) +values ('admin', 'admin@vegbank.org'); + +insert into usr (party_id, password, permission_type, ticket_count, email_address) +values ((select max(party_id) from party where email='admin@vegbank.org'), '5ffffffffffffff8d7ab5d48fffffffffffffff8effffffffffffffe9ffffffffffffffabffffffffffffffb3fffffffffffffff0ffffffffffffff85ffffffffffffffe7ffffffffffffff824', 15, 2000, 'admin@vegbank.org'); From dbcf685d0bb678753ec55f37f6b4cb735be61703 Mon Sep 17 00:00:00 2001 From: Dou Mok Date: Wed, 7 Aug 2024 11:58:49 -0700 Subject: [PATCH 11/49] Add 'resources' folder with initial 'flyway.conf' file --- resources/flyway.conf | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 resources/flyway.conf diff --git a/resources/flyway.conf b/resources/flyway.conf new file mode 100644 index 0000000..f51a1f8 --- /dev/null +++ b/resources/flyway.conf @@ -0,0 +1,4 @@ +flyway.url=jdbc:postgresql://localhost:5432/vegbank +flyway.user=TODO +flyway.password=SECUREPASSWORD +flyway.locations=filesystem:/migrations \ No newline at end of file From 317fa8c57a5b72dafa14cc4b0f47f98d250a26ae Mon Sep 17 00:00:00 2001 From: Dou Mok Date: Wed, 7 Aug 2024 12:30:47 -0700 Subject: [PATCH 12/49] Update 'flyway.conf' user and password --- resources/flyway.conf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/resources/flyway.conf b/resources/flyway.conf index f51a1f8..44ef070 100644 --- a/resources/flyway.conf +++ b/resources/flyway.conf @@ -1,4 +1,4 @@ flyway.url=jdbc:postgresql://localhost:5432/vegbank -flyway.user=TODO -flyway.password=SECUREPASSWORD +flyway.user=vegbank +flyway.password=vegbank flyway.locations=filesystem:/migrations \ No newline at end of file From be6a270b2082c6c9579f71c7b41ac20cecf1bef7 Mon Sep 17 00:00:00 2001 From: Dou Mok Date: Wed, 7 Aug 2024 12:50:01 -0700 Subject: [PATCH 13/49] Rename migrations sql files to follow flyway naming conventions (Ex. V#.#__name) --- migrations/{0_vegbank.sql => V1.0__vegbank.sql} | 0 ...late-datadictionary.sql => V1.10__populate-datadictionary.sql} | 0 .../{1_create_aggregrates.sql => V1.1__create_aggregrates.sql} | 0 migrations/{2_create_extras.sql => V1.2__create_extras.sql} | 0 migrations/{3_createIndices.sql => V1.3__createIndices.sql} | 0 .../{4_drop_vegbank_views.sql => V1.4__drop_vegbank_views.sql} | 0 ...{5_create_vegbank_views.sql => V1.5__create_vegbank_views.sql} | 0 ...e_configtables.sql => V1.6__vegbank_populate_configtables.sql} | 0 migrations/{7_create_temp_tbls.sql => V1.7__create_temp_tbls.sql} | 0 ...{8_create_vegbank_views.sql => V1.8__create_vegbank_views.sql} | 0 .../{9_create_admin_user.sql => V1.9__create_admin_user.sql} | 0 11 files changed, 0 insertions(+), 0 deletions(-) rename migrations/{0_vegbank.sql => V1.0__vegbank.sql} (100%) rename migrations/{10_populate-datadictionary.sql => V1.10__populate-datadictionary.sql} (100%) rename migrations/{1_create_aggregrates.sql => V1.1__create_aggregrates.sql} (100%) rename migrations/{2_create_extras.sql => V1.2__create_extras.sql} (100%) rename migrations/{3_createIndices.sql => V1.3__createIndices.sql} (100%) rename migrations/{4_drop_vegbank_views.sql => V1.4__drop_vegbank_views.sql} (100%) rename migrations/{5_create_vegbank_views.sql => V1.5__create_vegbank_views.sql} (100%) rename migrations/{6_vegbank_populate_configtables.sql => V1.6__vegbank_populate_configtables.sql} (100%) rename migrations/{7_create_temp_tbls.sql => V1.7__create_temp_tbls.sql} (100%) rename migrations/{8_create_vegbank_views.sql => V1.8__create_vegbank_views.sql} (100%) rename migrations/{9_create_admin_user.sql => V1.9__create_admin_user.sql} (100%) diff --git a/migrations/0_vegbank.sql b/migrations/V1.0__vegbank.sql similarity index 100% rename from migrations/0_vegbank.sql rename to migrations/V1.0__vegbank.sql diff --git a/migrations/10_populate-datadictionary.sql b/migrations/V1.10__populate-datadictionary.sql similarity index 100% rename from migrations/10_populate-datadictionary.sql rename to migrations/V1.10__populate-datadictionary.sql diff --git a/migrations/1_create_aggregrates.sql b/migrations/V1.1__create_aggregrates.sql similarity index 100% rename from migrations/1_create_aggregrates.sql rename to migrations/V1.1__create_aggregrates.sql diff --git a/migrations/2_create_extras.sql b/migrations/V1.2__create_extras.sql similarity index 100% rename from migrations/2_create_extras.sql rename to migrations/V1.2__create_extras.sql diff --git a/migrations/3_createIndices.sql b/migrations/V1.3__createIndices.sql similarity index 100% rename from migrations/3_createIndices.sql rename to migrations/V1.3__createIndices.sql diff --git a/migrations/4_drop_vegbank_views.sql b/migrations/V1.4__drop_vegbank_views.sql similarity index 100% rename from migrations/4_drop_vegbank_views.sql rename to migrations/V1.4__drop_vegbank_views.sql diff --git a/migrations/5_create_vegbank_views.sql b/migrations/V1.5__create_vegbank_views.sql similarity index 100% rename from migrations/5_create_vegbank_views.sql rename to migrations/V1.5__create_vegbank_views.sql diff --git a/migrations/6_vegbank_populate_configtables.sql b/migrations/V1.6__vegbank_populate_configtables.sql similarity index 100% rename from migrations/6_vegbank_populate_configtables.sql rename to migrations/V1.6__vegbank_populate_configtables.sql diff --git a/migrations/7_create_temp_tbls.sql b/migrations/V1.7__create_temp_tbls.sql similarity index 100% rename from migrations/7_create_temp_tbls.sql rename to migrations/V1.7__create_temp_tbls.sql diff --git a/migrations/8_create_vegbank_views.sql b/migrations/V1.8__create_vegbank_views.sql similarity index 100% rename from migrations/8_create_vegbank_views.sql rename to migrations/V1.8__create_vegbank_views.sql diff --git a/migrations/9_create_admin_user.sql b/migrations/V1.9__create_admin_user.sql similarity index 100% rename from migrations/9_create_admin_user.sql rename to migrations/V1.9__create_admin_user.sql From e7663fec2a94574022b58951696890c8743f6d4c Mon Sep 17 00:00:00 2001 From: Dou Mok Date: Wed, 7 Aug 2024 13:10:20 -0700 Subject: [PATCH 14/49] Fix exceptions causing migration to fail in V1.3__createIndices file by adding 'IF EXISTS' to 'DROP INDEX' --- migrations/V1.3__createIndices.sql | 362 ++++++++++++++--------------- 1 file changed, 181 insertions(+), 181 deletions(-) diff --git a/migrations/V1.3__createIndices.sql b/migrations/V1.3__createIndices.sql index 6b30a09..4a41d6a 100644 --- a/migrations/V1.3__createIndices.sql +++ b/migrations/V1.3__createIndices.sql @@ -5,514 +5,514 @@ -- plantusage -DROP INDEX plantusage_plantname_x ; +DROP INDEX IF EXISTS plantusage_plantname_x ; CREATE INDEX plantusage_plantname_x on plantusage ( plantname ); -- t -DROP INDEX plantusage_plantname_id_x ; +DROP INDEX IF EXISTS plantusage_plantname_id_x ; CREATE INDEX plantusage_plantname_id_x on plantusage ( plantname_id ); -- t -DROP INDEX plantusage_plantconcept_id_x ; +DROP INDEX IF EXISTS plantusage_plantconcept_id_x ; CREATE INDEX plantusage_plantconcept_id_x on plantusage ( plantconcept_id ); -- t -DROP INDEX plantusage_classsystem_x ; +DROP INDEX IF EXISTS plantusage_classsystem_x ; CREATE INDEX plantusage_classsystem_x on plantusage ( classsystem ); -- t -DROP INDEX plantusage_party_id_x ; +DROP INDEX IF EXISTS plantusage_party_id_x ; CREATE INDEX plantusage_party_id_x ON plantusage (party_id); -DROP INDEX plantusage_plantstatus_id_x ; +DROP INDEX IF EXISTS plantusage_plantstatus_id_x ; CREATE INDEX plantusage_plantstatus_id_x ON plantusage (plantstatus_id); -- plantname -DROP INDEX plantname_plantname_x ; +DROP INDEX IF EXISTS plantname_plantname_x ; CREATE INDEX plantname_plantname_x on plantname ( plantname ); -- t -DROP INDEX plantname_reference_id_x ; +DROP INDEX IF EXISTS plantname_reference_id_x ; CREATE INDEX plantname_reference_id_x ON plantname (reference_id); -- plantconcept -DROP INDEX plantconcept_plantname_id_x ; +DROP INDEX IF EXISTS plantconcept_plantname_id_x ; CREATE INDEX plantconcept_plantname_id_x on plantconcept ( plantname_id ); -- t -DROP INDEX plantconcept_reference_id_x ; +DROP INDEX IF EXISTS plantconcept_reference_id_x ; CREATE INDEX plantconcept_reference_id_x ON plantconcept (reference_id); -DROP INDEX plantconcept_dobscount_x ; +DROP INDEX IF EXISTS plantconcept_dobscount_x ; CREATE INDEX plantconcept_dobscount_x ON plantconcept (d_obscount); -- plantstatus -DROP INDEX plantstatus_plantlevel_x ; +DROP INDEX IF EXISTS plantstatus_plantlevel_x ; CREATE INDEX plantstatus_plantlevel_x ON plantstatus (plantlevel); -- t -DROP INDEX plantstatus_plantconcept_id_x ; +DROP INDEX IF EXISTS plantstatus_plantconcept_id_x ; CREATE INDEX plantstatus_plantconcept_id_x ON plantstatus (plantconcept_id); -- t -DROP INDEX plantstatus_reference_id_x ; +DROP INDEX IF EXISTS plantstatus_reference_id_x ; CREATE INDEX plantstatus_reference_id_x ON plantstatus (reference_id); -DROP INDEX plantstatus_plantparent_id_x ; +DROP INDEX IF EXISTS plantstatus_plantparent_id_x ; CREATE INDEX plantstatus_plantparent_id_x ON plantstatus (plantparent_id); -DROP INDEX plantstatus_party_id_x ; +DROP INDEX IF EXISTS plantstatus_party_id_x ; CREATE INDEX plantstatus_party_id_x ON plantstatus (party_id); -- userregionalexp -DROP INDEX userregionalexp_usercertification_id_x ; +DROP INDEX IF EXISTS userregionalexp_usercertification_id_x ; CREATE INDEX userregionalexp_usercertification_id_x ON userregionalexp (usercertification_id); -- userdatasetitem -DROP INDEX userdatasetitem_userdataset_id_x ; +DROP INDEX IF EXISTS userdatasetitem_userdataset_id_x ; CREATE INDEX userdatasetitem_userdataset_id_x ON userdatasetitem (userdataset_id); -- userdataset -DROP INDEX userdataset_usr_id_x ; +DROP INDEX IF EXISTS userdataset_usr_id_x ; CREATE INDEX userdataset_usr_id_x ON userdataset (usr_id); -- usernotify -DROP INDEX usernotify_usr_id_x ; +DROP INDEX IF EXISTS usernotify_usr_id_x ; CREATE INDEX usernotify_usr_id_x ON usernotify (usr_id); -- embargo -DROP INDEX embargo_plot_id_x ; +DROP INDEX IF EXISTS embargo_plot_id_x ; CREATE INDEX embargo_plot_id_x ON embargo (plot_id); -- userpermission -DROP INDEX userpermission_embargo_id_x ; +DROP INDEX IF EXISTS userpermission_embargo_id_x ; CREATE INDEX userpermission_embargo_id_x ON userpermission (embargo_id); -DROP INDEX userpermission_usr_id_x ; +DROP INDEX IF EXISTS userpermission_usr_id_x ; CREATE INDEX userpermission_usr_id_x ON userpermission (usr_id); -- userquery -DROP INDEX userquery_usr_id_x ; +DROP INDEX IF EXISTS userquery_usr_id_x ; CREATE INDEX userquery_usr_id_x ON userquery (usr_id); -- userpreference -DROP INDEX userpreference_usr_id_x ; +DROP INDEX IF EXISTS userpreference_usr_id_x ; CREATE INDEX userpreference_usr_id_x ON userpreference (usr_id); -- userrecordowner -DROP INDEX userrecordowner_usr_id_x ; +DROP INDEX IF EXISTS userrecordowner_usr_id_x ; CREATE INDEX userrecordowner_usr_id_x ON userrecordowner (usr_id); -- usr -DROP INDEX usr_party_id_x ; +DROP INDEX IF EXISTS usr_party_id_x ; CREATE INDEX usr_party_id_x ON usr (party_id); -- aux_role -- covermethod -DROP INDEX covermethod_reference_id_x ; +DROP INDEX IF EXISTS covermethod_reference_id_x ; CREATE INDEX covermethod_reference_id_x ON covermethod (reference_id); -- stratummethod -DROP INDEX stratummethod_reference_id_x ; +DROP INDEX IF EXISTS stratummethod_reference_id_x ; CREATE INDEX stratummethod_reference_id_x ON stratummethod (reference_id); -- usercertification -DROP INDEX usercertification_usr_id_x ; +DROP INDEX IF EXISTS usercertification_usr_id_x ; CREATE INDEX usercertification_usr_id_x ON usercertification (usr_id); -- stratum -DROP INDEX stratum_observation_id_x ; +DROP INDEX IF EXISTS stratum_observation_id_x ; CREATE INDEX stratum_observation_id_x ON stratum (observation_id); -DROP INDEX stratum_stratumtype_id_x ; +DROP INDEX IF EXISTS stratum_stratumtype_id_x ; CREATE INDEX stratum_stratumtype_id_x ON stratum (stratumtype_id); -DROP INDEX stratum_stratummethod_id_x ; +DROP INDEX IF EXISTS stratum_stratummethod_id_x ; CREATE INDEX stratum_stratummethod_id_x ON stratum (stratummethod_id); -- stemlocation -DROP INDEX stemlocation_stemcount_id_x ; +DROP INDEX IF EXISTS stemlocation_stemcount_id_x ; CREATE INDEX stemlocation_stemcount_id_x ON stemlocation (stemcount_id); -- observation -DROP INDEX observation_previousobs_id_x ; +DROP INDEX IF EXISTS observation_previousobs_id_x ; CREATE INDEX observation_previousobs_id_x ON observation (previousobs_id); -DROP INDEX observation_previousobs_id_x ; +DROP INDEX IF EXISTS observation_previousobs_id_x ; CREATE INDEX observation_previousobs_id_x ON observation (previousobs_id); -DROP INDEX observation_previousobs_id_x ; +DROP INDEX IF EXISTS observation_previousobs_id_x ; CREATE INDEX observation_previousobs_id_x ON observation (previousobs_id); -DROP INDEX observation_plot_id_x ; +DROP INDEX IF EXISTS observation_plot_id_x ; CREATE INDEX observation_plot_id_x ON observation (plot_id); -DROP INDEX observation_project_id_x ; +DROP INDEX IF EXISTS observation_project_id_x ; CREATE INDEX observation_project_id_x ON observation (project_id); -DROP INDEX observation_covermethod_id_x ; +DROP INDEX IF EXISTS observation_covermethod_id_x ; CREATE INDEX observation_covermethod_id_x ON observation (covermethod_id); -DROP INDEX observation_stratummethod_id_x ; +DROP INDEX IF EXISTS observation_stratummethod_id_x ; CREATE INDEX observation_stratummethod_id_x ON observation (stratummethod_id); -DROP INDEX observation_soiltaxon_id_x ; +DROP INDEX IF EXISTS observation_soiltaxon_id_x ; CREATE INDEX observation_soiltaxon_id_x ON observation (soiltaxon_id); -- taxonobservation -DROP INDEX taxonobservation_observation_id_x ; +DROP INDEX IF EXISTS taxonobservation_observation_id_x ; CREATE INDEX taxonobservation_observation_id_x ON taxonobservation (observation_id); -DROP INDEX taxonobservation_reference_id_x ; +DROP INDEX IF EXISTS taxonobservation_reference_id_x ; CREATE INDEX taxonobservation_reference_id_x ON taxonobservation (reference_id); -- reference -DROP INDEX reference_referencejournal_id_x ; +DROP INDEX IF EXISTS reference_referencejournal_id_x ; CREATE INDEX reference_referencejournal_id_x ON reference (referencejournal_id); -- taxoninterpretation -DROP INDEX taxoninterpretation_taxonobservation_id_x ; +DROP INDEX IF EXISTS taxoninterpretation_taxonobservation_id_x ; CREATE INDEX taxoninterpretation_taxonobservation_id_x ON taxoninterpretation (taxonobservation_id); -DROP INDEX taxoninterpretation_stemlocation_id_x ; +DROP INDEX IF EXISTS taxoninterpretation_stemlocation_id_x ; CREATE INDEX taxoninterpretation_stemlocation_id_x ON taxoninterpretation (stemlocation_id); -DROP INDEX taxoninterpretation_plantconcept_id_x ; +DROP INDEX IF EXISTS taxoninterpretation_plantconcept_id_x ; CREATE INDEX taxoninterpretation_plantconcept_id_x ON taxoninterpretation (plantconcept_id); -DROP INDEX taxoninterpretation_plantname_id_x ; +DROP INDEX IF EXISTS taxoninterpretation_plantname_id_x ; CREATE INDEX taxoninterpretation_plantname_id_x ON taxoninterpretation (plantname_id); -DROP INDEX taxoninterpretation_party_id_x ; +DROP INDEX IF EXISTS taxoninterpretation_party_id_x ; CREATE INDEX taxoninterpretation_party_id_x ON taxoninterpretation (party_id); -DROP INDEX taxoninterpretation_role_id_x ; +DROP INDEX IF EXISTS taxoninterpretation_role_id_x ; CREATE INDEX taxoninterpretation_role_id_x ON taxoninterpretation (role_id); -DROP INDEX taxoninterpretation_reference_id_x ; +DROP INDEX IF EXISTS taxoninterpretation_reference_id_x ; CREATE INDEX taxoninterpretation_reference_id_x ON taxoninterpretation (reference_id); -DROP INDEX taxoninterpretation_collector_id_x ; +DROP INDEX IF EXISTS taxoninterpretation_collector_id_x ; CREATE INDEX taxoninterpretation_collector_id_x ON taxoninterpretation (collector_id); -DROP INDEX taxoninterpretation_museum_id_x ; +DROP INDEX IF EXISTS taxoninterpretation_museum_id_x ; CREATE INDEX taxoninterpretation_museum_id_x ON taxoninterpretation (museum_id); -- taxonalt -DROP INDEX taxonalt_taxoninterpretation_id_x ; +DROP INDEX IF EXISTS taxonalt_taxoninterpretation_id_x ; CREATE INDEX taxonalt_taxoninterpretation_id_x ON taxonalt (taxoninterpretation_id); -DROP INDEX taxonalt_plantconcept_id_x ; +DROP INDEX IF EXISTS taxonalt_plantconcept_id_x ; CREATE INDEX taxonalt_plantconcept_id_x ON taxonalt (plantconcept_id); -- telephone -DROP INDEX telephone_party_id_x ; +DROP INDEX IF EXISTS telephone_party_id_x ; CREATE INDEX telephone_party_id_x ON telephone (party_id); -- plot -DROP INDEX plot_reference_id_x ; +DROP INDEX IF EXISTS plot_reference_id_x ; CREATE INDEX plot_reference_id_x ON plot (reference_id); -DROP INDEX plot_parent_id_x ; +DROP INDEX IF EXISTS plot_parent_id_x ; CREATE INDEX plot_parent_id_x ON plot (parent_id); -DROP INDEX plot_parent_id_x ; +DROP INDEX IF EXISTS plot_parent_id_x ; CREATE INDEX plot_parent_id_x ON plot (parent_id); -DROP INDEX plot_parent_id_x ; +DROP INDEX IF EXISTS plot_parent_id_x ; CREATE INDEX plot_parent_id_x ON plot (parent_id); -- party -DROP INDEX party_currentname_id_x ; +DROP INDEX IF EXISTS party_currentname_id_x ; CREATE INDEX party_currentname_id_x ON party (currentname_id); -DROP INDEX party_currentname_id_x ; +DROP INDEX IF EXISTS party_currentname_id_x ; CREATE INDEX party_currentname_id_x ON party (currentname_id); -DROP INDEX party_currentname_id_x ; +DROP INDEX IF EXISTS party_currentname_id_x ; CREATE INDEX party_currentname_id_x ON party (currentname_id); -- place -DROP INDEX place_plot_id_x ; +DROP INDEX IF EXISTS place_plot_id_x ; CREATE INDEX place_plot_id_x ON place (plot_id); -DROP INDEX place_namedplace_id_x ; +DROP INDEX IF EXISTS place_namedplace_id_x ; CREATE INDEX place_namedplace_id_x ON place (namedplace_id); -- namedplace -DROP INDEX namedplace_reference_id_x ; +DROP INDEX IF EXISTS namedplace_reference_id_x ; CREATE INDEX namedplace_reference_id_x ON namedplace (reference_id); -- project -- projectcontributor -DROP INDEX projectcontributor_project_id_x ; +DROP INDEX IF EXISTS projectcontributor_project_id_x ; CREATE INDEX projectcontributor_project_id_x ON projectcontributor (project_id); -DROP INDEX projectcontributor_party_id_x ; +DROP INDEX IF EXISTS projectcontributor_party_id_x ; CREATE INDEX projectcontributor_party_id_x ON projectcontributor (party_id); -DROP INDEX projectcontributor_role_id_x ; +DROP INDEX IF EXISTS projectcontributor_role_id_x ; CREATE INDEX projectcontributor_role_id_x ON projectcontributor (role_id); -- revision -DROP INDEX revision_previousrevision_id_x ; +DROP INDEX IF EXISTS revision_previousrevision_id_x ; CREATE INDEX revision_previousrevision_id_x ON revision (previousrevision_id); -DROP INDEX revision_previousrevision_id_x ; +DROP INDEX IF EXISTS revision_previousrevision_id_x ; CREATE INDEX revision_previousrevision_id_x ON revision (previousrevision_id); -DROP INDEX revision_previousrevision_id_x ; +DROP INDEX IF EXISTS revision_previousrevision_id_x ; CREATE INDEX revision_previousrevision_id_x ON revision (previousrevision_id); -- soilobs -DROP INDEX soilobs_observation_id_x ; +DROP INDEX IF EXISTS soilobs_observation_id_x ; CREATE INDEX soilobs_observation_id_x ON soilobs (observation_id); -- soiltaxon -DROP INDEX soiltaxon_soilparent_id_x ; +DROP INDEX IF EXISTS soiltaxon_soilparent_id_x ; CREATE INDEX soiltaxon_soilparent_id_x ON soiltaxon (soilparent_id); -DROP INDEX soiltaxon_soilparent_id_x ; +DROP INDEX IF EXISTS soiltaxon_soilparent_id_x ; CREATE INDEX soiltaxon_soilparent_id_x ON soiltaxon (soilparent_id); -DROP INDEX soiltaxon_soilparent_id_x ; +DROP INDEX IF EXISTS soiltaxon_soilparent_id_x ; CREATE INDEX soiltaxon_soilparent_id_x ON soiltaxon (soilparent_id); -- stemcount -DROP INDEX stemcount_taxonimportance_id_x ; +DROP INDEX IF EXISTS stemcount_taxonimportance_id_x ; CREATE INDEX stemcount_taxonimportance_id_x ON stemcount (taxonimportance_id); -- stratumtype -DROP INDEX stratumtype_stratummethod_id_x ; +DROP INDEX IF EXISTS stratumtype_stratummethod_id_x ; CREATE INDEX stratumtype_stratummethod_id_x ON stratumtype (stratummethod_id); -- taxonimportance -DROP INDEX taxonimportance_taxonobservation_id_x ; +DROP INDEX IF EXISTS taxonimportance_taxonobservation_id_x ; CREATE INDEX taxonimportance_taxonobservation_id_x ON taxonimportance (taxonobservation_id); -DROP INDEX taxonimportance_stratum_id_x ; +DROP INDEX IF EXISTS taxonimportance_stratum_id_x ; CREATE INDEX taxonimportance_stratum_id_x ON taxonimportance (stratum_id); -- observationcontributor -DROP INDEX observationcontributor_observation_id_x ; +DROP INDEX IF EXISTS observationcontributor_observation_id_x ; CREATE INDEX observationcontributor_observation_id_x ON observationcontributor (observation_id); -DROP INDEX observationcontributor_party_id_x ; +DROP INDEX IF EXISTS observationcontributor_party_id_x ; CREATE INDEX observationcontributor_party_id_x ON observationcontributor (party_id); -DROP INDEX observationcontributor_role_id_x ; +DROP INDEX IF EXISTS observationcontributor_role_id_x ; CREATE INDEX observationcontributor_role_id_x ON observationcontributor (role_id); -- observationsynonym -DROP INDEX observationsynonym_synonymobservation_id_x ; +DROP INDEX IF EXISTS observationsynonym_synonymobservation_id_x ; CREATE INDEX observationsynonym_synonymobservation_id_x ON observationsynonym (synonymobservation_id); -DROP INDEX observationsynonym_primaryobservation_id_x ; +DROP INDEX IF EXISTS observationsynonym_primaryobservation_id_x ; CREATE INDEX observationsynonym_primaryobservation_id_x ON observationsynonym (primaryobservation_id); -DROP INDEX observationsynonym_party_id_x ; +DROP INDEX IF EXISTS observationsynonym_party_id_x ; CREATE INDEX observationsynonym_party_id_x ON observationsynonym (party_id); -DROP INDEX observationsynonym_role_id_x ; +DROP INDEX IF EXISTS observationsynonym_role_id_x ; CREATE INDEX observationsynonym_role_id_x ON observationsynonym (role_id); -- partymember -DROP INDEX partymember_parentparty_id_x ; +DROP INDEX IF EXISTS partymember_parentparty_id_x ; CREATE INDEX partymember_parentparty_id_x ON partymember (parentparty_id); -DROP INDEX partymember_childparty_id_x ; +DROP INDEX IF EXISTS partymember_childparty_id_x ; CREATE INDEX partymember_childparty_id_x ON partymember (childparty_id); -DROP INDEX partymember_role_id_x ; +DROP INDEX IF EXISTS partymember_role_id_x ; CREATE INDEX partymember_role_id_x ON partymember (role_id); -- referenceparty -DROP INDEX referenceparty_currentparty_id_x ; +DROP INDEX IF EXISTS referenceparty_currentparty_id_x ; CREATE INDEX referenceparty_currentparty_id_x ON referenceparty (currentparty_id); -DROP INDEX referenceparty_currentparty_id_x ; +DROP INDEX IF EXISTS referenceparty_currentparty_id_x ; CREATE INDEX referenceparty_currentparty_id_x ON referenceparty (currentparty_id); -DROP INDEX referenceparty_currentparty_id_x ; +DROP INDEX IF EXISTS referenceparty_currentparty_id_x ; CREATE INDEX referenceparty_currentparty_id_x ON referenceparty (currentparty_id); -- classcontributor -DROP INDEX classcontributor_commclass_id_x ; +DROP INDEX IF EXISTS classcontributor_commclass_id_x ; CREATE INDEX classcontributor_commclass_id_x ON classcontributor (commclass_id); -DROP INDEX classcontributor_party_id_x ; +DROP INDEX IF EXISTS classcontributor_party_id_x ; CREATE INDEX classcontributor_party_id_x ON classcontributor (party_id); -DROP INDEX classcontributor_role_id_x ; +DROP INDEX IF EXISTS classcontributor_role_id_x ; CREATE INDEX classcontributor_role_id_x ON classcontributor (role_id); -- commclass -DROP INDEX commclass_observation_id_x ; +DROP INDEX IF EXISTS commclass_observation_id_x ; CREATE INDEX commclass_observation_id_x ON commclass (observation_id); -DROP INDEX commclass_classpublication_id_x ; +DROP INDEX IF EXISTS commclass_classpublication_id_x ; CREATE INDEX commclass_classpublication_id_x ON commclass (classpublication_id); -- commconcept -DROP INDEX commconcept_commname_id_x ; +DROP INDEX IF EXISTS commconcept_commname_id_x ; CREATE INDEX commconcept_commname_id_x ON commconcept (commname_id); -DROP INDEX commconcept_reference_id_x ; +DROP INDEX IF EXISTS commconcept_reference_id_x ; CREATE INDEX commconcept_reference_id_x ON commconcept (reference_id); -DROP INDEX commconcept_dobscount_x ; +DROP INDEX IF EXISTS commconcept_dobscount_x ; CREATE INDEX commconcept_dobscount_x ON commconcept (d_obscount); -- comminterpretation -DROP INDEX comminterpretation_commclass_id_x ; +DROP INDEX IF EXISTS comminterpretation_commclass_id_x ; CREATE INDEX comminterpretation_commclass_id_x ON comminterpretation (commclass_id); -DROP INDEX comminterpretation_commconcept_id_x ; +DROP INDEX IF EXISTS comminterpretation_commconcept_id_x ; CREATE INDEX comminterpretation_commconcept_id_x ON comminterpretation (commconcept_id); -DROP INDEX comminterpretation_commauthority_id_x ; +DROP INDEX IF EXISTS comminterpretation_commauthority_id_x ; CREATE INDEX comminterpretation_commauthority_id_x ON comminterpretation (commauthority_id); -- coverindex -DROP INDEX coverindex_covermethod_id_x ; +DROP INDEX IF EXISTS coverindex_covermethod_id_x ; CREATE INDEX coverindex_covermethod_id_x ON coverindex (covermethod_id); -- definedvalue -DROP INDEX definedvalue_userdefined_id_x ; +DROP INDEX IF EXISTS definedvalue_userdefined_id_x ; CREATE INDEX definedvalue_userdefined_id_x ON definedvalue (userdefined_id); -- userdefined -- disturbanceobs -DROP INDEX disturbanceobs_observation_id_x ; +DROP INDEX IF EXISTS disturbanceobs_observation_id_x ; CREATE INDEX disturbanceobs_observation_id_x ON disturbanceobs (observation_id); -- graphic -DROP INDEX graphic_observation_id_x ; +DROP INDEX IF EXISTS graphic_observation_id_x ; CREATE INDEX graphic_observation_id_x ON graphic (observation_id); -- notelink -- note -DROP INDEX note_notelink_id_x ; +DROP INDEX IF EXISTS note_notelink_id_x ; CREATE INDEX note_notelink_id_x ON note (notelink_id); -DROP INDEX note_party_id_x ; +DROP INDEX IF EXISTS note_party_id_x ; CREATE INDEX note_party_id_x ON note (party_id); -DROP INDEX note_role_id_x ; +DROP INDEX IF EXISTS note_role_id_x ; CREATE INDEX note_role_id_x ON note (role_id); -- plantlineage -DROP INDEX plantlineage_childplantstatus_id_x ; +DROP INDEX IF EXISTS plantlineage_childplantstatus_id_x ; CREATE INDEX plantlineage_childplantstatus_id_x ON plantlineage (childplantstatus_id); -DROP INDEX plantlineage_parentplantstatus_id_x ; +DROP INDEX IF EXISTS plantlineage_parentplantstatus_id_x ; CREATE INDEX plantlineage_parentplantstatus_id_x ON plantlineage (parentplantstatus_id); -- address -DROP INDEX address_party_id_x ; +DROP INDEX IF EXISTS address_party_id_x ; CREATE INDEX address_party_id_x ON address (party_id); -DROP INDEX address_organization_id_x ; +DROP INDEX IF EXISTS address_organization_id_x ; CREATE INDEX address_organization_id_x ON address (organization_id); -- referencejournal -- referencealtident -DROP INDEX referencealtident_reference_id_x ; +DROP INDEX IF EXISTS referencealtident_reference_id_x ; CREATE INDEX referencealtident_reference_id_x ON referencealtident (reference_id); -- referencecontributor -DROP INDEX referencecontributor_reference_id_x ; +DROP INDEX IF EXISTS referencecontributor_reference_id_x ; CREATE INDEX referencecontributor_reference_id_x ON referencecontributor (reference_id); -DROP INDEX referencecontributor_referenceparty_id_x ; +DROP INDEX IF EXISTS referencecontributor_referenceparty_id_x ; CREATE INDEX referencecontributor_referenceparty_id_x ON referencecontributor (referenceparty_id); -- commcorrelation -DROP INDEX commcorrelation_commstatus_id_x ; +DROP INDEX IF EXISTS commcorrelation_commstatus_id_x ; CREATE INDEX commcorrelation_commstatus_id_x ON commcorrelation (commstatus_id); -DROP INDEX commcorrelation_commconcept_id_x ; +DROP INDEX IF EXISTS commcorrelation_commconcept_id_x ; CREATE INDEX commcorrelation_commconcept_id_x ON commcorrelation (commconcept_id); -- commlineage -DROP INDEX commlineage_parentcommstatus_id_x ; +DROP INDEX IF EXISTS commlineage_parentcommstatus_id_x ; CREATE INDEX commlineage_parentcommstatus_id_x ON commlineage (parentcommstatus_id); -DROP INDEX commlineage_childcommstatus_id_x ; +DROP INDEX IF EXISTS commlineage_childcommstatus_id_x ; CREATE INDEX commlineage_childcommstatus_id_x ON commlineage (childcommstatus_id); -- commname -DROP INDEX commname_reference_id_x ; +DROP INDEX IF EXISTS commname_reference_id_x ; CREATE INDEX commname_reference_id_x ON commname (reference_id); -- commusage -DROP INDEX commusage_commname_id_x ; +DROP INDEX IF EXISTS commusage_commname_id_x ; CREATE INDEX commusage_commname_id_x ON commusage (commname_id); -DROP INDEX commusage_commconcept_id_x ; +DROP INDEX IF EXISTS commusage_commconcept_id_x ; CREATE INDEX commusage_commconcept_id_x ON commusage (commconcept_id); -DROP INDEX commusage_party_id_x ; +DROP INDEX IF EXISTS commusage_party_id_x ; CREATE INDEX commusage_party_id_x ON commusage (party_id); -DROP INDEX commusage_commstatus_id_x ; +DROP INDEX IF EXISTS commusage_commstatus_id_x ; CREATE INDEX commusage_commstatus_id_x ON commusage (commstatus_id); -DROP INDEX commusage_commname_x ; +DROP INDEX IF EXISTS commusage_commname_x ; CREATE INDEX commusage_commname_x on commusage ( commname ); -- t -DROP INDEX commusage_classsystem_x ; +DROP INDEX IF EXISTS commusage_classsystem_x ; CREATE INDEX commusage_classsystem_x on commusage ( classsystem ); -- t -- commstatus -DROP INDEX commstatus_commconcept_id_x ; +DROP INDEX IF EXISTS commstatus_commconcept_id_x ; CREATE INDEX commstatus_commconcept_id_x ON commstatus (commconcept_id); -DROP INDEX commstatus_reference_id_x ; +DROP INDEX IF EXISTS commstatus_reference_id_x ; CREATE INDEX commstatus_reference_id_x ON commstatus (reference_id); -DROP INDEX commstatus_commparent_id_x ; +DROP INDEX IF EXISTS commstatus_commparent_id_x ; CREATE INDEX commstatus_commparent_id_x ON commstatus (commparent_id); -DROP INDEX commstatus_party_id_x ; +DROP INDEX IF EXISTS commstatus_party_id_x ; CREATE INDEX commstatus_party_id_x ON commstatus (party_id); -DROP INDEX commstatus_commlevel_x ; +DROP INDEX IF EXISTS commstatus_commlevel_x ; CREATE INDEX commstatus_commlevel_x ON commstatus (commlevel); -- t -- plantcorrelation -DROP INDEX plantcorrelation_plantstatus_id_x ; +DROP INDEX IF EXISTS plantcorrelation_plantstatus_id_x ; CREATE INDEX plantcorrelation_plantstatus_id_x ON plantcorrelation (plantstatus_id); -DROP INDEX plantcorrelation_plantconcept_id_x ; +DROP INDEX IF EXISTS plantcorrelation_plantconcept_id_x ; CREATE INDEX plantcorrelation_plantconcept_id_x ON plantcorrelation (plantconcept_id); -- keywords -DROP INDEX keywords_table_id_entity_key ; +DROP INDEX IF EXISTS keywords_table_id_entity_key ; CREATE INDEX keywords_table_id_entity_key ON keywords (table_id,entity); --embargo denorm fields -DROP INDEX emb_classContributor_idx ; +DROP INDEX IF EXISTS emb_classContributor_idx ; CREATE INDEX emb_classContributor_idx ON classContributor (emb_classContributor); -DROP INDEX emb_commClass_idx ; +DROP INDEX IF EXISTS emb_commClass_idx ; CREATE INDEX emb_commClass_idx ON commClass (emb_commClass); -DROP INDEX emb_commInterpretation_idx ; +DROP INDEX IF EXISTS emb_commInterpretation_idx ; CREATE INDEX emb_commInterpretation_idx ON commInterpretation (emb_commInterpretation); -DROP INDEX emb_disturbanceObs_idx ; +DROP INDEX IF EXISTS emb_disturbanceObs_idx ; CREATE INDEX emb_disturbanceObs_idx ON disturbanceObs (emb_disturbanceObs); -DROP INDEX emb_observation_idx ; +DROP INDEX IF EXISTS emb_observation_idx ; CREATE INDEX emb_observation_idx ON observation (emb_observation); -DROP INDEX emb_plot_idx ; +DROP INDEX IF EXISTS emb_plot_idx ; CREATE INDEX emb_plot_idx ON plot (emb_plot); -DROP INDEX emb_soilObs_idx ; +DROP INDEX IF EXISTS emb_soilObs_idx ; CREATE INDEX emb_soilObs_idx ON soilObs (emb_soilObs); -DROP INDEX emb_stemCount_idx ; +DROP INDEX IF EXISTS emb_stemCount_idx ; CREATE INDEX emb_stemCount_idx ON stemCount (emb_stemCount); -DROP INDEX emb_stemLocation_idx ; +DROP INDEX IF EXISTS emb_stemLocation_idx ; CREATE INDEX emb_stemLocation_idx ON stemLocation (emb_stemLocation); -DROP INDEX emb_taxonAlt_idx ; +DROP INDEX IF EXISTS emb_taxonAlt_idx ; CREATE INDEX emb_taxonAlt_idx ON taxonAlt (emb_taxonAlt); -DROP INDEX emb_taxonImportance_idx ; +DROP INDEX IF EXISTS emb_taxonImportance_idx ; CREATE INDEX emb_taxonImportance_idx ON taxonImportance (emb_taxonImportance); -DROP INDEX emb_taxonInterpretation_idx ; +DROP INDEX IF EXISTS emb_taxonInterpretation_idx ; CREATE INDEX emb_taxonInterpretation_idx ON taxonInterpretation (emb_taxonInterpretation); -DROP INDEX emb_taxonObservation_idx ; +DROP INDEX IF EXISTS emb_taxonObservation_idx ; CREATE INDEX emb_taxonObservation_idx ON taxonObservation (emb_taxonObservation); --taxonobservation ID fields: -DROP INDEX taxonobservation_int_origPlantConcept_ID_x ; +DROP INDEX IF EXISTS taxonobservation_int_origPlantConcept_ID_x ; CREATE INDEX taxonobservation_int_origPlantConcept_ID_x on taxonobservation ( int_origPlantConcept_ID ); -DROP INDEX taxonobservation_int_currPlantConcept_ID_x ; +DROP INDEX IF EXISTS taxonobservation_int_currPlantConcept_ID_x ; CREATE INDEX taxonobservation_int_currPlantConcept_ID_x on taxonobservation ( int_currPlantConcept_ID ); --accessionCode indices: -- non unique (reference accession codes) -drop index userDatasetItem_accessioncode_index; +DROP INDEX IF EXISTS userDatasetItem_accessioncode_index; create index userDatasetItem_accessioncode_index on userDatasetItem (itemAccessionCode); -drop index userDatasetItem2_accessioncode_index; +DROP INDEX IF EXISTS userDatasetItem2_accessioncode_index; create index userDatasetItem2_accessioncode_index on userDatasetItem (externalAccessionCode); --unique indexes: -drop index reference_accessioncode_index; +DROP INDEX IF EXISTS reference_accessioncode_index; create unique index reference_accessioncode_index on reference (accessionCode); -drop index referenceParty_accessioncode_index; +DROP INDEX IF EXISTS referenceParty_accessioncode_index; create unique index referenceParty_accessioncode_index on referenceParty (accessionCode); -drop index referenceJournal_accessioncode_index; +DROP INDEX IF EXISTS referenceJournal_accessioncode_index; create unique index referenceJournal_accessioncode_index on referenceJournal (accessionCode); -drop index commclass_accessioncode_index; +DROP INDEX IF EXISTS commclass_accessioncode_index; create unique index commclass_accessioncode_index on commClass (accessionCode); -drop index coverMethod_accessioncode_index; +DROP INDEX IF EXISTS coverMethod_accessioncode_index; create unique index coverMethod_accessioncode_index on coverMethod (accessionCode); -drop index namedPlace_accessioncode_index; +DROP INDEX IF EXISTS namedPlace_accessioncode_index; create unique index namedPlace_accessioncode_index on namedPlace (accessionCode); -drop index observation_accessioncode_index; +DROP INDEX IF EXISTS observation_accessioncode_index; create unique index observation_accessioncode_index on observation (accessionCode); -drop index party_accessioncode_index; +DROP INDEX IF EXISTS party_accessioncode_index; create unique index party_accessioncode_index on party (accessionCode); -drop index plot_accessioncode_index; +DROP INDEX IF EXISTS plot_accessioncode_index; create unique index plot_accessioncode_index on plot (accessionCode); -drop index project_accessioncode_index; +DROP INDEX IF EXISTS project_accessioncode_index; create unique index project_accessioncode_index on project (accessionCode); -drop index soilTaxon_accessioncode_index; +DROP INDEX IF EXISTS soilTaxon_accessioncode_index; create unique index soilTaxon_accessioncode_index on soilTaxon (accessionCode); -drop index stratumMethod_accessioncode_index; +DROP INDEX IF EXISTS stratumMethod_accessioncode_index; create unique index stratumMethod_accessioncode_index on stratumMethod (accessionCode); -drop index taxonObservation_accessioncode_index; +DROP INDEX IF EXISTS taxonObservation_accessioncode_index; create unique index taxonObservation_accessioncode_index on taxonObservation (accessionCode); -drop index userDefined_accessioncode_index; +DROP INDEX IF EXISTS userDefined_accessioncode_index; create unique index userDefined_accessioncode_index on userDefined (accessioncode); -drop index userDataset_accessioncode_index; +DROP INDEX IF EXISTS userDataset_accessioncode_index; create unique index userDataset_accessioncode_index on userDataset (accessioncode); -drop index userQuery_accessioncode_index; +DROP INDEX IF EXISTS userQuery_accessioncode_index; create unique index userQuery_accessioncode_index on userQuery (accessioncode); -drop index commConcept_accessioncode_index; +DROP INDEX IF EXISTS commConcept_accessioncode_index; create unique index commConcept_accessioncode_index on commConcept (accessioncode); -drop index plantConcept_accessioncode_index; +DROP INDEX IF EXISTS plantConcept_accessioncode_index; create unique index plantConcept_accessioncode_index on plantConcept (accessioncode); -drop index aux_Role_accessioncode_index; +DROP INDEX IF EXISTS aux_Role_accessioncode_index; create unique index aux_Role_accessioncode_index on aux_Role (accessioncode); -drop index taxonInterpretation_accessioncode_index; +DROP INDEX IF EXISTS taxonInterpretation_accessioncode_index; create unique index taxonInterpretation_accessioncode_index on taxonInterpretation (accessioncode); -drop index observationSynonym_accessioncode_index; +DROP INDEX IF EXISTS observationSynonym_accessioncode_index; create unique index observationSynonym_accessioncode_index on observationSynonym (accessioncode); -drop index observation_accessioncode_index; +DROP INDEX IF EXISTS observation_accessioncode_index; create unique index observation_accessioncode_index on observation (accessioncode); -drop index note_accessioncode_index; +DROP INDEX IF EXISTS note_accessioncode_index; create unique index note_accessioncode_index on note (accessioncode); -drop index graphic_accessioncode_index; +DROP INDEX IF EXISTS graphic_accessioncode_index; create unique index graphic_accessioncode_index on graphic (accessioncode); -drop index plantStatus_accessioncode_index; +DROP INDEX IF EXISTS plantStatus_accessioncode_index; create unique index plantStatus_accessioncode_index on plantStatus (accessioncode); -drop index commStatus_accessioncode_index; +DROP INDEX IF EXISTS commStatus_accessioncode_index; create unique index commStatus_accessioncode_index on commStatus (accessioncode); From 9db046c0509acf9f7a5aa2daaf990bf8a2956d77 Mon Sep 17 00:00:00 2001 From: Dou Mok Date: Wed, 7 Aug 2024 13:13:51 -0700 Subject: [PATCH 15/49] Rename some migration files for consistency --- ...late-datadictionary.sql => V1.10__populate_datadictionary.sql} | 0 migrations/{V1.3__createIndices.sql => V1.3__create_indices.sql} | 0 2 files changed, 0 insertions(+), 0 deletions(-) rename migrations/{V1.10__populate-datadictionary.sql => V1.10__populate_datadictionary.sql} (100%) rename migrations/{V1.3__createIndices.sql => V1.3__create_indices.sql} (100%) diff --git a/migrations/V1.10__populate-datadictionary.sql b/migrations/V1.10__populate_datadictionary.sql similarity index 100% rename from migrations/V1.10__populate-datadictionary.sql rename to migrations/V1.10__populate_datadictionary.sql diff --git a/migrations/V1.3__createIndices.sql b/migrations/V1.3__create_indices.sql similarity index 100% rename from migrations/V1.3__createIndices.sql rename to migrations/V1.3__create_indices.sql From 6d5ded248ab48920ec815982b3ef8f6e6a17a083 Mon Sep 17 00:00:00 2001 From: Dou Mok Date: Wed, 7 Aug 2024 13:16:22 -0700 Subject: [PATCH 16/49] Fix exception causing migration to fail in V1.4__drop... file by adding 'IF EXISTS' to 'DROP VIEW' --- migrations/V1.4__drop_vegbank_views.sql | 206 ++++++++++++------------ 1 file changed, 103 insertions(+), 103 deletions(-) diff --git a/migrations/V1.4__drop_vegbank_views.sql b/migrations/V1.4__drop_vegbank_views.sql index 949561e..1c33af6 100644 --- a/migrations/V1.4__drop_vegbank_views.sql +++ b/migrations/V1.4__drop_vegbank_views.sql @@ -1,104 +1,104 @@ -drop view view_busRule_plotsizeshape; -DROP view view_busRule_duplStratumType; -DROP view view_busRule_duplcovercode; - -drop view view_emb_embargo_complete; -drop view view_emb_embargo_currentfullonly; - - -drop view view_export_classcontributor; -drop view view_export_commclass; -drop view view_export_comminterpretation; -drop view view_export_disturbanceobs; -drop view view_export_observation; -drop view view_export_observationcontributor; -drop view view_export_plot; -drop view view_export_plot_pre; -drop view view_export_soilobs; -drop view view_export_stemcount; -drop view view_export_stemlocation; -drop view view_export_taxonalt; -drop view view_export_taxonimportance; -drop view view_export_taxoninterpretation; -drop view view_export_taxonobservation; - - -DROP VIEW view_dbafielddesc_notimpl; -DROP VIEW view_plotall_withembargo; - -DROP VIEW view_taxonobs_distinctid_curr_counts_plants; - -DROP VIEW view_taxonobs_distinctid_curr_counts; -DROP VIEW view_taxonobs_distinctid_curr; ---DROP VIEW view_taxonobs_distinctid_orig; - - -DROP VIEW view_taxonobs_withmaxcover; -DROP VIEW view_csv_taxonimportance; -DROP VIEW view_csv_taxonimportance_pre; -DROP VIEW view_browseparty_all_count_combined; - -DROP VIEW view_browseparty_classcontrib_count; -DROP VIEW view_browseparty_obscontrib_count; -DROP VIEW view_browseparty_projectcontrib_count; - -DROP VIEW view_browseparty_all_count; -DROP VIEW view_browseparty_all; -DROP VIEW view_browseparty_obscontrib; -DROP VIEW view_browseparty_classcontrib; -DROP VIEW view_browseparty_projectcontrib; - -DROP VIEW view_comminterp_more; -DROP VIEW view_taxoninterp_more; -DROP VIEW view_observation_transl; - - -DROP VIEW view_notemb_classContributor; -DROP VIEW view_notemb_commInterpretation; -DROP VIEW view_notemb_commClass; - -DROP VIEW view_notemb_disturbanceObs; -DROP VIEW view_notemb_soilObs; -DROP VIEW view_notemb_stemCount; -DROP VIEW view_notemb_stemLocation; -DROP VIEW view_notemb_taxonAlt; -DROP VIEW view_notemb_taxonImportance; -DROP VIEW view_notemb_taxonInterpretation; -DROP VIEW view_notemb_taxonObservation; -DROP VIEW view_notemb_observation; -DROP VIEW view_notemb_observationcontributor; -DROP VIEW view_notemb_plot; - - -DROP VIEW view_plantconcept_transl; -DROP VIEW view_commconcept_transl; -DROP VIEW view_reference_transl ; -DROP VIEW view_party_transl ; -drop view view_party_public; - -DROP VIEW view_keywProjPlaces ; -DROP VIEW view_kwhelper_projcontrib; -DROP VIEW view_kwhelper_refparty; -DROP VIEW view_kwhelper_refjournal; - - - - DROP VIEW view_all_commnames_code; - DROP VIEW view_all_commnames_sciname; - DROP VIEW view_all_commnames_translated; - DROP VIEW view_all_commnames_common; - - DROP VIEW view_std_commnames_code; - DROP VIEW view_std_commnames_sciname; - DROP VIEW view_std_commnames_translated; - DROP VIEW view_std_commnames_common; - -drop view view_all_plantnames_code; -drop view view_all_plantnames_common ; -drop view view_all_plantnames_sciname ; -drop view view_all_plantnames_scinamenoauth; -drop view view_std_plantnames_code ; -drop view view_std_plantnames_common ; -drop view view_std_plantnames_sciname ; -drop view view_std_plantnames_scinamenoauth; +DROP VIEW IF EXISTS view_busRule_plotsizeshape; +DROP VIEW IF EXISTS view_busRule_duplStratumType; +DROP VIEW IF EXISTS view_busRule_duplcovercode; + +DROP VIEW IF EXISTS view_emb_embargo_complete; +DROP VIEW IF EXISTS view_emb_embargo_currentfullonly; + + +DROP VIEW IF EXISTS view_export_classcontributor; +DROP VIEW IF EXISTS view_export_commclass; +DROP VIEW IF EXISTS view_export_comminterpretation; +DROP VIEW IF EXISTS view_export_disturbanceobs; +DROP VIEW IF EXISTS view_export_observation; +DROP VIEW IF EXISTS view_export_observationcontributor; +DROP VIEW IF EXISTS view_export_plot; +DROP VIEW IF EXISTS view_export_plot_pre; +DROP VIEW IF EXISTS view_export_soilobs; +DROP VIEW IF EXISTS view_export_stemcount; +DROP VIEW IF EXISTS view_export_stemlocation; +DROP VIEW IF EXISTS view_export_taxonalt; +DROP VIEW IF EXISTS view_export_taxonimportance; +DROP VIEW IF EXISTS view_export_taxoninterpretation; +DROP VIEW IF EXISTS view_export_taxonobservation; + + +DROP VIEW IF EXISTS view_dbafielddesc_notimpl; +DROP VIEW IF EXISTS view_plotall_withembargo; + +DROP VIEW IF EXISTS view_taxonobs_distinctid_curr_counts_plants; + +DROP VIEW IF EXISTS view_taxonobs_distinctid_curr_counts; +DROP VIEW IF EXISTS view_taxonobs_distinctid_curr; +--DROP VIEW IF EXISTS view_taxonobs_distinctid_orig; + + +DROP VIEW IF EXISTS view_taxonobs_withmaxcover; +DROP VIEW IF EXISTS view_csv_taxonimportance; +DROP VIEW IF EXISTS view_csv_taxonimportance_pre; +DROP VIEW IF EXISTS view_browseparty_all_count_combined; + +DROP VIEW IF EXISTS view_browseparty_classcontrib_count; +DROP VIEW IF EXISTS view_browseparty_obscontrib_count; +DROP VIEW IF EXISTS view_browseparty_projectcontrib_count; + +DROP VIEW IF EXISTS view_browseparty_all_count; +DROP VIEW IF EXISTS view_browseparty_all; +DROP VIEW IF EXISTS view_browseparty_obscontrib; +DROP VIEW IF EXISTS view_browseparty_classcontrib; +DROP VIEW IF EXISTS view_browseparty_projectcontrib; + +DROP VIEW IF EXISTS view_comminterp_more; +DROP VIEW IF EXISTS view_taxoninterp_more; +DROP VIEW IF EXISTS view_observation_transl; + + +DROP VIEW IF EXISTS view_notemb_classContributor; +DROP VIEW IF EXISTS view_notemb_commInterpretation; +DROP VIEW IF EXISTS view_notemb_commClass; + +DROP VIEW IF EXISTS view_notemb_disturbanceObs; +DROP VIEW IF EXISTS view_notemb_soilObs; +DROP VIEW IF EXISTS view_notemb_stemCount; +DROP VIEW IF EXISTS view_notemb_stemLocation; +DROP VIEW IF EXISTS view_notemb_taxonAlt; +DROP VIEW IF EXISTS view_notemb_taxonImportance; +DROP VIEW IF EXISTS view_notemb_taxonInterpretation; +DROP VIEW IF EXISTS view_notemb_taxonObservation; +DROP VIEW IF EXISTS view_notemb_observation; +DROP VIEW IF EXISTS view_notemb_observationcontributor; +DROP VIEW IF EXISTS view_notemb_plot; + + +DROP VIEW IF EXISTS view_plantconcept_transl; +DROP VIEW IF EXISTS view_commconcept_transl; +DROP VIEW IF EXISTS view_reference_transl ; +DROP VIEW IF EXISTS view_party_transl ; +DROP VIEW IF EXISTS view_party_public; + +DROP VIEW IF EXISTS view_keywProjPlaces ; +DROP VIEW IF EXISTS view_kwhelper_projcontrib; +DROP VIEW IF EXISTS view_kwhelper_refparty; +DROP VIEW IF EXISTS view_kwhelper_refjournal; + + + + DROP VIEW IF EXISTS view_all_commnames_code; + DROP VIEW IF EXISTS view_all_commnames_sciname; + DROP VIEW IF EXISTS view_all_commnames_translated; + DROP VIEW IF EXISTS view_all_commnames_common; + + DROP VIEW IF EXISTS view_std_commnames_code; + DROP VIEW IF EXISTS view_std_commnames_sciname; + DROP VIEW IF EXISTS view_std_commnames_translated; + DROP VIEW IF EXISTS view_std_commnames_common; + +DROP VIEW IF EXISTS view_all_plantnames_code; +DROP VIEW IF EXISTS view_all_plantnames_common ; +DROP VIEW IF EXISTS view_all_plantnames_sciname ; +DROP VIEW IF EXISTS view_all_plantnames_scinamenoauth; +DROP VIEW IF EXISTS view_std_plantnames_code ; +DROP VIEW IF EXISTS view_std_plantnames_common ; +DROP VIEW IF EXISTS view_std_plantnames_sciname ; +DROP VIEW IF EXISTS view_std_plantnames_scinamenoauth; From 6bb395a3a1e487b4d48f1b25d24711d7cf73b70a Mon Sep 17 00:00:00 2001 From: Dou Mok Date: Wed, 7 Aug 2024 13:19:47 -0700 Subject: [PATCH 17/49] Update INSTALL.md with additional context to manual changes to migration sql files --- sql-transformations/INSTALL.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sql-transformations/INSTALL.md b/sql-transformations/INSTALL.md index d8b50e8..13a108b 100644 --- a/sql-transformations/INSTALL.md +++ b/sql-transformations/INSTALL.md @@ -99,6 +99,8 @@ When reviewing Vegbank's 'db_model_vegbank.xml', there appears to be specific up The other migration sqls (Steps 1 to 8) were obtained by following the 'build.xml' structure in the [Vegbank repo](https://github.com/NCEAS/vegbank/). +Note - the migration files have been renamed for consistency. There also exists SQL code within these files that cause a flyway migration failure - so these files have been amended accordingly (ex. DROP VIEW -> DROP VIEW IF EXISTS) + ## Step 3: Populating the Data Dictionary To help devs better understand the database's structure, we then need to populate the data dictionary. From a88f462eb6ea9eb8bd9e1aa9d804f4842e958e98 Mon Sep 17 00:00:00 2001 From: Dou Mok Date: Thu, 8 Aug 2024 08:59:35 -0700 Subject: [PATCH 18/49] Fix exception causing migration to vail in V1.5__create... by adding 'IF EXISTS' to 'DROP VIEW' --- migrations/V1.5__create_vegbank_views.sql | 52 +++++++++++------------ 1 file changed, 26 insertions(+), 26 deletions(-) diff --git a/migrations/V1.5__create_vegbank_views.sql b/migrations/V1.5__create_vegbank_views.sql index 97ee832..bf096bd 100644 --- a/migrations/V1.5__create_vegbank_views.sql +++ b/migrations/V1.5__create_vegbank_views.sql @@ -11,7 +11,7 @@ CREATE VIEW view_party_public AS ; -drop view view_busRule_plotsizeshape; +DROP VIEW IF EXISTS view_busRule_plotsizeshape; CREATE VIEW view_busRule_plotsizeshape AS SELECT (project_id), (select projectName from project where project.project_ID=observation.projecT_ID) as projectName, @@ -20,17 +20,17 @@ CREATE VIEW view_busRule_plotsizeshape AS where ((area is null) and (shape is null or (((shape)<>'Plotless') and (upper(shape) not like 'RELEV%')))) group by project_ID; -DROP view view_busRule_duplStratumType; +DROP VIEW IF EXISTS view_busRule_duplStratumType; CREATE VIEW view_busRule_duplStratumType AS SELECT count(1), stratummethod_id, stratumindex FROM stratumType GROUP BY stratummethod_id, stratumindex HAVING count(1) > 1; -DROP view view_busRule_duplcovercode; +DROP VIEW IF EXISTS view_busRule_duplcovercode; CREATE VIEW view_busRule_duplcovercode AS SELECT count(1), covermethod_id, covercode FROM coverIndex GROUP BY covermethod_id, covercode HAVING count(1) > 1; -- EMBARGO views -drop view view_emb_embargo_complete; -drop view view_emb_embargo_currentfullonly; +DROP VIEW IF EXISTS view_emb_embargo_complete; +DROP VIEW IF EXISTS view_emb_embargo_currentfullonly; CREATE VIEW view_emb_embargo_currentfullonly AS SELECT * FROM embargo WHERE (((defaultStatus)=6) AND ((embargoStart)Now())); @@ -213,79 +213,79 @@ CREATE view view_csv_taxonimportance AS -- the following views create "standard" names for plantconcepts, based on usages of preferred party and classsystems: - DROP VIEW view_std_plantnames_code; + DROP VIEW IF EXISTS view_std_plantnames_code; CREATE VIEW view_std_plantnames_code AS SELECT plantconcept_id, plantname FROM plantusage WHERE classsystem = 'Code' AND party_id = (SELECT party_id FROM party WHERE accessioncode='VB.Py.511.USDANRCSPLANTS2') AND usagestop IS NULL; - DROP VIEW view_std_plantnames_sciname; + DROP VIEW IF EXISTS view_std_plantnames_sciname; CREATE VIEW view_std_plantnames_sciname AS SELECT plantconcept_id, plantname FROM plantusage WHERE classsystem = 'Scientific' AND party_id = (SELECT party_id FROM party WHERE accessioncode='VB.Py.511.USDANRCSPLANTS2') AND usagestop IS NULL; - DROP VIEW view_std_plantnames_scinamenoauth; + DROP VIEW IF EXISTS view_std_plantnames_scinamenoauth; CREATE VIEW view_std_plantnames_scinamenoauth AS SELECT plantconcept_id, plantname FROM plantusage WHERE classsystem = 'Scientific without authors' AND party_id = (SELECT party_id FROM party WHERE accessioncode='VB.Py.511.USDANRCSPLANTS2') AND usagestop IS NULL; - DROP VIEW view_std_plantnames_common; + DROP VIEW IF EXISTS view_std_plantnames_common; CREATE VIEW view_std_plantnames_common AS SELECT plantconcept_id, plantname FROM plantusage WHERE classsystem = 'English Common' AND party_id = (SELECT party_id FROM party WHERE accessioncode='VB.Py.511.USDANRCSPLANTS2') AND usagestop IS NULL; --the following views are same as above, but not party specific, to catch "other concepts": - DROP VIEW view_all_plantnames_code; + DROP VIEW IF EXISTS view_all_plantnames_code; CREATE VIEW view_all_plantnames_code AS SELECT plantconcept_id, plantname FROM plantusage WHERE classsystem = 'Code' ; - DROP VIEW view_all_plantnames_sciname; + DROP VIEW IF EXISTS view_all_plantnames_sciname; CREATE VIEW view_all_plantnames_sciname AS SELECT plantconcept_id, plantname FROM plantusage WHERE classsystem = 'Scientific' ; - DROP VIEW view_all_plantnames_scinamenoauth; + DROP VIEW IF EXISTS view_all_plantnames_scinamenoauth; CREATE VIEW view_all_plantnames_scinamenoauth AS SELECT plantconcept_id, plantname FROM plantusage WHERE classsystem = 'Scientific without authors' ; - DROP VIEW view_all_plantnames_common; + DROP VIEW IF EXISTS view_all_plantnames_common; CREATE VIEW view_all_plantnames_common AS SELECT plantconcept_id, plantname FROM plantusage WHERE classsystem = 'English Common' ; -- the following views create "standard" names for commconcepts, based on usages of preferred party and classsystems: - DROP VIEW view_std_commnames_code; + DROP VIEW IF EXISTS view_std_commnames_code; CREATE VIEW view_std_commnames_code AS SELECT commconcept_id, commname FROM commusage WHERE classsystem = 'Code' AND party_id = (SELECT party_id FROM party WHERE accessioncode='VB.Py.512.NATURESERVE') AND usagestop IS NULL; - DROP VIEW view_std_commnames_sciname; + DROP VIEW IF EXISTS view_std_commnames_sciname; CREATE VIEW view_std_commnames_sciname AS SELECT commconcept_id, commname FROM commusage WHERE classsystem = 'Scientific' AND party_id = (SELECT party_id FROM party WHERE accessioncode='VB.Py.512.NATURESERVE') AND usagestop IS NULL; - DROP VIEW view_std_commnames_translated; + DROP VIEW IF EXISTS view_std_commnames_translated; CREATE VIEW view_std_commnames_translated AS SELECT commconcept_id, commname FROM commusage WHERE classsystem = 'Translated' AND party_id = (SELECT party_id FROM party WHERE accessioncode='VB.Py.512.NATURESERVE') AND usagestop IS NULL; - DROP VIEW view_std_commnames_common; + DROP VIEW IF EXISTS view_std_commnames_common; CREATE VIEW view_std_commnames_common AS SELECT commconcept_id, commname FROM commusage WHERE classsystem = 'Common' AND party_id = (SELECT party_id FROM party WHERE accessioncode='VB.Py.512.NATURESERVE') AND usagestop IS NULL; - DROP VIEW view_all_commnames_code; + DROP VIEW IF EXISTS view_all_commnames_code; CREATE VIEW view_all_commnames_code AS SELECT commconcept_id, commname FROM commusage WHERE classsystem = 'Code' ; - DROP VIEW view_all_commnames_sciname; + DROP VIEW IF EXISTS view_all_commnames_sciname; CREATE VIEW view_all_commnames_sciname AS SELECT commconcept_id, commname FROM commusage WHERE classsystem = 'Scientific' ; - DROP VIEW view_all_commnames_translated; + DROP VIEW IF EXISTS view_all_commnames_translated; CREATE VIEW view_all_commnames_translated AS SELECT commconcept_id, commname FROM commusage WHERE classsystem = 'Translated' ; - DROP VIEW view_all_commnames_common; + DROP VIEW IF EXISTS view_all_commnames_common; CREATE VIEW view_all_commnames_common AS SELECT commconcept_id, commname FROM commusage WHERE classsystem = 'Common' ; @@ -324,27 +324,27 @@ CREATE VIEW view_observation_transl AS -- CREATE VIEW view_taxonobs_distinctid_curr AS SELECT observation_id, int_currplantconcept_id as plantconcept_id, max(cover) as maxplantcover FROM view_notEmb_taxonObservation as taxonobservation, taxonimportance where taxonimportance.taxonobservation_id=taxonobservation.taxonobservation_id GROUP BY plantconcept_id,observation_id; -- this view needed in the event there are no taxonimportance records for a taxonobservation. --- drop view view_taxonobs_withmaxcover; +-- DROP VIEW IF EXISTS view_taxonobs_withmaxcover; CREATE VIEW view_taxonobs_withmaxcover AS SELECT taxonobservation.*, (select max(cover) from taxonimportance where taxonimportance.taxonobservation_ID=taxonobservation.taxonobservation_ID) as maxcover FROM view_notEmb_taxonObservation as taxonobservation; --- drop view view_taxonobs_distinctid_curr; +-- DROP VIEW IF EXISTS view_taxonobs_distinctid_curr; CREATE VIEW view_taxonobs_distinctid_curr AS SELECT userdataset_id, observation_id, int_currplantconcept_id as plantconcept_id, max(maxcover) as maxplantcover FROM view_taxonobs_withmaxcover as taxonobservation, userdatasetitem WHERE observation_id = itemrecord AND itemtable='observation' GROUP BY plantconcept_id,userdataset_id,observation_id; --- drop view view_taxonobs_distinctid_curr_counts; +-- DROP VIEW IF EXISTS view_taxonobs_distinctid_curr_counts; CREATE VIEW view_taxonobs_distinctid_curr_counts AS SELECT userdataset_id, plantconcept_id, count(1) AS countObs, avg(maxplantcover) AS avgcovernoround, min(maxplantcover) AS mincovernoround, max(maxplantcover) AS maxcovernoround FROM view_taxonobs_distinctid_curr GROUP BY userdataset_id, plantconcept_id; --- drop view view_taxonobs_distinctid_curr_counts_plants; +-- DROP VIEW IF EXISTS view_taxonobs_distinctid_curr_counts_plants; CREATE VIEW view_taxonobs_distinctid_curr_counts_plants AS SELECT view_taxonobs_distinctid_curr_counts.*, round(CAST (view_taxonobs_distinctid_curr_counts.avgcovernoround as numeric),3) AS avgcover, round(CAST (view_taxonobs_distinctid_curr_counts.mincovernoround as numeric),3) AS mincover, @@ -352,7 +352,7 @@ CREATE VIEW view_taxonobs_distinctid_curr_counts_plants AS temptbl_std_plantnames.plantname, temptbl_std_plantnames.sciname, temptbl_std_plantnames.scinamenoauth, temptbl_std_plantnames.code,temptbl_std_plantnames.common FROM temptbl_std_plantnames, view_taxonobs_distinctid_curr_counts WHERE view_taxonobs_distinctid_curr_counts.plantconcept_ID=temptbl_std_plantnames.plantconcept_ID; ---DROP VIEW view_plotall_withembargo; +--DROP VIEW IF EXISTS view_plotall_withembargo; CREATE VIEW view_plotall_withembargo AS SELECT plot.*, embargo_id, embargoreason,defaultstatus,embargostart,embargostop, (defaultstatus + CASE WHEN embargostop Date: Thu, 8 Aug 2024 09:30:53 -0700 Subject: [PATCH 19/49] Add new migration file step to drop views before re-creating them, and update migrations versioning in file names --- ..._user.sql => V1.10__create_admin_user.sql} | 0 ...sql => V1.11__populate_datadictionary.sql} | 0 migrations/V1.8__drop_vegbank_views.sql | 106 ++++++++++++++++++ ...ews.sql => V1.9__create_vegbank_views.sql} | 54 +++++---- 4 files changed, 132 insertions(+), 28 deletions(-) rename migrations/{V1.9__create_admin_user.sql => V1.10__create_admin_user.sql} (100%) rename migrations/{V1.10__populate_datadictionary.sql => V1.11__populate_datadictionary.sql} (100%) create mode 100644 migrations/V1.8__drop_vegbank_views.sql rename migrations/{V1.8__create_vegbank_views.sql => V1.9__create_vegbank_views.sql} (94%) diff --git a/migrations/V1.9__create_admin_user.sql b/migrations/V1.10__create_admin_user.sql similarity index 100% rename from migrations/V1.9__create_admin_user.sql rename to migrations/V1.10__create_admin_user.sql diff --git a/migrations/V1.10__populate_datadictionary.sql b/migrations/V1.11__populate_datadictionary.sql similarity index 100% rename from migrations/V1.10__populate_datadictionary.sql rename to migrations/V1.11__populate_datadictionary.sql diff --git a/migrations/V1.8__drop_vegbank_views.sql b/migrations/V1.8__drop_vegbank_views.sql new file mode 100644 index 0000000..c35b59d --- /dev/null +++ b/migrations/V1.8__drop_vegbank_views.sql @@ -0,0 +1,106 @@ +DROP VIEW IF EXISTS view_busRule_plotsizeshape; +DROP VIEW IF EXISTS view_busRule_duplStratumType; +DROP VIEW IF EXISTS view_busRule_duplcovercode; + +DROP VIEW IF EXISTS view_emb_embargo_complete; +DROP VIEW IF EXISTS view_emb_embargo_currentfullonly; + + +DROP VIEW IF EXISTS view_export_classcontributor; +DROP VIEW IF EXISTS view_export_commclass; +DROP VIEW IF EXISTS view_export_comminterpretation; +DROP VIEW IF EXISTS view_export_disturbanceobs; +DROP VIEW IF EXISTS view_export_observation; +DROP VIEW IF EXISTS view_export_observationcontributor; +DROP VIEW IF EXISTS view_export_plot; +DROP VIEW IF EXISTS view_export_plot_pre; +DROP VIEW IF EXISTS view_export_soilobs; +DROP VIEW IF EXISTS view_export_stemcount; +DROP VIEW IF EXISTS view_export_stemlocation; +DROP VIEW IF EXISTS view_export_taxonalt; +DROP VIEW IF EXISTS view_export_taxonimportance; +DROP VIEW IF EXISTS view_export_taxoninterpretation; +DROP VIEW IF EXISTS view_export_taxonobservation; + + +DROP VIEW IF EXISTS view_dbafielddesc_notimpl; +DROP VIEW IF EXISTS view_plotall_withembargo; + +DROP VIEW IF EXISTS view_taxonobs_distinctid_curr_counts_plants; + +DROP VIEW IF EXISTS view_taxonobs_distinctid_curr_counts; +DROP VIEW IF EXISTS view_taxonobs_distinctid_curr; +--DROP VIEW IF EXISTS view_taxonobs_distinctid_orig; + + +DROP VIEW IF EXISTS view_taxonobs_withmaxcover; +DROP VIEW IF EXISTS view_csv_taxonimportance; +DROP VIEW IF EXISTS view_csv_taxonimportance_pre; +DROP VIEW IF EXISTS view_browseparty_all_count_combined; + +DROP VIEW IF EXISTS view_browseparty_classcontrib_count; +DROP VIEW IF EXISTS view_browseparty_obscontrib_count; +DROP VIEW IF EXISTS view_browseparty_projectcontrib_count; + +DROP VIEW IF EXISTS view_browseparty_all_count; +DROP VIEW IF EXISTS view_browseparty_all; +DROP VIEW IF EXISTS view_browseparty_obscontrib; +DROP VIEW IF EXISTS view_browseparty_classcontrib; +DROP VIEW IF EXISTS view_browseparty_projectcontrib; + +DROP VIEW IF EXISTS view_comminterp_more; +DROP VIEW IF EXISTS view_taxoninterp_more; +DROP VIEW IF EXISTS view_observation_transl; + + +DROP VIEW IF EXISTS view_notemb_classContributor; +DROP VIEW IF EXISTS view_notemb_commInterpretation; +DROP VIEW IF EXISTS view_notemb_commClass; + +DROP VIEW IF EXISTS view_notemb_disturbanceObs; +DROP VIEW IF EXISTS view_notemb_soilObs; +DROP VIEW IF EXISTS view_notemb_stemCount; +DROP VIEW IF EXISTS view_notemb_stemLocation; +DROP VIEW IF EXISTS view_notemb_taxonAlt; +DROP VIEW IF EXISTS view_notemb_taxonImportance; +DROP VIEW IF EXISTS view_notemb_taxonInterpretation; +DROP VIEW IF EXISTS view_notemb_taxonObservation; +DROP VIEW IF EXISTS view_notemb_observation; +DROP VIEW IF EXISTS view_notemb_observationcontributor; +DROP VIEW IF EXISTS view_notemb_plot; + + +DROP VIEW IF EXISTS view_plantconcept_transl; +DROP VIEW IF EXISTS view_commconcept_transl; +DROP VIEW IF EXISTS view_reference_transl ; +DROP VIEW IF EXISTS view_party_transl ; +DROP VIEW IF EXISTS view_party_public; + +DROP VIEW IF EXISTS view_keywProjPlaces ; +DROP VIEW IF EXISTS view_kwhelper_projcontrib; +DROP VIEW IF EXISTS view_kwhelper_refparty; +DROP VIEW IF EXISTS view_kwhelper_refjournal; + + + + DROP VIEW IF EXISTS view_all_commnames_code; + DROP VIEW IF EXISTS view_all_commnames_sciname; + DROP VIEW IF EXISTS view_all_commnames_translated; + DROP VIEW IF EXISTS view_all_commnames_common; + + DROP VIEW IF EXISTS view_std_commnames_code; + DROP VIEW IF EXISTS view_std_commnames_sciname; + DROP VIEW IF EXISTS view_std_commnames_translated; + DROP VIEW IF EXISTS view_std_commnames_common; + +DROP VIEW IF EXISTS view_all_plantnames_code; +DROP VIEW IF EXISTS view_all_plantnames_common ; +DROP VIEW IF EXISTS view_all_plantnames_sciname ; +DROP VIEW IF EXISTS view_all_plantnames_scinamenoauth; +DROP VIEW IF EXISTS view_std_plantnames_code ; +DROP VIEW IF EXISTS view_std_plantnames_common ; +DROP VIEW IF EXISTS view_std_plantnames_sciname ; +DROP VIEW IF EXISTS view_std_plantnames_scinamenoauth; + +DROP VIEW IF EXISTS stratumtype_x_stratummethod; +DROP VIEW IF EXISTS stratumtype_x_observation; diff --git a/migrations/V1.8__create_vegbank_views.sql b/migrations/V1.9__create_vegbank_views.sql similarity index 94% rename from migrations/V1.8__create_vegbank_views.sql rename to migrations/V1.9__create_vegbank_views.sql index 97ee832..e854892 100644 --- a/migrations/V1.8__create_vegbank_views.sql +++ b/migrations/V1.9__create_vegbank_views.sql @@ -1,6 +1,5 @@ --- VIEWS MUST BE DROPPED in drop_vegbank_views first! - CREATE VIEW view_party_public AS SELECT party.party_id, accessioncode, salutation, surname, givenname, middlename,organizationname, @@ -11,7 +10,7 @@ CREATE VIEW view_party_public AS ; -drop view view_busRule_plotsizeshape; +DROP VIEW IF EXISTS view_busRule_plotsizeshape; CREATE VIEW view_busRule_plotsizeshape AS SELECT (project_id), (select projectName from project where project.project_ID=observation.projecT_ID) as projectName, @@ -20,23 +19,22 @@ CREATE VIEW view_busRule_plotsizeshape AS where ((area is null) and (shape is null or (((shape)<>'Plotless') and (upper(shape) not like 'RELEV%')))) group by project_ID; -DROP view view_busRule_duplStratumType; +DROP VIEW IF EXISTS view_busRule_duplStratumType; CREATE VIEW view_busRule_duplStratumType AS SELECT count(1), stratummethod_id, stratumindex FROM stratumType GROUP BY stratummethod_id, stratumindex HAVING count(1) > 1; -DROP view view_busRule_duplcovercode; +DROP VIEW IF EXISTS view_busRule_duplcovercode; CREATE VIEW view_busRule_duplcovercode AS SELECT count(1), covermethod_id, covercode FROM coverIndex GROUP BY covermethod_id, covercode HAVING count(1) > 1; -- EMBARGO views -drop view view_emb_embargo_complete; -drop view view_emb_embargo_currentfullonly; +DROP VIEW IF EXISTS view_emb_embargo_complete; +DROP VIEW IF EXISTS view_emb_embargo_currentfullonly; CREATE VIEW view_emb_embargo_currentfullonly AS SELECT * FROM embargo WHERE (((defaultStatus)=6) AND ((embargoStart)Now())); - CREATE VIEW view_emb_embargo_complete AS SELECT Coalesce(emb.defaultStatus,0) AS currentEmb, plot.plot_id FROM plot LEFT JOIN view_emb_embargo_currentfullonly AS emb ON plot.PLOT_ID = emb.plot_ID; @@ -213,79 +211,79 @@ CREATE view view_csv_taxonimportance AS -- the following views create "standard" names for plantconcepts, based on usages of preferred party and classsystems: - DROP VIEW view_std_plantnames_code; + DROP VIEW IF EXISTS view_std_plantnames_code; CREATE VIEW view_std_plantnames_code AS SELECT plantconcept_id, plantname FROM plantusage WHERE classsystem = 'Code' AND party_id = (SELECT party_id FROM party WHERE accessioncode='VB.Py.511.USDANRCSPLANTS2') AND usagestop IS NULL; - DROP VIEW view_std_plantnames_sciname; + DROP VIEW IF EXISTS view_std_plantnames_sciname; CREATE VIEW view_std_plantnames_sciname AS SELECT plantconcept_id, plantname FROM plantusage WHERE classsystem = 'Scientific' AND party_id = (SELECT party_id FROM party WHERE accessioncode='VB.Py.511.USDANRCSPLANTS2') AND usagestop IS NULL; - DROP VIEW view_std_plantnames_scinamenoauth; + DROP VIEW IF EXISTS view_std_plantnames_scinamenoauth; CREATE VIEW view_std_plantnames_scinamenoauth AS SELECT plantconcept_id, plantname FROM plantusage WHERE classsystem = 'Scientific without authors' AND party_id = (SELECT party_id FROM party WHERE accessioncode='VB.Py.511.USDANRCSPLANTS2') AND usagestop IS NULL; - DROP VIEW view_std_plantnames_common; + DROP VIEW IF EXISTS view_std_plantnames_common; CREATE VIEW view_std_plantnames_common AS SELECT plantconcept_id, plantname FROM plantusage WHERE classsystem = 'English Common' AND party_id = (SELECT party_id FROM party WHERE accessioncode='VB.Py.511.USDANRCSPLANTS2') AND usagestop IS NULL; --the following views are same as above, but not party specific, to catch "other concepts": - DROP VIEW view_all_plantnames_code; + DROP VIEW IF EXISTS view_all_plantnames_code; CREATE VIEW view_all_plantnames_code AS SELECT plantconcept_id, plantname FROM plantusage WHERE classsystem = 'Code' ; - DROP VIEW view_all_plantnames_sciname; + DROP VIEW IF EXISTS view_all_plantnames_sciname; CREATE VIEW view_all_plantnames_sciname AS SELECT plantconcept_id, plantname FROM plantusage WHERE classsystem = 'Scientific' ; - DROP VIEW view_all_plantnames_scinamenoauth; + DROP VIEW IF EXISTS view_all_plantnames_scinamenoauth; CREATE VIEW view_all_plantnames_scinamenoauth AS SELECT plantconcept_id, plantname FROM plantusage WHERE classsystem = 'Scientific without authors' ; - DROP VIEW view_all_plantnames_common; + DROP VIEW IF EXISTS view_all_plantnames_common; CREATE VIEW view_all_plantnames_common AS SELECT plantconcept_id, plantname FROM plantusage WHERE classsystem = 'English Common' ; -- the following views create "standard" names for commconcepts, based on usages of preferred party and classsystems: - DROP VIEW view_std_commnames_code; + DROP VIEW IF EXISTS view_std_commnames_code; CREATE VIEW view_std_commnames_code AS SELECT commconcept_id, commname FROM commusage WHERE classsystem = 'Code' AND party_id = (SELECT party_id FROM party WHERE accessioncode='VB.Py.512.NATURESERVE') AND usagestop IS NULL; - DROP VIEW view_std_commnames_sciname; + DROP VIEW IF EXISTS view_std_commnames_sciname; CREATE VIEW view_std_commnames_sciname AS SELECT commconcept_id, commname FROM commusage WHERE classsystem = 'Scientific' AND party_id = (SELECT party_id FROM party WHERE accessioncode='VB.Py.512.NATURESERVE') AND usagestop IS NULL; - DROP VIEW view_std_commnames_translated; + DROP VIEW IF EXISTS view_std_commnames_translated; CREATE VIEW view_std_commnames_translated AS SELECT commconcept_id, commname FROM commusage WHERE classsystem = 'Translated' AND party_id = (SELECT party_id FROM party WHERE accessioncode='VB.Py.512.NATURESERVE') AND usagestop IS NULL; - DROP VIEW view_std_commnames_common; + DROP VIEW IF EXISTS view_std_commnames_common; CREATE VIEW view_std_commnames_common AS SELECT commconcept_id, commname FROM commusage WHERE classsystem = 'Common' AND party_id = (SELECT party_id FROM party WHERE accessioncode='VB.Py.512.NATURESERVE') AND usagestop IS NULL; - DROP VIEW view_all_commnames_code; + DROP VIEW IF EXISTS view_all_commnames_code; CREATE VIEW view_all_commnames_code AS SELECT commconcept_id, commname FROM commusage WHERE classsystem = 'Code' ; - DROP VIEW view_all_commnames_sciname; + DROP VIEW IF EXISTS view_all_commnames_sciname; CREATE VIEW view_all_commnames_sciname AS SELECT commconcept_id, commname FROM commusage WHERE classsystem = 'Scientific' ; - DROP VIEW view_all_commnames_translated; + DROP VIEW IF EXISTS view_all_commnames_translated; CREATE VIEW view_all_commnames_translated AS SELECT commconcept_id, commname FROM commusage WHERE classsystem = 'Translated' ; - DROP VIEW view_all_commnames_common; + DROP VIEW IF EXISTS view_all_commnames_common; CREATE VIEW view_all_commnames_common AS SELECT commconcept_id, commname FROM commusage WHERE classsystem = 'Common' ; @@ -324,27 +322,27 @@ CREATE VIEW view_observation_transl AS -- CREATE VIEW view_taxonobs_distinctid_curr AS SELECT observation_id, int_currplantconcept_id as plantconcept_id, max(cover) as maxplantcover FROM view_notEmb_taxonObservation as taxonobservation, taxonimportance where taxonimportance.taxonobservation_id=taxonobservation.taxonobservation_id GROUP BY plantconcept_id,observation_id; -- this view needed in the event there are no taxonimportance records for a taxonobservation. --- drop view view_taxonobs_withmaxcover; +-- DROP VIEW IF EXISTS view_taxonobs_withmaxcover; CREATE VIEW view_taxonobs_withmaxcover AS SELECT taxonobservation.*, (select max(cover) from taxonimportance where taxonimportance.taxonobservation_ID=taxonobservation.taxonobservation_ID) as maxcover FROM view_notEmb_taxonObservation as taxonobservation; --- drop view view_taxonobs_distinctid_curr; +-- DROP VIEW IF EXISTS view_taxonobs_distinctid_curr; CREATE VIEW view_taxonobs_distinctid_curr AS SELECT userdataset_id, observation_id, int_currplantconcept_id as plantconcept_id, max(maxcover) as maxplantcover FROM view_taxonobs_withmaxcover as taxonobservation, userdatasetitem WHERE observation_id = itemrecord AND itemtable='observation' GROUP BY plantconcept_id,userdataset_id,observation_id; --- drop view view_taxonobs_distinctid_curr_counts; +-- DROP VIEW IF EXISTS view_taxonobs_distinctid_curr_counts; CREATE VIEW view_taxonobs_distinctid_curr_counts AS SELECT userdataset_id, plantconcept_id, count(1) AS countObs, avg(maxplantcover) AS avgcovernoround, min(maxplantcover) AS mincovernoround, max(maxplantcover) AS maxcovernoround FROM view_taxonobs_distinctid_curr GROUP BY userdataset_id, plantconcept_id; --- drop view view_taxonobs_distinctid_curr_counts_plants; +-- DROP VIEW IF EXISTS view_taxonobs_distinctid_curr_counts_plants; CREATE VIEW view_taxonobs_distinctid_curr_counts_plants AS SELECT view_taxonobs_distinctid_curr_counts.*, round(CAST (view_taxonobs_distinctid_curr_counts.avgcovernoround as numeric),3) AS avgcover, round(CAST (view_taxonobs_distinctid_curr_counts.mincovernoround as numeric),3) AS mincover, @@ -352,7 +350,7 @@ CREATE VIEW view_taxonobs_distinctid_curr_counts_plants AS temptbl_std_plantnames.plantname, temptbl_std_plantnames.sciname, temptbl_std_plantnames.scinamenoauth, temptbl_std_plantnames.code,temptbl_std_plantnames.common FROM temptbl_std_plantnames, view_taxonobs_distinctid_curr_counts WHERE view_taxonobs_distinctid_curr_counts.plantconcept_ID=temptbl_std_plantnames.plantconcept_ID; ---DROP VIEW view_plotall_withembargo; +--DROP VIEW IF EXISTS view_plotall_withembargo; CREATE VIEW view_plotall_withembargo AS SELECT plot.*, embargo_id, embargoreason,defaultstatus,embargostart,embargostop, (defaultstatus + CASE WHEN embargostop Date: Thu, 8 Aug 2024 10:19:49 -0700 Subject: [PATCH 20/49] Add flyway 'README.md' in /resources to provide some flyway know-how and context --- resources/README.md | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 resources/README.md diff --git a/resources/README.md b/resources/README.md new file mode 100644 index 0000000..9fa37ab --- /dev/null +++ b/resources/README.md @@ -0,0 +1,42 @@ +# Flyway + +Flyway is a database migration tool... but what does that mean? How does it work? To get an overview, first read their documentation: +- https://documentation.red-gate.com/flyway/flyway-cli-and-api/welcome-to-flyway + +For the example below (and during my process to investigate Vegbank), I have chosen to use the Flyway Command Line App. You can download it through their website here: +- https://documentation.red-gate.com/fd/command-line-184127404.html + +For more information about the Flyway CLI: +- https://github.com/flyway/flywaydb.org/blob/gh-pages/documentation/usage/commandline/index.md#tab-community + +## How does it work + +The command looks simple, `flyway migrate`, and it is now that you're reading this README.md document. To get flyway working, you must provide it with a configuration file. Inside of this configuration file are key-value pairs that represent the credentials you need to access the database you want to migrate to, or re-initialize. See example below: + +``` +// flyway.conf +flyway.url=jdbc:postgresql://localhost:5432/vegbank +flyway.user=vegbank +flyway.password=vegbank +flyway.locations=filesystem:/migrations +``` + +The flyway CLI will take these credentials, access your database, then automatically apply all the individual .sql files you defined in the locations folder (ex. /migrations) + +**IMPORTANT** These .sql files must be named according to Flyway conventions: + +``` +V1.0__desc_of_content.sql +V1.1__desc_of_content.sql +V1.2__desc_of_content.sql +... +``` +- For more information, see: https://documentation.red-gate.com/fd/migrations-184127470.html + +That's it! In summary, set-up your configuration file, name your migration files appropriately, and run `flyway migrate`. +- Depending on your machine, you may need to add flyway to your path. +- I am on MacOS, and I did this with the following command to make flyway executable + +``` +sudo ln -s `pwd`/flyway-10.17.0/flyway /usr/local/bin +``` From 305cc9aee7a413982f0d9749b9cfb402545b9e27 Mon Sep 17 00:00:00 2001 From: Dou Mok Date: Thu, 8 Aug 2024 10:27:33 -0700 Subject: [PATCH 21/49] Update flyway 'README.md' for more context and wording --- resources/README.md | 55 ++++++++++++++++++++++++++++----------------- 1 file changed, 34 insertions(+), 21 deletions(-) diff --git a/resources/README.md b/resources/README.md index 9fa37ab..b76f59d 100644 --- a/resources/README.md +++ b/resources/README.md @@ -1,17 +1,16 @@ # Flyway -Flyway is a database migration tool... but what does that mean? How does it work? To get an overview, first read their documentation: -- https://documentation.red-gate.com/flyway/flyway-cli-and-api/welcome-to-flyway +Flyway is a database migration tool... but what does that mean? How does it work? To get an overview, first read their [documentation](https://documentation.red-gate.com/flyway/flyway-cli-and-api/welcome-to-flyway) -For the example below (and during my process to investigate Vegbank), I have chosen to use the Flyway Command Line App. You can download it through their website here: -- https://documentation.red-gate.com/fd/command-line-184127404.html +For the example below (and during my process to investigate Vegbank), I have chosen to use the Flyway Command Line App. You can download it through their website [here](https://documentation.red-gate.com/fd/command-line-184127404.html) -For more information about the Flyway CLI: -- https://github.com/flyway/flywaydb.org/blob/gh-pages/documentation/usage/commandline/index.md#tab-community +For more information about the Flyway [CLI](https://github.com/flyway/flywaydb.org/blob/gh-pages/documentation/usage/commandline/index.md#tab-community) ## How does it work -The command looks simple, `flyway migrate`, and it is now that you're reading this README.md document. To get flyway working, you must provide it with a configuration file. Inside of this configuration file are key-value pairs that represent the credentials you need to access the database you want to migrate to, or re-initialize. See example below: +The command looks simple, `flyway migrate`, and it is now that you're reading this `README.md` document. To get flyway working, you must provide it with a configuration file. + +Inside of this configuration file are key-value pairs that represent the credentials you need to access the database you want to migrate to, or re-initialize. See example below: ``` // flyway.conf @@ -21,22 +20,36 @@ flyway.password=vegbank flyway.locations=filesystem:/migrations ``` -The flyway CLI will take these credentials, access your database, then automatically apply all the individual .sql files you defined in the locations folder (ex. /migrations) - -**IMPORTANT** These .sql files must be named according to Flyway conventions: +Flyway will take these credentials, access your database, then automatically apply all the individual .sql files you defined in the locations folder (ex. /migrations) + - **IMPORTANT** These .sql files must be named according to Flyway conventions: -``` -V1.0__desc_of_content.sql -V1.1__desc_of_content.sql -V1.2__desc_of_content.sql -... -``` -- For more information, see: https://documentation.red-gate.com/fd/migrations-184127470.html + ``` + V1.0__desc_of_content.sql + V1.1__desc_of_content.sql + V1.2__desc_of_content.sql + ... + ``` + - For more information, see: https://documentation.red-gate.com/fd/migrations-184127470.html That's it! In summary, set-up your configuration file, name your migration files appropriately, and run `flyway migrate`. - Depending on your machine, you may need to add flyway to your path. - I am on MacOS, and I did this with the following command to make flyway executable - -``` -sudo ln -s `pwd`/flyway-10.17.0/flyway /usr/local/bin -``` + ``` + sudo ln -s `pwd`/flyway-10.17.0/flyway /usr/local/bin + ``` +- During development, I placed my configuration file inside of where I extracted flyway, example: + ``` + // ~/Users/doumok/Code/flyway-10.17.0/conf/flyway.conf + flyway.url=jdbc:postgresql://localhost:5432/vegbank + flyway.user=vegbank + flyway.password=vegbank + flyway.locations=filesystem:/Users/doumok/Code/vegbank2/migrations + ``` +- I also set-up postgres with Docker, thanks to Matthew (@artntek)'s handy code: + ``` + docker run --name vegbank -e POSTGRES_PASSWORD=vegbank -e POSTGRES_DB=vegbank -e POSTGRES_USER=vegbank -e PGDATA=/tmp/postgresql/data -e POSTGRES_HOST_AUTH_METHOD=password -p 5432:5432 -d postgres:16 + ``` + +## Additional Info + +Section to be filled out added with findings as progress is made \ No newline at end of file From 97e215dd8b333e5b39f00bc601f62bec17fc358e Mon Sep 17 00:00:00 2001 From: Dou Mok Date: Fri, 23 Aug 2024 08:03:05 -0700 Subject: [PATCH 22/49] Create new migration file 'V1.12__add_constraints.sql' where alter table commands were moved from 'V1.0__vegbank.sql' --- migrations/V1.0__vegbank.sql | 887 +------------------------- migrations/V1.12__add_constraints.sql | 883 +++++++++++++++++++++++++ resources/README.md | 4 + 3 files changed, 888 insertions(+), 886 deletions(-) create mode 100644 migrations/V1.12__add_constraints.sql diff --git a/migrations/V1.0__vegbank.sql b/migrations/V1.0__vegbank.sql index dd24cab..49dac63 100644 --- a/migrations/V1.0__vegbank.sql +++ b/migrations/V1.0__vegbank.sql @@ -2600,889 +2600,4 @@ CREATE TABLE dba_dataCache data9 varchar (255), data10 varchar (255) -); - ----------------------------------------------------------------------------- --- ALTER commConcept ----------------------------------------------------------------------------- - - -ALTER TABLE commConcept - ADD CONSTRAINT COMMNAME_ID FOREIGN KEY ( COMMNAME_ID ) - REFERENCES commName (COMMNAME_ID); - -ALTER TABLE commConcept - ADD CONSTRAINT reference_ID FOREIGN KEY ( reference_ID ) - REFERENCES reference (reference_ID); - ----------------------------------------------------------------------------- --- ALTER commCorrelation ----------------------------------------------------------------------------- - - -ALTER TABLE commCorrelation - ADD CONSTRAINT COMMSTATUS_ID FOREIGN KEY ( COMMSTATUS_ID ) - REFERENCES commStatus (COMMSTATUS_ID); - -ALTER TABLE commCorrelation - ADD CONSTRAINT COMMCONCEPT_ID FOREIGN KEY ( COMMCONCEPT_ID ) - REFERENCES commConcept (COMMCONCEPT_ID); - ----------------------------------------------------------------------------- --- ALTER commLineage ----------------------------------------------------------------------------- - - -ALTER TABLE commLineage - ADD CONSTRAINT parentCommStatus_ID FOREIGN KEY ( parentCommStatus_ID ) - REFERENCES commStatus (COMMSTATUS_ID); - -ALTER TABLE commLineage - ADD CONSTRAINT childCommStatus_ID FOREIGN KEY ( childCommStatus_ID ) - REFERENCES commStatus (COMMSTATUS_ID); - ----------------------------------------------------------------------------- --- ALTER commName ----------------------------------------------------------------------------- - - -ALTER TABLE commName - ADD CONSTRAINT reference_ID FOREIGN KEY ( reference_ID ) - REFERENCES reference (reference_ID); - ----------------------------------------------------------------------------- --- ALTER commStatus ----------------------------------------------------------------------------- - - -ALTER TABLE commStatus - ADD CONSTRAINT COMMCONCEPT_ID FOREIGN KEY ( COMMCONCEPT_ID ) - REFERENCES commConcept (COMMCONCEPT_ID); - -ALTER TABLE commStatus - ADD CONSTRAINT reference_ID FOREIGN KEY ( reference_ID ) - REFERENCES reference (reference_ID); - -ALTER TABLE commStatus - ADD CONSTRAINT commParent_ID FOREIGN KEY ( commParent_ID ) - REFERENCES commConcept (COMMCONCEPT_ID); - -ALTER TABLE commStatus - ADD CONSTRAINT PARTY_ID FOREIGN KEY ( PARTY_ID ) - REFERENCES party (PARTY_ID); - ----------------------------------------------------------------------------- --- ALTER commUsage ----------------------------------------------------------------------------- - - -ALTER TABLE commUsage - ADD CONSTRAINT COMMNAME_ID FOREIGN KEY ( COMMNAME_ID ) - REFERENCES commName (COMMNAME_ID); - -ALTER TABLE commUsage - ADD CONSTRAINT COMMCONCEPT_ID FOREIGN KEY ( COMMCONCEPT_ID ) - REFERENCES commConcept (COMMCONCEPT_ID); - -ALTER TABLE commUsage - ADD CONSTRAINT PARTY_ID FOREIGN KEY ( PARTY_ID ) - REFERENCES party (PARTY_ID); - -ALTER TABLE commUsage - ADD CONSTRAINT COMMSTATUS_ID FOREIGN KEY ( COMMSTATUS_ID ) - REFERENCES commStatus (COMMSTATUS_ID); - ----------------------------------------------------------------------------- --- ALTER plantConcept ----------------------------------------------------------------------------- - - -ALTER TABLE plantConcept - ADD CONSTRAINT PLANTNAME_ID FOREIGN KEY ( PLANTNAME_ID ) - REFERENCES plantName (PLANTNAME_ID); - -ALTER TABLE plantConcept - ADD CONSTRAINT reference_ID FOREIGN KEY ( reference_ID ) - REFERENCES reference (reference_ID); - ----------------------------------------------------------------------------- --- ALTER plantCorrelation ----------------------------------------------------------------------------- - - -ALTER TABLE plantCorrelation - ADD CONSTRAINT PLANTSTATUS_ID FOREIGN KEY ( PLANTSTATUS_ID ) - REFERENCES plantStatus (PLANTSTATUS_ID); - -ALTER TABLE plantCorrelation - ADD CONSTRAINT PLANTCONCEPT_ID FOREIGN KEY ( PLANTCONCEPT_ID ) - REFERENCES plantConcept (PLANTCONCEPT_ID); - ----------------------------------------------------------------------------- --- ALTER plantLineage ----------------------------------------------------------------------------- - - -ALTER TABLE plantLineage - ADD CONSTRAINT childPlantStatus_ID FOREIGN KEY ( childPlantStatus_ID ) - REFERENCES plantStatus (PLANTSTATUS_ID); - -ALTER TABLE plantLineage - ADD CONSTRAINT parentPlantStatus_ID FOREIGN KEY ( parentPlantStatus_ID ) - REFERENCES plantStatus (PLANTSTATUS_ID); - ----------------------------------------------------------------------------- --- ALTER plantName ----------------------------------------------------------------------------- - - -ALTER TABLE plantName - ADD CONSTRAINT reference_ID FOREIGN KEY ( reference_ID ) - REFERENCES reference (reference_ID); - ----------------------------------------------------------------------------- --- ALTER plantStatus ----------------------------------------------------------------------------- - - -ALTER TABLE plantStatus - ADD CONSTRAINT PLANTCONCEPT_ID FOREIGN KEY ( PLANTCONCEPT_ID ) - REFERENCES plantConcept (PLANTCONCEPT_ID); - -ALTER TABLE plantStatus - ADD CONSTRAINT reference_ID FOREIGN KEY ( reference_ID ) - REFERENCES reference (reference_ID); - -ALTER TABLE plantStatus - ADD CONSTRAINT plantParent_ID FOREIGN KEY ( plantParent_ID ) - REFERENCES plantConcept (PLANTCONCEPT_ID); - -ALTER TABLE plantStatus - ADD CONSTRAINT PARTY_ID FOREIGN KEY ( PARTY_ID ) - REFERENCES party (PARTY_ID); - ----------------------------------------------------------------------------- --- ALTER plantUsage ----------------------------------------------------------------------------- - - -ALTER TABLE plantUsage - ADD CONSTRAINT PLANTNAME_ID FOREIGN KEY ( PLANTNAME_ID ) - REFERENCES plantName (PLANTNAME_ID); - -ALTER TABLE plantUsage - ADD CONSTRAINT PLANTCONCEPT_ID FOREIGN KEY ( PLANTCONCEPT_ID ) - REFERENCES plantConcept (PLANTCONCEPT_ID); - -ALTER TABLE plantUsage - ADD CONSTRAINT PARTY_ID FOREIGN KEY ( PARTY_ID ) - REFERENCES party (PARTY_ID); - -ALTER TABLE plantUsage - ADD CONSTRAINT PLANTSTATUS_ID FOREIGN KEY ( PLANTSTATUS_ID ) - REFERENCES plantStatus (PLANTSTATUS_ID); - ----------------------------------------------------------------------------- --- ALTER address ----------------------------------------------------------------------------- - - -ALTER TABLE address - ADD CONSTRAINT party_ID FOREIGN KEY ( party_ID ) - REFERENCES party (PARTY_ID); - -ALTER TABLE address - ADD CONSTRAINT organization_ID FOREIGN KEY ( organization_ID ) - REFERENCES party (PARTY_ID); - ----------------------------------------------------------------------------- --- ALTER aux_Role ----------------------------------------------------------------------------- - - ----------------------------------------------------------------------------- --- ALTER reference ----------------------------------------------------------------------------- - - -ALTER TABLE reference - ADD CONSTRAINT referenceJournal_ID FOREIGN KEY ( referenceJournal_ID ) - REFERENCES referenceJournal (referenceJournal_ID); - ----------------------------------------------------------------------------- --- ALTER referenceAltIdent ----------------------------------------------------------------------------- - - -ALTER TABLE referenceAltIdent - ADD CONSTRAINT reference_ID FOREIGN KEY ( reference_ID ) - REFERENCES reference (reference_ID); - ----------------------------------------------------------------------------- --- ALTER referenceContributor ----------------------------------------------------------------------------- - - -ALTER TABLE referenceContributor - ADD CONSTRAINT reference_ID FOREIGN KEY ( reference_ID ) - REFERENCES reference (reference_ID); - -ALTER TABLE referenceContributor - ADD CONSTRAINT referenceParty_ID FOREIGN KEY ( referenceParty_ID ) - REFERENCES referenceParty (referenceParty_ID); - ----------------------------------------------------------------------------- --- ALTER referenceParty ----------------------------------------------------------------------------- - - -ALTER TABLE referenceParty - ADD CONSTRAINT currentParty_ID FOREIGN KEY ( currentParty_ID ) - REFERENCES referenceParty (referenceParty_ID); - ----------------------------------------------------------------------------- --- ALTER referenceJournal ----------------------------------------------------------------------------- - - ----------------------------------------------------------------------------- --- ALTER classContributor ----------------------------------------------------------------------------- - - -ALTER TABLE classContributor - ADD CONSTRAINT COMMCLASS_ID FOREIGN KEY ( COMMCLASS_ID ) - REFERENCES commClass (COMMCLASS_ID); - -ALTER TABLE classContributor - ADD CONSTRAINT PARTY_ID FOREIGN KEY ( PARTY_ID ) - REFERENCES party (PARTY_ID); - -ALTER TABLE classContributor - ADD CONSTRAINT ROLE_ID FOREIGN KEY ( ROLE_ID ) - REFERENCES aux_Role (ROLE_ID); - ----------------------------------------------------------------------------- --- ALTER commClass ----------------------------------------------------------------------------- - - -ALTER TABLE commClass - ADD CONSTRAINT OBSERVATION_ID FOREIGN KEY ( OBSERVATION_ID ) - REFERENCES observation (OBSERVATION_ID); - -ALTER TABLE commClass - ADD CONSTRAINT classPublication_ID FOREIGN KEY ( classPublication_ID ) - REFERENCES reference (reference_ID); - ----------------------------------------------------------------------------- --- ALTER commInterpretation ----------------------------------------------------------------------------- - - -ALTER TABLE commInterpretation - ADD CONSTRAINT COMMCLASS_ID FOREIGN KEY ( COMMCLASS_ID ) - REFERENCES commClass (COMMCLASS_ID); - -ALTER TABLE commInterpretation - ADD CONSTRAINT COMMCONCEPT_ID FOREIGN KEY ( COMMCONCEPT_ID ) - REFERENCES commConcept (COMMCONCEPT_ID); - -ALTER TABLE commInterpretation - ADD CONSTRAINT commAuthority_ID FOREIGN KEY ( commAuthority_ID ) - REFERENCES reference (reference_ID); - ----------------------------------------------------------------------------- --- ALTER coverIndex ----------------------------------------------------------------------------- - - -ALTER TABLE coverIndex - ADD CONSTRAINT COVERMETHOD_ID FOREIGN KEY ( COVERMETHOD_ID ) - REFERENCES coverMethod (COVERMETHOD_ID); - ----------------------------------------------------------------------------- --- ALTER coverMethod ----------------------------------------------------------------------------- - - -ALTER TABLE coverMethod - ADD CONSTRAINT reference_ID FOREIGN KEY ( reference_ID ) - REFERENCES reference (reference_ID); - ----------------------------------------------------------------------------- --- ALTER definedValue ----------------------------------------------------------------------------- - - -ALTER TABLE definedValue - ADD CONSTRAINT USERDEFINED_ID FOREIGN KEY ( USERDEFINED_ID ) - REFERENCES userDefined (USERDEFINED_ID); - ----------------------------------------------------------------------------- --- ALTER disturbanceObs ----------------------------------------------------------------------------- - - -ALTER TABLE disturbanceObs - ADD CONSTRAINT OBSERVATION_ID FOREIGN KEY ( OBSERVATION_ID ) - REFERENCES observation (OBSERVATION_ID); - ----------------------------------------------------------------------------- --- ALTER graphic ----------------------------------------------------------------------------- - - -ALTER TABLE graphic - ADD CONSTRAINT OBSERVATION_ID FOREIGN KEY ( OBSERVATION_ID ) - REFERENCES observation (OBSERVATION_ID); - ----------------------------------------------------------------------------- --- ALTER namedPlace ----------------------------------------------------------------------------- - - -ALTER TABLE namedPlace - ADD CONSTRAINT reference_ID FOREIGN KEY ( reference_ID ) - REFERENCES reference (reference_ID); - ----------------------------------------------------------------------------- --- ALTER namedPlaceCorrelation ----------------------------------------------------------------------------- - - -ALTER TABLE namedPlaceCorrelation - ADD CONSTRAINT PARENTPLACE_ID FOREIGN KEY ( PARENTPLACE_ID ) - REFERENCES namedPlace (NAMEDPLACE_ID); - -ALTER TABLE namedPlaceCorrelation - ADD CONSTRAINT CHILDPLACE_ID FOREIGN KEY ( CHILDPLACE_ID ) - REFERENCES namedPlace (NAMEDPLACE_ID); - ----------------------------------------------------------------------------- --- ALTER note ----------------------------------------------------------------------------- - - -ALTER TABLE note - ADD CONSTRAINT NOTELINK_ID FOREIGN KEY ( NOTELINK_ID ) - REFERENCES noteLink (NOTELINK_ID); - -ALTER TABLE note - ADD CONSTRAINT PARTY_ID FOREIGN KEY ( PARTY_ID ) - REFERENCES party (PARTY_ID); - -ALTER TABLE note - ADD CONSTRAINT ROLE_ID FOREIGN KEY ( ROLE_ID ) - REFERENCES aux_Role (ROLE_ID); - ----------------------------------------------------------------------------- --- ALTER noteLink ----------------------------------------------------------------------------- - - ----------------------------------------------------------------------------- --- ALTER observation ----------------------------------------------------------------------------- - - -ALTER TABLE observation - ADD CONSTRAINT PREVIOUSOBS_ID FOREIGN KEY ( PREVIOUSOBS_ID ) - REFERENCES observation (OBSERVATION_ID); - -ALTER TABLE observation - ADD CONSTRAINT PLOT_ID FOREIGN KEY ( PLOT_ID ) - REFERENCES plot (PLOT_ID); - -ALTER TABLE observation - ADD CONSTRAINT PROJECT_ID FOREIGN KEY ( PROJECT_ID ) - REFERENCES project (PROJECT_ID); - -ALTER TABLE observation - ADD CONSTRAINT COVERMETHOD_ID FOREIGN KEY ( COVERMETHOD_ID ) - REFERENCES coverMethod (COVERMETHOD_ID); - -ALTER TABLE observation - ADD CONSTRAINT STRATUMMETHOD_ID FOREIGN KEY ( STRATUMMETHOD_ID ) - REFERENCES stratumMethod (STRATUMMETHOD_ID); - -ALTER TABLE observation - ADD CONSTRAINT SOILTAXON_ID FOREIGN KEY ( SOILTAXON_ID ) - REFERENCES soilTaxon (SOILTAXON_ID); - ----------------------------------------------------------------------------- --- ALTER observationContributor ----------------------------------------------------------------------------- - - -ALTER TABLE observationContributor - ADD CONSTRAINT OBSERVATION_ID FOREIGN KEY ( OBSERVATION_ID ) - REFERENCES observation (OBSERVATION_ID); - -ALTER TABLE observationContributor - ADD CONSTRAINT PARTY_ID FOREIGN KEY ( PARTY_ID ) - REFERENCES party (PARTY_ID); - -ALTER TABLE observationContributor - ADD CONSTRAINT ROLE_ID FOREIGN KEY ( ROLE_ID ) - REFERENCES aux_Role (ROLE_ID); - ----------------------------------------------------------------------------- --- ALTER observationSynonym ----------------------------------------------------------------------------- - - -ALTER TABLE observationSynonym - ADD CONSTRAINT synonymObservation_ID FOREIGN KEY ( synonymObservation_ID ) - REFERENCES observation (OBSERVATION_ID); - -ALTER TABLE observationSynonym - ADD CONSTRAINT primaryObservation_ID FOREIGN KEY ( primaryObservation_ID ) - REFERENCES observation (OBSERVATION_ID); - -ALTER TABLE observationSynonym - ADD CONSTRAINT PARTY_ID FOREIGN KEY ( PARTY_ID ) - REFERENCES party (PARTY_ID); - -ALTER TABLE observationSynonym - ADD CONSTRAINT ROLE_ID FOREIGN KEY ( ROLE_ID ) - REFERENCES aux_Role (ROLE_ID); - ----------------------------------------------------------------------------- --- ALTER party ----------------------------------------------------------------------------- - - -ALTER TABLE party - ADD CONSTRAINT currentName_ID FOREIGN KEY ( currentName_ID ) - REFERENCES party (PARTY_ID); - ----------------------------------------------------------------------------- --- ALTER partyMember ----------------------------------------------------------------------------- - - -ALTER TABLE partyMember - ADD CONSTRAINT parentParty_ID FOREIGN KEY ( parentParty_ID ) - REFERENCES party (PARTY_ID); - -ALTER TABLE partyMember - ADD CONSTRAINT childParty_ID FOREIGN KEY ( childParty_ID ) - REFERENCES party (PARTY_ID); - -ALTER TABLE partyMember - ADD CONSTRAINT role_ID FOREIGN KEY ( role_ID ) - REFERENCES aux_Role (ROLE_ID); - ----------------------------------------------------------------------------- --- ALTER place ----------------------------------------------------------------------------- - - -ALTER TABLE place - ADD CONSTRAINT PLOT_ID FOREIGN KEY ( PLOT_ID ) - REFERENCES plot (PLOT_ID); - -ALTER TABLE place - ADD CONSTRAINT NAMEDPLACE_ID FOREIGN KEY ( NAMEDPLACE_ID ) - REFERENCES namedPlace (NAMEDPLACE_ID); - ----------------------------------------------------------------------------- --- ALTER plot ----------------------------------------------------------------------------- - - -ALTER TABLE plot - ADD CONSTRAINT reference_ID FOREIGN KEY ( reference_ID ) - REFERENCES reference (reference_ID); - -ALTER TABLE plot - ADD CONSTRAINT PARENT_ID FOREIGN KEY ( PARENT_ID ) - REFERENCES plot (PLOT_ID); - ----------------------------------------------------------------------------- --- ALTER project ----------------------------------------------------------------------------- - - ----------------------------------------------------------------------------- --- ALTER projectContributor ----------------------------------------------------------------------------- - - -ALTER TABLE projectContributor - ADD CONSTRAINT PROJECT_ID FOREIGN KEY ( PROJECT_ID ) - REFERENCES project (PROJECT_ID); - -ALTER TABLE projectContributor - ADD CONSTRAINT PARTY_ID FOREIGN KEY ( PARTY_ID ) - REFERENCES party (PARTY_ID); - -ALTER TABLE projectContributor - ADD CONSTRAINT ROLE_ID FOREIGN KEY ( ROLE_ID ) - REFERENCES aux_Role (ROLE_ID); - ----------------------------------------------------------------------------- --- ALTER revision ----------------------------------------------------------------------------- - - -ALTER TABLE revision - ADD CONSTRAINT previousRevision_ID FOREIGN KEY ( previousRevision_ID ) - REFERENCES revision (REVISION_ID); - ----------------------------------------------------------------------------- --- ALTER soilObs ----------------------------------------------------------------------------- - - -ALTER TABLE soilObs - ADD CONSTRAINT OBSERVATION_ID FOREIGN KEY ( OBSERVATION_ID ) - REFERENCES observation (OBSERVATION_ID); - ----------------------------------------------------------------------------- --- ALTER soilTaxon ----------------------------------------------------------------------------- - - -ALTER TABLE soilTaxon - ADD CONSTRAINT SOILPARENT_ID FOREIGN KEY ( SOILPARENT_ID ) - REFERENCES soilTaxon (SOILTAXON_ID); - ----------------------------------------------------------------------------- --- ALTER stemCount ----------------------------------------------------------------------------- - - -ALTER TABLE stemCount - ADD CONSTRAINT TAXONIMPORTANCE_ID FOREIGN KEY ( TAXONIMPORTANCE_ID ) - REFERENCES taxonImportance (taxonImportance_ID); - ----------------------------------------------------------------------------- --- ALTER stemLocation ----------------------------------------------------------------------------- - - -ALTER TABLE stemLocation - ADD CONSTRAINT STEMCOUNT_ID FOREIGN KEY ( STEMCOUNT_ID ) - REFERENCES stemCount (STEMCOUNT_ID); - ----------------------------------------------------------------------------- --- ALTER stratum ----------------------------------------------------------------------------- - - -ALTER TABLE stratum - ADD CONSTRAINT OBSERVATION_ID FOREIGN KEY ( OBSERVATION_ID ) - REFERENCES observation (OBSERVATION_ID); - -ALTER TABLE stratum - ADD CONSTRAINT STRATUMTYPE_ID FOREIGN KEY ( STRATUMTYPE_ID ) - REFERENCES stratumType (STRATUMTYPE_ID); - -ALTER TABLE stratum - ADD CONSTRAINT STRATUMMETHOD_ID FOREIGN KEY ( STRATUMMETHOD_ID ) - REFERENCES stratumMethod (STRATUMMETHOD_ID); - ----------------------------------------------------------------------------- --- ALTER stratumMethod ----------------------------------------------------------------------------- - - -ALTER TABLE stratumMethod - ADD CONSTRAINT reference_ID FOREIGN KEY ( reference_ID ) - REFERENCES reference (reference_ID); - ----------------------------------------------------------------------------- --- ALTER stratumType ----------------------------------------------------------------------------- - - -ALTER TABLE stratumType - ADD CONSTRAINT STRATUMMETHOD_ID FOREIGN KEY ( STRATUMMETHOD_ID ) - REFERENCES stratumMethod (STRATUMMETHOD_ID); - ----------------------------------------------------------------------------- --- ALTER taxonImportance ----------------------------------------------------------------------------- - - -ALTER TABLE taxonImportance - ADD CONSTRAINT taxonObservation_ID FOREIGN KEY ( taxonObservation_ID ) - REFERENCES taxonObservation (TAXONOBSERVATION_ID); - -ALTER TABLE taxonImportance - ADD CONSTRAINT stratum_ID FOREIGN KEY ( stratum_ID ) - REFERENCES stratum (STRATUM_ID); - ----------------------------------------------------------------------------- --- ALTER taxonInterpretation ----------------------------------------------------------------------------- - - -ALTER TABLE taxonInterpretation - ADD CONSTRAINT TAXONOBSERVATION_ID FOREIGN KEY ( TAXONOBSERVATION_ID ) - REFERENCES taxonObservation (TAXONOBSERVATION_ID); - -ALTER TABLE taxonInterpretation - ADD CONSTRAINT stemLocation_ID FOREIGN KEY ( stemLocation_ID ) - REFERENCES stemLocation (STEMLOCATION_ID); - -ALTER TABLE taxonInterpretation - ADD CONSTRAINT PLANTCONCEPT_ID FOREIGN KEY ( PLANTCONCEPT_ID ) - REFERENCES plantConcept (PLANTCONCEPT_ID); - -ALTER TABLE taxonInterpretation - ADD CONSTRAINT PLANTNAME_ID FOREIGN KEY ( PLANTNAME_ID ) - REFERENCES plantName (PLANTNAME_ID); - -ALTER TABLE taxonInterpretation - ADD CONSTRAINT PARTY_ID FOREIGN KEY ( PARTY_ID ) - REFERENCES party (PARTY_ID); - -ALTER TABLE taxonInterpretation - ADD CONSTRAINT ROLE_ID FOREIGN KEY ( ROLE_ID ) - REFERENCES aux_Role (ROLE_ID); - -ALTER TABLE taxonInterpretation - ADD CONSTRAINT reference_ID FOREIGN KEY ( reference_ID ) - REFERENCES reference (reference_ID); - -ALTER TABLE taxonInterpretation - ADD CONSTRAINT collector_ID FOREIGN KEY ( collector_ID ) - REFERENCES party (PARTY_ID); - -ALTER TABLE taxonInterpretation - ADD CONSTRAINT museum_ID FOREIGN KEY ( museum_ID ) - REFERENCES party (PARTY_ID); - ----------------------------------------------------------------------------- --- ALTER taxonObservation ----------------------------------------------------------------------------- - - -ALTER TABLE taxonObservation - ADD CONSTRAINT OBSERVATION_ID FOREIGN KEY ( OBSERVATION_ID ) - REFERENCES observation (OBSERVATION_ID); - -ALTER TABLE taxonObservation - ADD CONSTRAINT reference_ID FOREIGN KEY ( reference_ID ) - REFERENCES reference (reference_ID); - ----------------------------------------------------------------------------- --- ALTER taxonAlt ----------------------------------------------------------------------------- - - -ALTER TABLE taxonAlt - ADD CONSTRAINT taxonInterpretation_ID FOREIGN KEY ( taxonInterpretation_ID ) - REFERENCES taxonInterpretation (TAXONINTERPRETATION_ID); - -ALTER TABLE taxonAlt - ADD CONSTRAINT plantConcept_ID FOREIGN KEY ( plantConcept_ID ) - REFERENCES plantConcept (PLANTCONCEPT_ID); - ----------------------------------------------------------------------------- --- ALTER telephone ----------------------------------------------------------------------------- - - -ALTER TABLE telephone - ADD CONSTRAINT PARTY_ID FOREIGN KEY ( PARTY_ID ) - REFERENCES party (PARTY_ID); - ----------------------------------------------------------------------------- --- ALTER userDefined ----------------------------------------------------------------------------- - - ----------------------------------------------------------------------------- --- ALTER embargo ----------------------------------------------------------------------------- - - -ALTER TABLE embargo - ADD CONSTRAINT plot_ID FOREIGN KEY ( plot_ID ) - REFERENCES plot (PLOT_ID); - ----------------------------------------------------------------------------- --- ALTER usr ----------------------------------------------------------------------------- - - -ALTER TABLE usr - ADD CONSTRAINT party_ID FOREIGN KEY ( party_ID ) - REFERENCES party (PARTY_ID); - ----------------------------------------------------------------------------- --- ALTER userCertification ----------------------------------------------------------------------------- - - -ALTER TABLE userCertification - ADD CONSTRAINT usr_ID FOREIGN KEY ( usr_ID ) - REFERENCES usr (usr_ID); - ----------------------------------------------------------------------------- --- ALTER userRegionalExp ----------------------------------------------------------------------------- - - -ALTER TABLE userRegionalExp - ADD CONSTRAINT userCertification_ID FOREIGN KEY ( userCertification_ID ) - REFERENCES userCertification (userCertification_ID); - ----------------------------------------------------------------------------- --- ALTER userDataset ----------------------------------------------------------------------------- - - -ALTER TABLE userDataset - ADD CONSTRAINT usr_ID FOREIGN KEY ( usr_ID ) - REFERENCES usr (usr_ID); - ----------------------------------------------------------------------------- --- ALTER userDatasetItem ----------------------------------------------------------------------------- - - -ALTER TABLE userDatasetItem - ADD CONSTRAINT userDataset_ID FOREIGN KEY ( userDataset_ID ) - REFERENCES userDataset (userDataset_ID); - ----------------------------------------------------------------------------- --- ALTER userNotify ----------------------------------------------------------------------------- - - -ALTER TABLE userNotify - ADD CONSTRAINT usr_ID FOREIGN KEY ( usr_ID ) - REFERENCES usr (usr_ID); - ----------------------------------------------------------------------------- --- ALTER userPermission ----------------------------------------------------------------------------- - - -ALTER TABLE userPermission - ADD CONSTRAINT embargo_ID FOREIGN KEY ( embargo_ID ) - REFERENCES embargo (embargo_ID); - -ALTER TABLE userPermission - ADD CONSTRAINT usr_ID FOREIGN KEY ( usr_ID ) - REFERENCES usr (usr_ID); - ----------------------------------------------------------------------------- --- ALTER userQuery ----------------------------------------------------------------------------- - - -ALTER TABLE userQuery - ADD CONSTRAINT usr_ID FOREIGN KEY ( usr_ID ) - REFERENCES usr (usr_ID); - ----------------------------------------------------------------------------- --- ALTER userPreference ----------------------------------------------------------------------------- - - -ALTER TABLE userPreference - ADD CONSTRAINT usr_ID FOREIGN KEY ( usr_ID ) - REFERENCES usr (usr_ID); - ----------------------------------------------------------------------------- --- ALTER userRecordOwner ----------------------------------------------------------------------------- - - -ALTER TABLE userRecordOwner - ADD CONSTRAINT usr_ID FOREIGN KEY ( usr_ID ) - REFERENCES usr (usr_ID); - ----------------------------------------------------------------------------- --- ALTER keywords ----------------------------------------------------------------------------- - - ----------------------------------------------------------------------------- --- ALTER keywords_extra ----------------------------------------------------------------------------- - - ----------------------------------------------------------------------------- --- ALTER dba_confidentialitystatus ----------------------------------------------------------------------------- - - ----------------------------------------------------------------------------- --- ALTER dba_cookie ----------------------------------------------------------------------------- - - ----------------------------------------------------------------------------- --- ALTER dba_cookielabels ----------------------------------------------------------------------------- - - ----------------------------------------------------------------------------- --- ALTER dba_dbstatstime ----------------------------------------------------------------------------- - - ----------------------------------------------------------------------------- --- ALTER dba_preassignacccode ----------------------------------------------------------------------------- - - ----------------------------------------------------------------------------- --- ALTER dba_onerow ----------------------------------------------------------------------------- - - ----------------------------------------------------------------------------- --- ALTER dba_datamodelversion ----------------------------------------------------------------------------- - - ----------------------------------------------------------------------------- --- ALTER dba_xmlCache ----------------------------------------------------------------------------- - - ----------------------------------------------------------------------------- --- ALTER temptbl_std_commnames ----------------------------------------------------------------------------- - - ----------------------------------------------------------------------------- --- ALTER temptbl_std_plantnames ----------------------------------------------------------------------------- - - ----------------------------------------------------------------------------- --- ALTER dba_tableDescription ----------------------------------------------------------------------------- - - ----------------------------------------------------------------------------- --- ALTER dba_fieldDescription ----------------------------------------------------------------------------- - - ----------------------------------------------------------------------------- --- ALTER dba_fieldList ----------------------------------------------------------------------------- - - ----------------------------------------------------------------------------- --- ALTER dba_dataCache ----------------------------------------------------------------------------- - - - --CREATE ANY NAMED SEQUENCES: - -- - - - CREATE SEQUENCE dba_preassignacccode_dba_requestnumber_seq ; - - \ No newline at end of file +); \ No newline at end of file diff --git a/migrations/V1.12__add_constraints.sql b/migrations/V1.12__add_constraints.sql new file mode 100644 index 0000000..825928a --- /dev/null +++ b/migrations/V1.12__add_constraints.sql @@ -0,0 +1,883 @@ + +---------------------------------------------------------------------------- +-- ALTER commConcept +---------------------------------------------------------------------------- + + +ALTER TABLE commConcept + ADD CONSTRAINT COMMNAME_ID FOREIGN KEY ( COMMNAME_ID ) + REFERENCES commName (COMMNAME_ID); + +ALTER TABLE commConcept + ADD CONSTRAINT reference_ID FOREIGN KEY ( reference_ID ) + REFERENCES reference (reference_ID); + +---------------------------------------------------------------------------- +-- ALTER commCorrelation +---------------------------------------------------------------------------- + + +ALTER TABLE commCorrelation + ADD CONSTRAINT COMMSTATUS_ID FOREIGN KEY ( COMMSTATUS_ID ) + REFERENCES commStatus (COMMSTATUS_ID); + +ALTER TABLE commCorrelation + ADD CONSTRAINT COMMCONCEPT_ID FOREIGN KEY ( COMMCONCEPT_ID ) + REFERENCES commConcept (COMMCONCEPT_ID); + +---------------------------------------------------------------------------- +-- ALTER commLineage +---------------------------------------------------------------------------- + + +ALTER TABLE commLineage + ADD CONSTRAINT parentCommStatus_ID FOREIGN KEY ( parentCommStatus_ID ) + REFERENCES commStatus (COMMSTATUS_ID); + +ALTER TABLE commLineage + ADD CONSTRAINT childCommStatus_ID FOREIGN KEY ( childCommStatus_ID ) + REFERENCES commStatus (COMMSTATUS_ID); + +---------------------------------------------------------------------------- +-- ALTER commName +---------------------------------------------------------------------------- + + +ALTER TABLE commName + ADD CONSTRAINT reference_ID FOREIGN KEY ( reference_ID ) + REFERENCES reference (reference_ID); + +---------------------------------------------------------------------------- +-- ALTER commStatus +---------------------------------------------------------------------------- + + +ALTER TABLE commStatus + ADD CONSTRAINT COMMCONCEPT_ID FOREIGN KEY ( COMMCONCEPT_ID ) + REFERENCES commConcept (COMMCONCEPT_ID); + +ALTER TABLE commStatus + ADD CONSTRAINT reference_ID FOREIGN KEY ( reference_ID ) + REFERENCES reference (reference_ID); + +ALTER TABLE commStatus + ADD CONSTRAINT commParent_ID FOREIGN KEY ( commParent_ID ) + REFERENCES commConcept (COMMCONCEPT_ID); + +ALTER TABLE commStatus + ADD CONSTRAINT PARTY_ID FOREIGN KEY ( PARTY_ID ) + REFERENCES party (PARTY_ID); + +---------------------------------------------------------------------------- +-- ALTER commUsage +---------------------------------------------------------------------------- + + +ALTER TABLE commUsage + ADD CONSTRAINT COMMNAME_ID FOREIGN KEY ( COMMNAME_ID ) + REFERENCES commName (COMMNAME_ID); + +ALTER TABLE commUsage + ADD CONSTRAINT COMMCONCEPT_ID FOREIGN KEY ( COMMCONCEPT_ID ) + REFERENCES commConcept (COMMCONCEPT_ID); + +ALTER TABLE commUsage + ADD CONSTRAINT PARTY_ID FOREIGN KEY ( PARTY_ID ) + REFERENCES party (PARTY_ID); + +ALTER TABLE commUsage + ADD CONSTRAINT COMMSTATUS_ID FOREIGN KEY ( COMMSTATUS_ID ) + REFERENCES commStatus (COMMSTATUS_ID); + +---------------------------------------------------------------------------- +-- ALTER plantConcept +---------------------------------------------------------------------------- + + +ALTER TABLE plantConcept + ADD CONSTRAINT PLANTNAME_ID FOREIGN KEY ( PLANTNAME_ID ) + REFERENCES plantName (PLANTNAME_ID); + +ALTER TABLE plantConcept + ADD CONSTRAINT reference_ID FOREIGN KEY ( reference_ID ) + REFERENCES reference (reference_ID); + +---------------------------------------------------------------------------- +-- ALTER plantCorrelation +---------------------------------------------------------------------------- + + +ALTER TABLE plantCorrelation + ADD CONSTRAINT PLANTSTATUS_ID FOREIGN KEY ( PLANTSTATUS_ID ) + REFERENCES plantStatus (PLANTSTATUS_ID); + +ALTER TABLE plantCorrelation + ADD CONSTRAINT PLANTCONCEPT_ID FOREIGN KEY ( PLANTCONCEPT_ID ) + REFERENCES plantConcept (PLANTCONCEPT_ID); + +---------------------------------------------------------------------------- +-- ALTER plantLineage +---------------------------------------------------------------------------- + + +ALTER TABLE plantLineage + ADD CONSTRAINT childPlantStatus_ID FOREIGN KEY ( childPlantStatus_ID ) + REFERENCES plantStatus (PLANTSTATUS_ID); + +ALTER TABLE plantLineage + ADD CONSTRAINT parentPlantStatus_ID FOREIGN KEY ( parentPlantStatus_ID ) + REFERENCES plantStatus (PLANTSTATUS_ID); + +---------------------------------------------------------------------------- +-- ALTER plantName +---------------------------------------------------------------------------- + + +ALTER TABLE plantName + ADD CONSTRAINT reference_ID FOREIGN KEY ( reference_ID ) + REFERENCES reference (reference_ID); + +---------------------------------------------------------------------------- +-- ALTER plantStatus +---------------------------------------------------------------------------- + + +ALTER TABLE plantStatus + ADD CONSTRAINT PLANTCONCEPT_ID FOREIGN KEY ( PLANTCONCEPT_ID ) + REFERENCES plantConcept (PLANTCONCEPT_ID); + +ALTER TABLE plantStatus + ADD CONSTRAINT reference_ID FOREIGN KEY ( reference_ID ) + REFERENCES reference (reference_ID); + +ALTER TABLE plantStatus + ADD CONSTRAINT plantParent_ID FOREIGN KEY ( plantParent_ID ) + REFERENCES plantConcept (PLANTCONCEPT_ID); + +ALTER TABLE plantStatus + ADD CONSTRAINT PARTY_ID FOREIGN KEY ( PARTY_ID ) + REFERENCES party (PARTY_ID); + +---------------------------------------------------------------------------- +-- ALTER plantUsage +---------------------------------------------------------------------------- + + +ALTER TABLE plantUsage + ADD CONSTRAINT PLANTNAME_ID FOREIGN KEY ( PLANTNAME_ID ) + REFERENCES plantName (PLANTNAME_ID); + +ALTER TABLE plantUsage + ADD CONSTRAINT PLANTCONCEPT_ID FOREIGN KEY ( PLANTCONCEPT_ID ) + REFERENCES plantConcept (PLANTCONCEPT_ID); + +ALTER TABLE plantUsage + ADD CONSTRAINT PARTY_ID FOREIGN KEY ( PARTY_ID ) + REFERENCES party (PARTY_ID); + +ALTER TABLE plantUsage + ADD CONSTRAINT PLANTSTATUS_ID FOREIGN KEY ( PLANTSTATUS_ID ) + REFERENCES plantStatus (PLANTSTATUS_ID); + +---------------------------------------------------------------------------- +-- ALTER address +---------------------------------------------------------------------------- + + +ALTER TABLE address + ADD CONSTRAINT party_ID FOREIGN KEY ( party_ID ) + REFERENCES party (PARTY_ID); + +ALTER TABLE address + ADD CONSTRAINT organization_ID FOREIGN KEY ( organization_ID ) + REFERENCES party (PARTY_ID); + +---------------------------------------------------------------------------- +-- ALTER aux_Role +---------------------------------------------------------------------------- + + +---------------------------------------------------------------------------- +-- ALTER reference +---------------------------------------------------------------------------- + + +ALTER TABLE reference + ADD CONSTRAINT referenceJournal_ID FOREIGN KEY ( referenceJournal_ID ) + REFERENCES referenceJournal (referenceJournal_ID); + +---------------------------------------------------------------------------- +-- ALTER referenceAltIdent +---------------------------------------------------------------------------- + + +ALTER TABLE referenceAltIdent + ADD CONSTRAINT reference_ID FOREIGN KEY ( reference_ID ) + REFERENCES reference (reference_ID); + +---------------------------------------------------------------------------- +-- ALTER referenceContributor +---------------------------------------------------------------------------- + + +ALTER TABLE referenceContributor + ADD CONSTRAINT reference_ID FOREIGN KEY ( reference_ID ) + REFERENCES reference (reference_ID); + +ALTER TABLE referenceContributor + ADD CONSTRAINT referenceParty_ID FOREIGN KEY ( referenceParty_ID ) + REFERENCES referenceParty (referenceParty_ID); + +---------------------------------------------------------------------------- +-- ALTER referenceParty +---------------------------------------------------------------------------- + + +ALTER TABLE referenceParty + ADD CONSTRAINT currentParty_ID FOREIGN KEY ( currentParty_ID ) + REFERENCES referenceParty (referenceParty_ID); + +---------------------------------------------------------------------------- +-- ALTER referenceJournal +---------------------------------------------------------------------------- + + +---------------------------------------------------------------------------- +-- ALTER classContributor +---------------------------------------------------------------------------- + + +ALTER TABLE classContributor + ADD CONSTRAINT COMMCLASS_ID FOREIGN KEY ( COMMCLASS_ID ) + REFERENCES commClass (COMMCLASS_ID); + +ALTER TABLE classContributor + ADD CONSTRAINT PARTY_ID FOREIGN KEY ( PARTY_ID ) + REFERENCES party (PARTY_ID); + +ALTER TABLE classContributor + ADD CONSTRAINT ROLE_ID FOREIGN KEY ( ROLE_ID ) + REFERENCES aux_Role (ROLE_ID); + +---------------------------------------------------------------------------- +-- ALTER commClass +---------------------------------------------------------------------------- + + +ALTER TABLE commClass + ADD CONSTRAINT OBSERVATION_ID FOREIGN KEY ( OBSERVATION_ID ) + REFERENCES observation (OBSERVATION_ID); + +ALTER TABLE commClass + ADD CONSTRAINT classPublication_ID FOREIGN KEY ( classPublication_ID ) + REFERENCES reference (reference_ID); + +---------------------------------------------------------------------------- +-- ALTER commInterpretation +---------------------------------------------------------------------------- + + +ALTER TABLE commInterpretation + ADD CONSTRAINT COMMCLASS_ID FOREIGN KEY ( COMMCLASS_ID ) + REFERENCES commClass (COMMCLASS_ID); + +ALTER TABLE commInterpretation + ADD CONSTRAINT COMMCONCEPT_ID FOREIGN KEY ( COMMCONCEPT_ID ) + REFERENCES commConcept (COMMCONCEPT_ID); + +ALTER TABLE commInterpretation + ADD CONSTRAINT commAuthority_ID FOREIGN KEY ( commAuthority_ID ) + REFERENCES reference (reference_ID); + +---------------------------------------------------------------------------- +-- ALTER coverIndex +---------------------------------------------------------------------------- + + +ALTER TABLE coverIndex + ADD CONSTRAINT COVERMETHOD_ID FOREIGN KEY ( COVERMETHOD_ID ) + REFERENCES coverMethod (COVERMETHOD_ID); + +---------------------------------------------------------------------------- +-- ALTER coverMethod +---------------------------------------------------------------------------- + + +ALTER TABLE coverMethod + ADD CONSTRAINT reference_ID FOREIGN KEY ( reference_ID ) + REFERENCES reference (reference_ID); + +---------------------------------------------------------------------------- +-- ALTER definedValue +---------------------------------------------------------------------------- + + +ALTER TABLE definedValue + ADD CONSTRAINT USERDEFINED_ID FOREIGN KEY ( USERDEFINED_ID ) + REFERENCES userDefined (USERDEFINED_ID); + +---------------------------------------------------------------------------- +-- ALTER disturbanceObs +---------------------------------------------------------------------------- + + +ALTER TABLE disturbanceObs + ADD CONSTRAINT OBSERVATION_ID FOREIGN KEY ( OBSERVATION_ID ) + REFERENCES observation (OBSERVATION_ID); + +---------------------------------------------------------------------------- +-- ALTER graphic +---------------------------------------------------------------------------- + + +ALTER TABLE graphic + ADD CONSTRAINT OBSERVATION_ID FOREIGN KEY ( OBSERVATION_ID ) + REFERENCES observation (OBSERVATION_ID); + +---------------------------------------------------------------------------- +-- ALTER namedPlace +---------------------------------------------------------------------------- + + +ALTER TABLE namedPlace + ADD CONSTRAINT reference_ID FOREIGN KEY ( reference_ID ) + REFERENCES reference (reference_ID); + +---------------------------------------------------------------------------- +-- ALTER namedPlaceCorrelation +---------------------------------------------------------------------------- + + +ALTER TABLE namedPlaceCorrelation + ADD CONSTRAINT PARENTPLACE_ID FOREIGN KEY ( PARENTPLACE_ID ) + REFERENCES namedPlace (NAMEDPLACE_ID); + +ALTER TABLE namedPlaceCorrelation + ADD CONSTRAINT CHILDPLACE_ID FOREIGN KEY ( CHILDPLACE_ID ) + REFERENCES namedPlace (NAMEDPLACE_ID); + +---------------------------------------------------------------------------- +-- ALTER note +---------------------------------------------------------------------------- + + +ALTER TABLE note + ADD CONSTRAINT NOTELINK_ID FOREIGN KEY ( NOTELINK_ID ) + REFERENCES noteLink (NOTELINK_ID); + +ALTER TABLE note + ADD CONSTRAINT PARTY_ID FOREIGN KEY ( PARTY_ID ) + REFERENCES party (PARTY_ID); + +ALTER TABLE note + ADD CONSTRAINT ROLE_ID FOREIGN KEY ( ROLE_ID ) + REFERENCES aux_Role (ROLE_ID); + +---------------------------------------------------------------------------- +-- ALTER noteLink +---------------------------------------------------------------------------- + + +---------------------------------------------------------------------------- +-- ALTER observation +---------------------------------------------------------------------------- + + +ALTER TABLE observation + ADD CONSTRAINT PREVIOUSOBS_ID FOREIGN KEY ( PREVIOUSOBS_ID ) + REFERENCES observation (OBSERVATION_ID); + +ALTER TABLE observation + ADD CONSTRAINT PLOT_ID FOREIGN KEY ( PLOT_ID ) + REFERENCES plot (PLOT_ID); + +ALTER TABLE observation + ADD CONSTRAINT PROJECT_ID FOREIGN KEY ( PROJECT_ID ) + REFERENCES project (PROJECT_ID); + +ALTER TABLE observation + ADD CONSTRAINT COVERMETHOD_ID FOREIGN KEY ( COVERMETHOD_ID ) + REFERENCES coverMethod (COVERMETHOD_ID); + +ALTER TABLE observation + ADD CONSTRAINT STRATUMMETHOD_ID FOREIGN KEY ( STRATUMMETHOD_ID ) + REFERENCES stratumMethod (STRATUMMETHOD_ID); + +ALTER TABLE observation + ADD CONSTRAINT SOILTAXON_ID FOREIGN KEY ( SOILTAXON_ID ) + REFERENCES soilTaxon (SOILTAXON_ID); + +---------------------------------------------------------------------------- +-- ALTER observationContributor +---------------------------------------------------------------------------- + + +ALTER TABLE observationContributor + ADD CONSTRAINT OBSERVATION_ID FOREIGN KEY ( OBSERVATION_ID ) + REFERENCES observation (OBSERVATION_ID); + +ALTER TABLE observationContributor + ADD CONSTRAINT PARTY_ID FOREIGN KEY ( PARTY_ID ) + REFERENCES party (PARTY_ID); + +ALTER TABLE observationContributor + ADD CONSTRAINT ROLE_ID FOREIGN KEY ( ROLE_ID ) + REFERENCES aux_Role (ROLE_ID); + +---------------------------------------------------------------------------- +-- ALTER observationSynonym +---------------------------------------------------------------------------- + + +ALTER TABLE observationSynonym + ADD CONSTRAINT synonymObservation_ID FOREIGN KEY ( synonymObservation_ID ) + REFERENCES observation (OBSERVATION_ID); + +ALTER TABLE observationSynonym + ADD CONSTRAINT primaryObservation_ID FOREIGN KEY ( primaryObservation_ID ) + REFERENCES observation (OBSERVATION_ID); + +ALTER TABLE observationSynonym + ADD CONSTRAINT PARTY_ID FOREIGN KEY ( PARTY_ID ) + REFERENCES party (PARTY_ID); + +ALTER TABLE observationSynonym + ADD CONSTRAINT ROLE_ID FOREIGN KEY ( ROLE_ID ) + REFERENCES aux_Role (ROLE_ID); + +---------------------------------------------------------------------------- +-- ALTER party +---------------------------------------------------------------------------- + + +ALTER TABLE party + ADD CONSTRAINT currentName_ID FOREIGN KEY ( currentName_ID ) + REFERENCES party (PARTY_ID); + +---------------------------------------------------------------------------- +-- ALTER partyMember +---------------------------------------------------------------------------- + + +ALTER TABLE partyMember + ADD CONSTRAINT parentParty_ID FOREIGN KEY ( parentParty_ID ) + REFERENCES party (PARTY_ID); + +ALTER TABLE partyMember + ADD CONSTRAINT childParty_ID FOREIGN KEY ( childParty_ID ) + REFERENCES party (PARTY_ID); + +ALTER TABLE partyMember + ADD CONSTRAINT role_ID FOREIGN KEY ( role_ID ) + REFERENCES aux_Role (ROLE_ID); + +---------------------------------------------------------------------------- +-- ALTER place +---------------------------------------------------------------------------- + + +ALTER TABLE place + ADD CONSTRAINT PLOT_ID FOREIGN KEY ( PLOT_ID ) + REFERENCES plot (PLOT_ID); + +ALTER TABLE place + ADD CONSTRAINT NAMEDPLACE_ID FOREIGN KEY ( NAMEDPLACE_ID ) + REFERENCES namedPlace (NAMEDPLACE_ID); + +---------------------------------------------------------------------------- +-- ALTER plot +---------------------------------------------------------------------------- + + +ALTER TABLE plot + ADD CONSTRAINT reference_ID FOREIGN KEY ( reference_ID ) + REFERENCES reference (reference_ID); + +ALTER TABLE plot + ADD CONSTRAINT PARENT_ID FOREIGN KEY ( PARENT_ID ) + REFERENCES plot (PLOT_ID); + +---------------------------------------------------------------------------- +-- ALTER project +---------------------------------------------------------------------------- + + +---------------------------------------------------------------------------- +-- ALTER projectContributor +---------------------------------------------------------------------------- + + +ALTER TABLE projectContributor + ADD CONSTRAINT PROJECT_ID FOREIGN KEY ( PROJECT_ID ) + REFERENCES project (PROJECT_ID); + +ALTER TABLE projectContributor + ADD CONSTRAINT PARTY_ID FOREIGN KEY ( PARTY_ID ) + REFERENCES party (PARTY_ID); + +ALTER TABLE projectContributor + ADD CONSTRAINT ROLE_ID FOREIGN KEY ( ROLE_ID ) + REFERENCES aux_Role (ROLE_ID); + +---------------------------------------------------------------------------- +-- ALTER revision +---------------------------------------------------------------------------- + + +ALTER TABLE revision + ADD CONSTRAINT previousRevision_ID FOREIGN KEY ( previousRevision_ID ) + REFERENCES revision (REVISION_ID); + +---------------------------------------------------------------------------- +-- ALTER soilObs +---------------------------------------------------------------------------- + + +ALTER TABLE soilObs + ADD CONSTRAINT OBSERVATION_ID FOREIGN KEY ( OBSERVATION_ID ) + REFERENCES observation (OBSERVATION_ID); + +---------------------------------------------------------------------------- +-- ALTER soilTaxon +---------------------------------------------------------------------------- + + +ALTER TABLE soilTaxon + ADD CONSTRAINT SOILPARENT_ID FOREIGN KEY ( SOILPARENT_ID ) + REFERENCES soilTaxon (SOILTAXON_ID); + +---------------------------------------------------------------------------- +-- ALTER stemCount +---------------------------------------------------------------------------- + + +ALTER TABLE stemCount + ADD CONSTRAINT TAXONIMPORTANCE_ID FOREIGN KEY ( TAXONIMPORTANCE_ID ) + REFERENCES taxonImportance (taxonImportance_ID); + +---------------------------------------------------------------------------- +-- ALTER stemLocation +---------------------------------------------------------------------------- + + +ALTER TABLE stemLocation + ADD CONSTRAINT STEMCOUNT_ID FOREIGN KEY ( STEMCOUNT_ID ) + REFERENCES stemCount (STEMCOUNT_ID); + +---------------------------------------------------------------------------- +-- ALTER stratum +---------------------------------------------------------------------------- + + +ALTER TABLE stratum + ADD CONSTRAINT OBSERVATION_ID FOREIGN KEY ( OBSERVATION_ID ) + REFERENCES observation (OBSERVATION_ID); + +ALTER TABLE stratum + ADD CONSTRAINT STRATUMTYPE_ID FOREIGN KEY ( STRATUMTYPE_ID ) + REFERENCES stratumType (STRATUMTYPE_ID); + +ALTER TABLE stratum + ADD CONSTRAINT STRATUMMETHOD_ID FOREIGN KEY ( STRATUMMETHOD_ID ) + REFERENCES stratumMethod (STRATUMMETHOD_ID); + +---------------------------------------------------------------------------- +-- ALTER stratumMethod +---------------------------------------------------------------------------- + + +ALTER TABLE stratumMethod + ADD CONSTRAINT reference_ID FOREIGN KEY ( reference_ID ) + REFERENCES reference (reference_ID); + +---------------------------------------------------------------------------- +-- ALTER stratumType +---------------------------------------------------------------------------- + + +ALTER TABLE stratumType + ADD CONSTRAINT STRATUMMETHOD_ID FOREIGN KEY ( STRATUMMETHOD_ID ) + REFERENCES stratumMethod (STRATUMMETHOD_ID); + +---------------------------------------------------------------------------- +-- ALTER taxonImportance +---------------------------------------------------------------------------- + + +ALTER TABLE taxonImportance + ADD CONSTRAINT taxonObservation_ID FOREIGN KEY ( taxonObservation_ID ) + REFERENCES taxonObservation (TAXONOBSERVATION_ID); + +ALTER TABLE taxonImportance + ADD CONSTRAINT stratum_ID FOREIGN KEY ( stratum_ID ) + REFERENCES stratum (STRATUM_ID); + +---------------------------------------------------------------------------- +-- ALTER taxonInterpretation +---------------------------------------------------------------------------- + + +ALTER TABLE taxonInterpretation + ADD CONSTRAINT TAXONOBSERVATION_ID FOREIGN KEY ( TAXONOBSERVATION_ID ) + REFERENCES taxonObservation (TAXONOBSERVATION_ID); + +ALTER TABLE taxonInterpretation + ADD CONSTRAINT stemLocation_ID FOREIGN KEY ( stemLocation_ID ) + REFERENCES stemLocation (STEMLOCATION_ID); + +ALTER TABLE taxonInterpretation + ADD CONSTRAINT PLANTCONCEPT_ID FOREIGN KEY ( PLANTCONCEPT_ID ) + REFERENCES plantConcept (PLANTCONCEPT_ID); + +ALTER TABLE taxonInterpretation + ADD CONSTRAINT PLANTNAME_ID FOREIGN KEY ( PLANTNAME_ID ) + REFERENCES plantName (PLANTNAME_ID); + +ALTER TABLE taxonInterpretation + ADD CONSTRAINT PARTY_ID FOREIGN KEY ( PARTY_ID ) + REFERENCES party (PARTY_ID); + +ALTER TABLE taxonInterpretation + ADD CONSTRAINT ROLE_ID FOREIGN KEY ( ROLE_ID ) + REFERENCES aux_Role (ROLE_ID); + +ALTER TABLE taxonInterpretation + ADD CONSTRAINT reference_ID FOREIGN KEY ( reference_ID ) + REFERENCES reference (reference_ID); + +ALTER TABLE taxonInterpretation + ADD CONSTRAINT collector_ID FOREIGN KEY ( collector_ID ) + REFERENCES party (PARTY_ID); + +ALTER TABLE taxonInterpretation + ADD CONSTRAINT museum_ID FOREIGN KEY ( museum_ID ) + REFERENCES party (PARTY_ID); + +---------------------------------------------------------------------------- +-- ALTER taxonObservation +---------------------------------------------------------------------------- + + +ALTER TABLE taxonObservation + ADD CONSTRAINT OBSERVATION_ID FOREIGN KEY ( OBSERVATION_ID ) + REFERENCES observation (OBSERVATION_ID); + +ALTER TABLE taxonObservation + ADD CONSTRAINT reference_ID FOREIGN KEY ( reference_ID ) + REFERENCES reference (reference_ID); + +---------------------------------------------------------------------------- +-- ALTER taxonAlt +---------------------------------------------------------------------------- + + +ALTER TABLE taxonAlt + ADD CONSTRAINT taxonInterpretation_ID FOREIGN KEY ( taxonInterpretation_ID ) + REFERENCES taxonInterpretation (TAXONINTERPRETATION_ID); + +ALTER TABLE taxonAlt + ADD CONSTRAINT plantConcept_ID FOREIGN KEY ( plantConcept_ID ) + REFERENCES plantConcept (PLANTCONCEPT_ID); + +---------------------------------------------------------------------------- +-- ALTER telephone +---------------------------------------------------------------------------- + + +ALTER TABLE telephone + ADD CONSTRAINT PARTY_ID FOREIGN KEY ( PARTY_ID ) + REFERENCES party (PARTY_ID); + +---------------------------------------------------------------------------- +-- ALTER userDefined +---------------------------------------------------------------------------- + + +---------------------------------------------------------------------------- +-- ALTER embargo +---------------------------------------------------------------------------- + + +ALTER TABLE embargo + ADD CONSTRAINT plot_ID FOREIGN KEY ( plot_ID ) + REFERENCES plot (PLOT_ID); + +---------------------------------------------------------------------------- +-- ALTER usr +---------------------------------------------------------------------------- + + +ALTER TABLE usr + ADD CONSTRAINT party_ID FOREIGN KEY ( party_ID ) + REFERENCES party (PARTY_ID); + +---------------------------------------------------------------------------- +-- ALTER userCertification +---------------------------------------------------------------------------- + + +ALTER TABLE userCertification + ADD CONSTRAINT usr_ID FOREIGN KEY ( usr_ID ) + REFERENCES usr (usr_ID); + +---------------------------------------------------------------------------- +-- ALTER userRegionalExp +---------------------------------------------------------------------------- + + +ALTER TABLE userRegionalExp + ADD CONSTRAINT userCertification_ID FOREIGN KEY ( userCertification_ID ) + REFERENCES userCertification (userCertification_ID); + +---------------------------------------------------------------------------- +-- ALTER userDataset +---------------------------------------------------------------------------- + + +ALTER TABLE userDataset + ADD CONSTRAINT usr_ID FOREIGN KEY ( usr_ID ) + REFERENCES usr (usr_ID); + +---------------------------------------------------------------------------- +-- ALTER userDatasetItem +---------------------------------------------------------------------------- + + +ALTER TABLE userDatasetItem + ADD CONSTRAINT userDataset_ID FOREIGN KEY ( userDataset_ID ) + REFERENCES userDataset (userDataset_ID); + +---------------------------------------------------------------------------- +-- ALTER userNotify +---------------------------------------------------------------------------- + + +ALTER TABLE userNotify + ADD CONSTRAINT usr_ID FOREIGN KEY ( usr_ID ) + REFERENCES usr (usr_ID); + +---------------------------------------------------------------------------- +-- ALTER userPermission +---------------------------------------------------------------------------- + + +ALTER TABLE userPermission + ADD CONSTRAINT embargo_ID FOREIGN KEY ( embargo_ID ) + REFERENCES embargo (embargo_ID); + +ALTER TABLE userPermission + ADD CONSTRAINT usr_ID FOREIGN KEY ( usr_ID ) + REFERENCES usr (usr_ID); + +---------------------------------------------------------------------------- +-- ALTER userQuery +---------------------------------------------------------------------------- + + +ALTER TABLE userQuery + ADD CONSTRAINT usr_ID FOREIGN KEY ( usr_ID ) + REFERENCES usr (usr_ID); + +---------------------------------------------------------------------------- +-- ALTER userPreference +---------------------------------------------------------------------------- + + +ALTER TABLE userPreference + ADD CONSTRAINT usr_ID FOREIGN KEY ( usr_ID ) + REFERENCES usr (usr_ID); + +---------------------------------------------------------------------------- +-- ALTER userRecordOwner +---------------------------------------------------------------------------- + + +ALTER TABLE userRecordOwner + ADD CONSTRAINT usr_ID FOREIGN KEY ( usr_ID ) + REFERENCES usr (usr_ID); + +---------------------------------------------------------------------------- +-- ALTER keywords +---------------------------------------------------------------------------- + + +---------------------------------------------------------------------------- +-- ALTER keywords_extra +---------------------------------------------------------------------------- + + +---------------------------------------------------------------------------- +-- ALTER dba_confidentialitystatus +---------------------------------------------------------------------------- + + +---------------------------------------------------------------------------- +-- ALTER dba_cookie +---------------------------------------------------------------------------- + + +---------------------------------------------------------------------------- +-- ALTER dba_cookielabels +---------------------------------------------------------------------------- + + +---------------------------------------------------------------------------- +-- ALTER dba_dbstatstime +---------------------------------------------------------------------------- + + +---------------------------------------------------------------------------- +-- ALTER dba_preassignacccode +---------------------------------------------------------------------------- + + +---------------------------------------------------------------------------- +-- ALTER dba_onerow +---------------------------------------------------------------------------- + + +---------------------------------------------------------------------------- +-- ALTER dba_datamodelversion +---------------------------------------------------------------------------- + + +---------------------------------------------------------------------------- +-- ALTER dba_xmlCache +---------------------------------------------------------------------------- + + +---------------------------------------------------------------------------- +-- ALTER temptbl_std_commnames +---------------------------------------------------------------------------- + + +---------------------------------------------------------------------------- +-- ALTER temptbl_std_plantnames +---------------------------------------------------------------------------- + + +---------------------------------------------------------------------------- +-- ALTER dba_tableDescription +---------------------------------------------------------------------------- + + +---------------------------------------------------------------------------- +-- ALTER dba_fieldDescription +---------------------------------------------------------------------------- + + +---------------------------------------------------------------------------- +-- ALTER dba_fieldList +---------------------------------------------------------------------------- + + +---------------------------------------------------------------------------- +-- ALTER dba_dataCache +---------------------------------------------------------------------------- + + + --CREATE ANY NAMED SEQUENCES: + -- + + + CREATE SEQUENCE dba_preassignacccode_dba_requestnumber_seq ; \ No newline at end of file diff --git a/resources/README.md b/resources/README.md index b76f59d..8480ac0 100644 --- a/resources/README.md +++ b/resources/README.md @@ -49,6 +49,10 @@ That's it! In summary, set-up your configuration file, name your migration files ``` docker run --name vegbank -e POSTGRES_PASSWORD=vegbank -e POSTGRES_DB=vegbank -e POSTGRES_USER=vegbank -e PGDATA=/tmp/postgresql/data -e POSTGRES_HOST_AUTH_METHOD=password -p 5432:5432 -d postgres:16 ``` + - To access this instance locally, you can connect like such: + ``` + psql -h localhost -p 5432 -U vegbank -d vegbank + ``` ## Additional Info From a493778ab372a1c7cfb7eaf3b5d7a5be17853118 Mon Sep 17 00:00:00 2001 From: Dou Mok Date: Fri, 23 Aug 2024 08:26:29 -0700 Subject: [PATCH 23/49] Disable migration sql commands that conflicts with the data dump process --- migrations/V1.0__vegbank.sql | 5 +++-- migrations/V1.6__vegbank_populate_configtables.sql | 10 +++++----- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/migrations/V1.0__vegbank.sql b/migrations/V1.0__vegbank.sql index 49dac63..26a530d 100644 --- a/migrations/V1.0__vegbank.sql +++ b/migrations/V1.0__vegbank.sql @@ -2395,8 +2395,9 @@ CREATE TABLE dba_datamodelversion versionImplemented timestamp with time zone DEFAULT now() ); - - INSERT INTO dba_datamodelversion (versionText) values ('1.0.5'); +-- DOU DISABLE: +-- THIS IS ALREADY DECLARED IN THE DUMP FILE +-- INSERT INTO dba_datamodelversion (versionText) values ('1.0.5'); ---------------------------------------------------------------------------- diff --git a/migrations/V1.6__vegbank_populate_configtables.sql b/migrations/V1.6__vegbank_populate_configtables.sql index 909bcf8..aa2f25d 100644 --- a/migrations/V1.6__vegbank_populate_configtables.sql +++ b/migrations/V1.6__vegbank_populate_configtables.sql @@ -9,7 +9,7 @@ DELETE FROM dba_cookie; DELETE FROM dba_cookieLabels; -insert into dba_cookie ( cookieName , defaultvalue, viewname, examplePK, description, sortorder) values ( 'table_stemsize','hide','observation_comprehensive',3062,'show table of stem sizes on this view',1) ; +-- Dou Disable: insert into dba_cookie ( cookieName , defaultvalue, viewname, examplePK, description, sortorder) values ( 'table_stemsize','hide','observation_comprehensive',3062,'show table of stem sizes on this view',1) ; insert into dba_cookie ( cookieName , defaultvalue, viewname, examplePK, description, sortorder) values ( 'table_stemsize','show','observation_taxa',3062,'show table of stem sizes on this view' ,3) ; insert into dba_cookie ( cookieName , defaultvalue, viewname, examplePK, description, sortorder) values ( 'graphic_stemsize','show','observation_comprehensive',3062,'show graphic of stem sizes on this view' ,4) ; insert into dba_cookie ( cookieName , defaultvalue, viewname, examplePK, description, sortorder) values ( 'graphic_stemsize','show','observation_taxa',3062,'show graphic of stem sizes on this view',6 ) ; @@ -41,7 +41,7 @@ insert into dba_cookie ( cookieName , defaultvalue, viewname, examplePK, sorto -- mapping insert into dba_cookie ( cookieName , defaultvalue, viewname, examplePK, sortorder,startGroup) values ( 'mapping_icons_not_colored','hide','global',0,25,true ) ; -insert into dba_cookieLabels ( viewOrCookie , description) values ('graphic_stemsize','A graphical representation of tree stems, using DBH size'); +-- Dou Disable: insert into dba_cookieLabels ( viewOrCookie , description) values ('graphic_stemsize','A graphical representation of tree stems, using DBH size'); insert into dba_cookieLabels ( viewOrCookie , description) values ('table_stemsize','A tabular overview of stems for each taxon'); insert into dba_cookieLabels ( viewOrCookie , description) values ('observation_comprehensive','The Comprehensive Plot View'); insert into dba_cookieLabels ( viewOrCookie , description) values ('observation_taxa','View of plot(s) showing plants only'); @@ -73,7 +73,7 @@ insert into dba_cookieLabels (viewOrCookie , description) values ('mapping_icons DELETE FROM dba_confidentialityStatus ; -insert into dba_confidentialityStatus (confidentialityStatus,confidentialityText,confidentialityShortText) values (0,'exact location','exact'); +-- Dou Disable: insert into dba_confidentialityStatus (confidentialityStatus,confidentialityText,confidentialityShortText) values (0,'exact location','exact'); insert into dba_confidentialityStatus (confidentialityStatus,confidentialityText,confidentialityShortText) values (1,'1 km radius (nearest 0.01 degree)','1 km'); insert into dba_confidentialityStatus (confidentialityStatus,confidentialityText,confidentialityShortText) values (2,'10 km radius (nearest 0.1 degree)','10 km'); insert into dba_confidentialityStatus (confidentialityStatus,confidentialityText,confidentialityShortText) values (3,'100 km radius (nearest degree)','100 km'); @@ -101,10 +101,10 @@ INSERT INTO aux_role ( rolecode , roledescription , accessioncode , roleproject INSERT INTO aux_role ( rolecode , roledescription , accessioncode , roleproject , roleobservation , roletaxonint , roleclassint ) SELECT 'Unknown','NotSpecifiedorUnknown','VB.AR.47.NOTSPECIFIEDUNK','2','2','2','2' WHERE (select count(1) from aux_role where accessionCode='VB.AR.47.NOTSPECIFIEDUNK')=0; INSERT INTO aux_role ( rolecode , roledescription , accessioncode , roleproject , roleobservation , roletaxonint , roleclassint ) SELECT 'Passiveobserver',null,'VB.AR.48.PASSIVEOBSERVER',null,'2',null,null WHERE (select count(1) from aux_role where accessionCode='VB.AR.48.PASSIVEOBSERVER')=0; INSERT INTO aux_role ( rolecode , roledescription , accessioncode , roleproject , roleobservation , roletaxonint , roleclassint ) SELECT 'Plotcontributor',null,'VB.AR.50.PLOTCONTRIBUTOR',null,null,'2',null WHERE (select count(1) from aux_role where accessionCode='VB.AR.50.PLOTCONTRIBUTOR')=0; -INSERT INTO aux_role ( rolecode , roledescription , accessioncode , roleproject , roleobservation , roletaxonint , roleclassint ) SELECT 'Publicationauthor',null,'VB.AR.51.PUBLICATIONAUTH',null,null,'2','2' WHERE (select count(1) from aux_role where accessionCode='VB.AR.51.PUBLICATIONAUTH')=0; +-- Dou Disable: INSERT INTO aux_role ( rolecode , roledescription , accessioncode , roleproject , roleobservation , roletaxonint , roleclassint ) SELECT 'Publicationauthor',null,'VB.AR.51.PUBLICATIONAUTH',null,null,'2','2' WHERE (select count(1) from aux_role where accessionCode='VB.AR.51.PUBLICATIONAUTH')=0; INSERT INTO aux_role ( rolecode , roledescription , accessioncode , roleproject , roleobservation , roletaxonint , roleclassint ) SELECT 'Researchadvisor',null,'VB.AR.53.RESEARCHADVISOR','2','2',null,'2' WHERE (select count(1) from aux_role where accessionCode='VB.AR.53.RESEARCHADVISOR')=0; INSERT INTO aux_role ( rolecode , roledescription , accessioncode , roleproject , roleobservation , roletaxonint , roleclassint ) SELECT 'Systemmanager',null,'VB.AR.54.SYSTEMMANAGER',null,null,null,null WHERE (select count(1) from aux_role where accessionCode='VB.AR.54.SYSTEMMANAGER')=0; INSERT INTO aux_role ( rolecode , roledescription , accessioncode , roleproject , roleobservation , roletaxonint , roleclassint ) SELECT 'Taxonomist',null,'VB.AR.55.TAXONOMIST',null,'2',null,null WHERE (select count(1) from aux_role where accessionCode='VB.AR.55.TAXONOMIST')=0; -- only adds data if there is currently none in this table. - insert into dba_onerow (dba_onerow_id) select (1) where (select count(1) from dba_onerow)=0; \ No newline at end of file +-- Dou Disable: insert into dba_onerow (dba_onerow_id) select (1) where (select count(1) from dba_onerow)=0; \ No newline at end of file From e5de662d8676d4b8ef04c065ab88e25b88412125 Mon Sep 17 00:00:00 2001 From: Dou Mok Date: Fri, 23 Aug 2024 08:57:14 -0700 Subject: [PATCH 24/49] Add logs for dump file execution with constraints moved, (unsuccessful) alter migrations 'V1.6__vegbank_populate_configtables.sql' sequence to restart key value to resolve constraint issues --- .../V1.6__vegbank_populate_configtables.sql | 1 + sql-logs/vegbank2_psql_output.txt | 504 ++++++++++++++++++ 2 files changed, 505 insertions(+) create mode 100644 sql-logs/vegbank2_psql_output.txt diff --git a/migrations/V1.6__vegbank_populate_configtables.sql b/migrations/V1.6__vegbank_populate_configtables.sql index aa2f25d..c318d0a 100644 --- a/migrations/V1.6__vegbank_populate_configtables.sql +++ b/migrations/V1.6__vegbank_populate_configtables.sql @@ -101,6 +101,7 @@ INSERT INTO aux_role ( rolecode , roledescription , accessioncode , roleproject INSERT INTO aux_role ( rolecode , roledescription , accessioncode , roleproject , roleobservation , roletaxonint , roleclassint ) SELECT 'Unknown','NotSpecifiedorUnknown','VB.AR.47.NOTSPECIFIEDUNK','2','2','2','2' WHERE (select count(1) from aux_role where accessionCode='VB.AR.47.NOTSPECIFIEDUNK')=0; INSERT INTO aux_role ( rolecode , roledescription , accessioncode , roleproject , roleobservation , roletaxonint , roleclassint ) SELECT 'Passiveobserver',null,'VB.AR.48.PASSIVEOBSERVER',null,'2',null,null WHERE (select count(1) from aux_role where accessionCode='VB.AR.48.PASSIVEOBSERVER')=0; INSERT INTO aux_role ( rolecode , roledescription , accessioncode , roleproject , roleobservation , roletaxonint , roleclassint ) SELECT 'Plotcontributor',null,'VB.AR.50.PLOTCONTRIBUTOR',null,null,'2',null WHERE (select count(1) from aux_role where accessionCode='VB.AR.50.PLOTCONTRIBUTOR')=0; +ALTER SEQUENCE aux_role_role_id_seq RESTART WITH 20; -- Dou Disable: INSERT INTO aux_role ( rolecode , roledescription , accessioncode , roleproject , roleobservation , roletaxonint , roleclassint ) SELECT 'Publicationauthor',null,'VB.AR.51.PUBLICATIONAUTH',null,null,'2','2' WHERE (select count(1) from aux_role where accessionCode='VB.AR.51.PUBLICATIONAUTH')=0; INSERT INTO aux_role ( rolecode , roledescription , accessioncode , roleproject , roleobservation , roletaxonint , roleclassint ) SELECT 'Researchadvisor',null,'VB.AR.53.RESEARCHADVISOR','2','2',null,'2' WHERE (select count(1) from aux_role where accessionCode='VB.AR.53.RESEARCHADVISOR')=0; INSERT INTO aux_role ( rolecode , roledescription , accessioncode , roleproject , roleobservation , roletaxonint , roleclassint ) SELECT 'Systemmanager',null,'VB.AR.54.SYSTEMMANAGER',null,null,null,null WHERE (select count(1) from aux_role where accessionCode='VB.AR.54.SYSTEMMANAGER')=0; diff --git a/sql-logs/vegbank2_psql_output.txt b/sql-logs/vegbank2_psql_output.txt new file mode 100644 index 0000000..f36d9ef --- /dev/null +++ b/sql-logs/vegbank2_psql_output.txt @@ -0,0 +1,504 @@ +This is the output that was produced when loading the data dump file to a vegbank database targeted at: +flyway -target=1.11 migrate + +------- + +SET +SET +SET +SET +SET + set_config +------------ + +(1 row) + +SET +SET +SET +SET +COPY 4024 +COPY 621 +psql:/Users/doumok/Code/testing/vegbank_dataonly_20240814.sql:4706: ERROR: duplicate key value violates unique constraint "aux_role_pkey" +DETAIL: Key (role_id)=(16) already exists. +CONTEXT: COPY aux_role, line 1 +COPY 220 +COPY 470 +COPY 31 +COPY 115277 +COPY 261 +COPY 34610 +COPY 21 +psql:/Users/doumok/Code/testing/vegbank_dataonly_20240814.sql:271284: ERROR: value too long for type character varying(30) +CONTEXT: COPY observation, line 147, column hydrologicregime: "non-tidal - intermittently flooded" +COPY 102425 +COPY 48584 +COPY 123701 +COPY 38961 +COPY 39041 +COPY 34377 +COPY 102951 +COPY 0 +COPY 146761 +COPY 398 +psql:/Users/doumok/Code/testing/vegbank_dataonly_20240814.sql:908579: ERROR: duplicate key value violates unique constraint "dba_confidentialitystatus_pkey" +DETAIL: Key (confidentialitystatus)=(0) already exists. +CONTEXT: COPY dba_confidentialitystatus, line 1 +psql:/Users/doumok/Code/testing/vegbank_dataonly_20240814.sql:908606: ERROR: duplicate key value violates unique constraint "dba_cookie_pkey" +DETAIL: Key (cookie_id)=(18) already exists. +CONTEXT: COPY dba_cookie, line 1 +psql:/Users/doumok/Code/testing/vegbank_dataonly_20240814.sql:908633: ERROR: duplicate key value violates unique constraint "dba_cookielabels_pkey" +DETAIL: Key (cookielabel_id)=(18) already exists. +CONTEXT: COPY dba_cookielabels, line 1 +COPY 9 +psql:/Users/doumok/Code/testing/vegbank_dataonly_20240814.sql:908659: ERROR: duplicate key value violates unique constraint "dba_datamodelversion_pkey" +DETAIL: Key (dba_datamodelversion_id)=(1) already exists. +CONTEXT: COPY dba_datamodelversion, line 1 +COPY 2658 +COPY 594 +COPY 866 +psql:/Users/doumok/Code/testing/vegbank_dataonly_20240814.sql:912810: ERROR: duplicate key value violates unique constraint "dba_onerow_pkey" +DETAIL: Key (dba_onerow_id)=(1) already exists. +CONTEXT: COPY dba_onerow, line 1 +COPY 2233737 +COPY 55 +COPY 114063 +COPY 35 +COPY 49566 +COPY 37531 +COPY 1502 +COPY 0 +COPY 410177 +COPY 44949 +COPY 64563 +COPY 64722 +COPY 0 +COPY 0 +COPY 165021 +COPY 3814 +COPY 0 +COPY 234827 +COPY 450175 +COPY 293172 +COPY 273779 +COPY 131380 +COPY 0 +COPY 931997 +COPY 191 +COPY 0 +COPY 152 +COPY 206 +COPY 39607 +COPY 66900 +COPY 204 +COPY 347097 +COPY 1884790 +COPY 3604899 +COPY 600241 +COPY 8371 +COPY 2526264 +COPY 768 +COPY 404 +COPY 125 +COPY 24099 +COPY 293137 +COPY 1033 +COPY 106 +COPY 578 +COPY 1372162 +COPY 0 +COPY 0 +COPY 0 +COPY 0 +COPY 0 +COPY 0 + setval +-------- + 83465 +(1 row) + + setval +-------- + 55 +(1 row) + + setval +-------- + 53019 +(1 row) + + setval +-------- + 167422 +(1 row) + + setval +-------- + 53849 +(1 row) + + setval +-------- + 34406 +(1 row) + + setval +-------- + 114107 +(1 row) + + setval +-------- + 1 +(1 row) + + setval +-------- + 176530 +(1 row) + + setval +-------- + 53806 +(1 row) + + setval +-------- + 178678 +(1 row) + + setval +-------- + 9864 +(1 row) + + setval +-------- + 1634 +(1 row) + + setval +-------- + 36 +(1 row) + + setval +-------- + 36 +(1 row) + + setval +-------- + 9 +(1 row) + + setval +-------- + 1 +(1 row) + + setval +-------- + 2658 +(1 row) + + setval +-------- + 1782 +(1 row) + + setval +-------- + 2596 +(1 row) + + setval +-------- + 1 +(1 row) + + setval +--------- + 2233737 +(1 row) + + setval +-------- + 1248 +(1 row) + + setval +-------- + 165 +(1 row) + + setval +-------- + 49566 +(1 row) + + setval +-------- + 42135 +(1 row) + + setval +-------- + 1509 +(1 row) + + setval +-------- + 1 +(1 row) + + setval +-------- + 64627 +(1 row) + + setval +-------- + 126301 +(1 row) + + setval +-------- + 1 +(1 row) + + setval +-------- + 1 +(1 row) + + setval +-------- + 206488 +(1 row) + + setval +-------- + 195158 +(1 row) + + setval +-------- + 4639 +(1 row) + + setval +-------- + 199633 +(1 row) + + setval +-------- + 1 +(1 row) + + setval +-------- + 250506 +(1 row) + + setval +-------- + 402424 +(1 row) + + setval +-------- + 131381 +(1 row) + + setval +-------- + 1 +(1 row) + + setval +-------- + 462227 +(1 row) + + setval +-------- + 275371 +(1 row) + + setval +-------- + 933732 +(1 row) + + setval +-------- + 208747 +(1 row) + + setval +-------- + 11129 +(1 row) + + setval +-------- + 6854 +(1 row) + + setval +-------- + 87577 +(1 row) + + setval +-------- + 1 +(1 row) + + setval +-------- + 14610 +(1 row) + + setval +-------- + 222 +(1 row) + + setval +-------- + 14561 +(1 row) + + setval +-------- + 153910 +(1 row) + + setval +-------- + 68564 +(1 row) + + setval +-------- + 35998 +(1 row) + + setval +--------- + 1174914 +(1 row) + + setval +-------- + 35929 +(1 row) + + setval +-------- + 756060 +(1 row) + + setval +-------- + 2084 +(1 row) + + setval +-------- + 218064 +(1 row) + + setval +-------- + 1008 +(1 row) + + setval +--------- + 6320366 +(1 row) + + setval +--------- + 3764529 +(1 row) + + setval +--------- + 3527277 +(1 row) + + setval +-------- + 10181 +(1 row) + + setval +-------- + 1 +(1 row) + + setval +-------- + 1 +(1 row) + + setval +-------- + 131 +(1 row) + + setval +-------- + 203673 +(1 row) + + setval +---------- + 30705768 +(1 row) + + setval +-------- + 20307 +(1 row) + + setval +-------- + 1 +(1 row) + + setval +-------- + 1 +(1 row) + + setval +-------- + 1 +(1 row) + + setval +-------- + 1 +(1 row) + + setval +-------- + 1 +(1 row) + + setval +-------- + 1 +(1 row) + + setval +-------- + 1185 +(1 row) + From d5d11be2e70528042cdf54652cb819de20ff4003 Mon Sep 17 00:00:00 2001 From: Dou Mok Date: Fri, 23 Aug 2024 17:09:59 -0700 Subject: [PATCH 25/49] Complete comment out V1.6 migrations --- .../V1.6__vegbank_populate_configtables.sql | 163 +++++++++--------- 1 file changed, 82 insertions(+), 81 deletions(-) diff --git a/migrations/V1.6__vegbank_populate_configtables.sql b/migrations/V1.6__vegbank_populate_configtables.sql index c318d0a..9b447e1 100644 --- a/migrations/V1.6__vegbank_populate_configtables.sql +++ b/migrations/V1.6__vegbank_populate_configtables.sql @@ -1,111 +1,112 @@ ------------------------------------------------------------------------------------------- ----- THIS FILE ASSUMES THAT THE MODEL HAS BEEN COMPLETELY BUILT ----- IT ADDS CRUCIAL DATA TO TABLES THAT NEED IT, FIRST DELETING ANY DATA IN THEM ----- CAN BE RUN AT ANY TIME ------------------------------------------------------------------------------------------- +-- ------------------------------------------------------------------------------------------ +-- ---- THIS FILE ASSUMES THAT THE MODEL HAS BEEN COMPLETELY BUILT +-- ---- IT ADDS CRUCIAL DATA TO TABLES THAT NEED IT, FIRST DELETING ANY DATA IN THEM +-- ---- CAN BE RUN AT ANY TIME +-- ------------------------------------------------------------------------------------------ -DELETE FROM dba_cookie; -DELETE FROM dba_cookieLabels; +-- DELETE FROM dba_cookie; +-- DELETE FROM dba_cookieLabels; --- Dou Disable: insert into dba_cookie ( cookieName , defaultvalue, viewname, examplePK, description, sortorder) values ( 'table_stemsize','hide','observation_comprehensive',3062,'show table of stem sizes on this view',1) ; -insert into dba_cookie ( cookieName , defaultvalue, viewname, examplePK, description, sortorder) values ( 'table_stemsize','show','observation_taxa',3062,'show table of stem sizes on this view' ,3) ; -insert into dba_cookie ( cookieName , defaultvalue, viewname, examplePK, description, sortorder) values ( 'graphic_stemsize','show','observation_comprehensive',3062,'show graphic of stem sizes on this view' ,4) ; -insert into dba_cookie ( cookieName , defaultvalue, viewname, examplePK, description, sortorder) values ( 'graphic_stemsize','show','observation_taxa',3062,'show graphic of stem sizes on this view',6 ) ; +-- -- Dou Disable: insert into dba_cookie ( cookieName , defaultvalue, viewname, examplePK, description, sortorder) values ( 'table_stemsize','hide','observation_comprehensive',3062,'show table of stem sizes on this view',1) ; +-- insert into dba_cookie ( cookieName , defaultvalue, viewname, examplePK, description, sortorder) values ( 'table_stemsize','show','observation_taxa',3062,'show table of stem sizes on this view' ,3) ; +-- insert into dba_cookie ( cookieName , defaultvalue, viewname, examplePK, description, sortorder) values ( 'graphic_stemsize','show','observation_comprehensive',3062,'show graphic of stem sizes on this view' ,4) ; +-- insert into dba_cookie ( cookieName , defaultvalue, viewname, examplePK, description, sortorder) values ( 'graphic_stemsize','show','observation_taxa',3062,'show graphic of stem sizes on this view',6 ) ; -insert into dba_cookie ( cookieName , defaultvalue, viewname, examplePK, sortorder) values ( 'table_stemsize','show','taxonobservation_detail',68777,8) ; -insert into dba_cookie ( cookieName , defaultvalue, viewname, examplePK, sortorder) values ( 'graphic_stemsize','show','taxonobservation_detail',68777,9) ; +-- insert into dba_cookie ( cookieName , defaultvalue, viewname, examplePK, sortorder) values ( 'table_stemsize','show','taxonobservation_detail',68777,8) ; +-- insert into dba_cookie ( cookieName , defaultvalue, viewname, examplePK, sortorder) values ( 'graphic_stemsize','show','taxonobservation_detail',68777,9) ; -insert into dba_cookie ( cookieName , defaultvalue, viewname, examplePK, sortorder) values ( 'taxonimportance_covercode','show','global',68777,10) ; +-- insert into dba_cookie ( cookieName , defaultvalue, viewname, examplePK, sortorder) values ( 'taxonimportance_covercode','show','global',68777,10) ; -insert into dba_cookie ( cookieName , defaultvalue, viewname, examplePK, sortorder) values ( 'taxonimportance_basalarea','show','global',68777,12) ; -insert into dba_cookie ( cookieName , defaultvalue, viewname, examplePK, sortorder) values ( 'taxonimportance_biomass','show','global',68777,13) ; -insert into dba_cookie ( cookieName , defaultvalue, viewname, examplePK, sortorder) values ( 'taxonimportance_inferencearea','show','global',68777,14) ; +-- insert into dba_cookie ( cookieName , defaultvalue, viewname, examplePK, sortorder) values ( 'taxonimportance_basalarea','show','global',68777,12) ; +-- insert into dba_cookie ( cookieName , defaultvalue, viewname, examplePK, sortorder) values ( 'taxonimportance_biomass','show','global',68777,13) ; +-- insert into dba_cookie ( cookieName , defaultvalue, viewname, examplePK, sortorder) values ( 'taxonimportance_inferencearea','show','global',68777,14) ; -insert into dba_cookie ( cookieName , defaultvalue, viewname, examplePK, sortorder,startGroup) values ( 'plant_concept_name','hide','global',68777,14,true) ; -insert into dba_cookie ( cookieName , defaultvalue, viewname, examplePK, sortorder) values ( 'plant_full_scientific_name','hide','global',68777,15) ; -insert into dba_cookie ( cookieName , defaultvalue, viewname, examplePK, sortorder) values ( 'plant_scientific_name_noauthors','show','global',68777,16) ; -insert into dba_cookie ( cookieName , defaultvalue, viewname, examplePK, sortorder) values ( 'plant_common_name','hide','global',68777,17) ; -insert into dba_cookie ( cookieName , defaultvalue, viewname, examplePK, sortorder) values ( 'plant_code','hide','global',68777,18) ; +-- insert into dba_cookie ( cookieName , defaultvalue, viewname, examplePK, sortorder,startGroup) values ( 'plant_concept_name','hide','global',68777,14,true) ; +-- insert into dba_cookie ( cookieName , defaultvalue, viewname, examplePK, sortorder) values ( 'plant_full_scientific_name','hide','global',68777,15) ; +-- insert into dba_cookie ( cookieName , defaultvalue, viewname, examplePK, sortorder) values ( 'plant_scientific_name_noauthors','show','global',68777,16) ; +-- insert into dba_cookie ( cookieName , defaultvalue, viewname, examplePK, sortorder) values ( 'plant_common_name','hide','global',68777,17) ; +-- insert into dba_cookie ( cookieName , defaultvalue, viewname, examplePK, sortorder) values ( 'plant_code','hide','global',68777,18) ; ---help bits -insert into dba_cookie ( cookieName , defaultvalue, viewname, examplePK, sortorder) values ( 'ddlink','hide','global',0,0 ) ; -insert into dba_cookie ( cookieName , defaultvalue, viewname, examplePK, sortorder) values ( 'dd_showlabels_notnames','show','global',0,0 ) ; +-- --help bits +-- insert into dba_cookie ( cookieName , defaultvalue, viewname, examplePK, sortorder) values ( 'ddlink','hide','global',0,0 ) ; +-- insert into dba_cookie ( cookieName , defaultvalue, viewname, examplePK, sortorder) values ( 'dd_showlabels_notnames','show','global',0,0 ) ; ---userdefined -insert into dba_cookie ( cookieName , defaultvalue, viewname, examplePK, sortorder,startGroup) values ( 'user_defined_data','show','global',0,20,true ) ; +-- --userdefined +-- insert into dba_cookie ( cookieName , defaultvalue, viewname, examplePK, sortorder,startGroup) values ( 'user_defined_data','show','global',0,20,true ) ; --- mapping -insert into dba_cookie ( cookieName , defaultvalue, viewname, examplePK, sortorder,startGroup) values ( 'mapping_icons_not_colored','hide','global',0,25,true ) ; +-- -- mapping +-- insert into dba_cookie ( cookieName , defaultvalue, viewname, examplePK, sortorder,startGroup) values ( 'mapping_icons_not_colored','hide','global',0,25,true ) ; --- Dou Disable: insert into dba_cookieLabels ( viewOrCookie , description) values ('graphic_stemsize','A graphical representation of tree stems, using DBH size'); -insert into dba_cookieLabels ( viewOrCookie , description) values ('table_stemsize','A tabular overview of stems for each taxon'); -insert into dba_cookieLabels ( viewOrCookie , description) values ('observation_comprehensive','The Comprehensive Plot View'); -insert into dba_cookieLabels ( viewOrCookie , description) values ('observation_taxa','View of plot(s) showing plants only'); +-- -- Dou Disable: insert into dba_cookieLabels ( viewOrCookie , description) values ('graphic_stemsize','A graphical representation of tree stems, using DBH size'); +-- insert into dba_cookieLabels ( viewOrCookie , description) values ('table_stemsize','A tabular overview of stems for each taxon'); +-- insert into dba_cookieLabels ( viewOrCookie , description) values ('observation_comprehensive','The Comprehensive Plot View'); +-- insert into dba_cookieLabels ( viewOrCookie , description) values ('observation_taxa','View of plot(s) showing plants only'); -insert into dba_cookieLabels ( viewOrCookie , description) values ('global','Global Settings'); -insert into dba_cookieLabels ( viewOrCookie , description) values ('ddlink','Links to Field Definitions with Red Question Marks'); -insert into dba_cookieLabels ( viewOrCookie , description) values ('dd_showlabels_notnames','Show human-readable field labels instead of database names'); +-- insert into dba_cookieLabels ( viewOrCookie , description) values ('global','Global Settings'); +-- insert into dba_cookieLabels ( viewOrCookie , description) values ('ddlink','Links to Field Definitions with Red Question Marks'); +-- insert into dba_cookieLabels ( viewOrCookie , description) values ('dd_showlabels_notnames','Show human-readable field labels instead of database names'); -insert into dba_cookieLabels ( viewOrCookie , description) values ('taxonobservation_detail','View of a one species on a plot, with importance values and interpretations.'); +-- insert into dba_cookieLabels ( viewOrCookie , description) values ('taxonobservation_detail','View of a one species on a plot, with importance values and interpretations.'); -insert into dba_cookieLabels ( viewOrCookie , description) values ('taxonimportance_covercode','Cover Code used for a Cover Class to estimate cover'); -insert into dba_cookieLabels ( viewOrCookie , description) values ('taxonimportance_basalarea','Basal Area for a species'); -insert into dba_cookieLabels ( viewOrCookie , description) values ('taxonimportance_biomass','Biomass for a species'); -insert into dba_cookieLabels ( viewOrCookie , description) values ('taxonimportance_inferencearea','Inference Area used to determine importance values (cover, biomass, basal area, etc.) for a species.'); +-- insert into dba_cookieLabels ( viewOrCookie , description) values ('taxonimportance_covercode','Cover Code used for a Cover Class to estimate cover'); +-- insert into dba_cookieLabels ( viewOrCookie , description) values ('taxonimportance_basalarea','Basal Area for a species'); +-- insert into dba_cookieLabels ( viewOrCookie , description) values ('taxonimportance_biomass','Biomass for a species'); +-- insert into dba_cookieLabels ( viewOrCookie , description) values ('taxonimportance_inferencearea','Inference Area used to determine importance values (cover, biomass, basal area, etc.) for a species.'); -insert into dba_cookieLabels (viewOrCookie , description) values ('plant_concept_name','The plant name the concept is based on'); -insert into dba_cookieLabels (viewOrCookie , description) values ('plant_full_scientific_name','The full scientific name, including authors, of the plant concept'); -insert into dba_cookieLabels (viewOrCookie , description) values ('plant_scientific_name_noauthors','The scientific name without authors of the plant concept'); -insert into dba_cookieLabels (viewOrCookie , description) values ('plant_common_name','The common name for the plant concept, if available'); -insert into dba_cookieLabels (viewOrCookie , description) values ('plant_code','The Code for the plant concept, if available'); +-- insert into dba_cookieLabels (viewOrCookie , description) values ('plant_concept_name','The plant name the concept is based on'); +-- insert into dba_cookieLabels (viewOrCookie , description) values ('plant_full_scientific_name','The full scientific name, including authors, of the plant concept'); +-- insert into dba_cookieLabels (viewOrCookie , description) values ('plant_scientific_name_noauthors','The scientific name without authors of the plant concept'); +-- insert into dba_cookieLabels (viewOrCookie , description) values ('plant_common_name','The common name for the plant concept, if available'); +-- insert into dba_cookieLabels (viewOrCookie , description) values ('plant_code','The Code for the plant concept, if available'); -insert into dba_cookieLabels (viewOrCookie , description) values ('user_defined_data','Display User Defined Data for plots, if available'); +-- insert into dba_cookieLabels (viewOrCookie , description) values ('user_defined_data','Display User Defined Data for plots, if available'); -insert into dba_cookieLabels (viewOrCookie , description) values ('mapping_icons_not_colored','Do not use colors to differentiate mapping icons (much easier to read for those who are color-blind).'); +-- insert into dba_cookieLabels (viewOrCookie , description) values ('mapping_icons_not_colored','Do not use colors to differentiate mapping icons (much easier to read for those who are color-blind).'); -DELETE FROM dba_confidentialityStatus ; +-- DELETE FROM dba_confidentialityStatus ; --- Dou Disable: insert into dba_confidentialityStatus (confidentialityStatus,confidentialityText,confidentialityShortText) values (0,'exact location','exact'); -insert into dba_confidentialityStatus (confidentialityStatus,confidentialityText,confidentialityShortText) values (1,'1 km radius (nearest 0.01 degree)','1 km'); -insert into dba_confidentialityStatus (confidentialityStatus,confidentialityText,confidentialityShortText) values (2,'10 km radius (nearest 0.1 degree)','10 km'); -insert into dba_confidentialityStatus (confidentialityStatus,confidentialityText,confidentialityShortText) values (3,'100 km radius (nearest degree)','100 km'); -insert into dba_confidentialityStatus (confidentialityStatus,confidentialityText,confidentialityShortText) values (4,'NOT IMPLEMENTED: location embargo','location'); -insert into dba_confidentialityStatus (confidentialityStatus,confidentialityText,confidentialityShortText) values (5,'NOT IMPLEMENTED: public embargo','public emb.'); -insert into dba_confidentialityStatus (confidentialityStatus,confidentialityText,confidentialityShortText) values (6,'complete embargo','complete'); --- the following is a "pseudo value" in that it is not stored in the database this way, but is calculated. -insert into dba_confidentialityStatus (confidentialityStatus,confidentialityText,confidentialityShortText) values (106,'expired embargo','expired'); +-- -- Dou Disable: insert into dba_confidentialityStatus (confidentialityStatus,confidentialityText,confidentialityShortText) values (0,'exact location','exact'); +-- insert into dba_confidentialityStatus (confidentialityStatus,confidentialityText,confidentialityShortText) values (1,'1 km radius (nearest 0.01 degree)','1 km'); +-- insert into dba_confidentialityStatus (confidentialityStatus,confidentialityText,confidentialityShortText) values (2,'10 km radius (nearest 0.1 degree)','10 km'); +-- insert into dba_confidentialityStatus (confidentialityStatus,confidentialityText,confidentialityShortText) values (3,'100 km radius (nearest degree)','100 km'); +-- insert into dba_confidentialityStatus (confidentialityStatus,confidentialityText,confidentialityShortText) values (4,'NOT IMPLEMENTED: location embargo','location'); +-- insert into dba_confidentialityStatus (confidentialityStatus,confidentialityText,confidentialityShortText) values (5,'NOT IMPLEMENTED: public embargo','public emb.'); +-- insert into dba_confidentialityStatus (confidentialityStatus,confidentialityText,confidentialityShortText) values (6,'complete embargo','complete'); +-- -- the following is a "pseudo value" in that it is not stored in the database this way, but is calculated. +-- insert into dba_confidentialityStatus (confidentialityStatus,confidentialityText,confidentialityShortText) values (106,'expired embargo','expired'); --- data required for aux_role : only inserts this data if it isn't already there. -INSERT INTO aux_role ( rolecode , roledescription , accessioncode , roleproject , roleobservation , roletaxonint , roleclassint ) SELECT 'Author',null,'VB.AR.16.AUTHOR','2','2',null,null WHERE (select count(1) from aux_role where accessionCode='VB.AR.16.AUTHOR')=0;; -INSERT INTO aux_role ( rolecode , roledescription , accessioncode , roleproject , roleobservation , roletaxonint , roleclassint ) SELECT 'Contact','VegBankContactParty','VB.AR.17.CONTACT','2','2',null,null WHERE (select count(1) from aux_role where accessionCode='VB.AR.17.CONTACT')=0; -INSERT INTO aux_role ( rolecode , roledescription , accessioncode , roleproject , roleobservation , roletaxonint , roleclassint ) SELECT 'PI','PrimaryInvestigator','VB.AR.18.PI','1','1',null,null WHERE (select count(1) from aux_role where accessionCode='VB.AR.18.PI')=0; -INSERT INTO aux_role ( rolecode , roledescription , accessioncode , roleproject , roleobservation , roletaxonint , roleclassint ) SELECT 'DataManager',null,'VB.AR.19.DATAMANAGER',null,null,'2',null WHERE (select count(1) from aux_role where accessionCode='VB.AR.19.DATAMANAGER')=0; -INSERT INTO aux_role ( rolecode , roledescription , accessioncode , roleproject , roleobservation , roletaxonint , roleclassint ) SELECT 'Classifier',null,'VB.AR.34.CLASSIFIER',null,null,null,'1' WHERE (select count(1) from aux_role where accessionCode='VB.AR.34.CLASSIFIER')=0; -INSERT INTO aux_role ( rolecode , roledescription , accessioncode , roleproject , roleobservation , roletaxonint , roleclassint ) SELECT 'Plotauthor',null,'VB.AR.36.PLOTAUTHOR',null,null,'1',null WHERE (select count(1) from aux_role where accessionCode='VB.AR.36.PLOTAUTHOR')=0; -INSERT INTO aux_role ( rolecode , roledescription , accessioncode , roleproject , roleobservation , roletaxonint , roleclassint ) SELECT 'Co-PI',null,'VB.AR.38.COPI','2','2',null,null WHERE (select count(1) from aux_role where accessionCode='VB.AR.38.COPI')=0; -INSERT INTO aux_role ( rolecode , roledescription , accessioncode , roleproject , roleobservation , roletaxonint , roleclassint ) SELECT 'Computer(automated)',null,'VB.AR.39.COMPUTERAUTOMAT',null,null,'2',null WHERE (select count(1) from aux_role where accessionCode='VB.AR.39.COMPUTERAUTOMAT')=0; -INSERT INTO aux_role ( rolecode , roledescription , accessioncode , roleproject , roleobservation , roletaxonint , roleclassint ) SELECT 'Consultant',null,'VB.AR.40.CONSULTANT',null,null,null,'2' WHERE (select count(1) from aux_role where accessionCode='VB.AR.40.CONSULTANT')=0; -INSERT INTO aux_role ( rolecode , roledescription , accessioncode , roleproject , roleobservation , roletaxonint , roleclassint ) SELECT 'Fieldassistant',null,'VB.AR.43.FIELDASSISTANT',null,'2',null,null WHERE (select count(1) from aux_role where accessionCode='VB.AR.43.FIELDASSISTANT')=0; -INSERT INTO aux_role ( rolecode , roledescription , accessioncode , roleproject , roleobservation , roletaxonint , roleclassint ) SELECT 'Guide',null,'VB.AR.44.GUIDE',null,'2',null,null WHERE (select count(1) from aux_role where accessionCode='VB.AR.44.GUIDE')=0; -INSERT INTO aux_role ( rolecode , roledescription , accessioncode , roleproject , roleobservation , roletaxonint , roleclassint ) SELECT 'Landowner',null,'VB.AR.45.LANDOWNER',null,'2',null,null WHERE (select count(1) from aux_role where accessionCode='VB.AR.45.LANDOWNER')=0; -INSERT INTO aux_role ( rolecode , roledescription , accessioncode , roleproject , roleobservation , roletaxonint , roleclassint ) SELECT 'Unknown','NotSpecifiedorUnknown','VB.AR.47.NOTSPECIFIEDUNK','2','2','2','2' WHERE (select count(1) from aux_role where accessionCode='VB.AR.47.NOTSPECIFIEDUNK')=0; -INSERT INTO aux_role ( rolecode , roledescription , accessioncode , roleproject , roleobservation , roletaxonint , roleclassint ) SELECT 'Passiveobserver',null,'VB.AR.48.PASSIVEOBSERVER',null,'2',null,null WHERE (select count(1) from aux_role where accessionCode='VB.AR.48.PASSIVEOBSERVER')=0; -INSERT INTO aux_role ( rolecode , roledescription , accessioncode , roleproject , roleobservation , roletaxonint , roleclassint ) SELECT 'Plotcontributor',null,'VB.AR.50.PLOTCONTRIBUTOR',null,null,'2',null WHERE (select count(1) from aux_role where accessionCode='VB.AR.50.PLOTCONTRIBUTOR')=0; -ALTER SEQUENCE aux_role_role_id_seq RESTART WITH 20; --- Dou Disable: INSERT INTO aux_role ( rolecode , roledescription , accessioncode , roleproject , roleobservation , roletaxonint , roleclassint ) SELECT 'Publicationauthor',null,'VB.AR.51.PUBLICATIONAUTH',null,null,'2','2' WHERE (select count(1) from aux_role where accessionCode='VB.AR.51.PUBLICATIONAUTH')=0; -INSERT INTO aux_role ( rolecode , roledescription , accessioncode , roleproject , roleobservation , roletaxonint , roleclassint ) SELECT 'Researchadvisor',null,'VB.AR.53.RESEARCHADVISOR','2','2',null,'2' WHERE (select count(1) from aux_role where accessionCode='VB.AR.53.RESEARCHADVISOR')=0; -INSERT INTO aux_role ( rolecode , roledescription , accessioncode , roleproject , roleobservation , roletaxonint , roleclassint ) SELECT 'Systemmanager',null,'VB.AR.54.SYSTEMMANAGER',null,null,null,null WHERE (select count(1) from aux_role where accessionCode='VB.AR.54.SYSTEMMANAGER')=0; -INSERT INTO aux_role ( rolecode , roledescription , accessioncode , roleproject , roleobservation , roletaxonint , roleclassint ) SELECT 'Taxonomist',null,'VB.AR.55.TAXONOMIST',null,'2',null,null WHERE (select count(1) from aux_role where accessionCode='VB.AR.55.TAXONOMIST')=0; +-- -- data required for aux_role : only inserts this data if it isn't already there. +-- INSERT INTO aux_role ( rolecode , roledescription , accessioncode , roleproject , roleobservation , roletaxonint , roleclassint ) SELECT 'Author',null,'VB.AR.16.AUTHOR','2','2',null,null WHERE (select count(1) from aux_role where accessionCode='VB.AR.16.AUTHOR')=0;; +-- INSERT INTO aux_role ( rolecode , roledescription , accessioncode , roleproject , roleobservation , roletaxonint , roleclassint ) SELECT 'Contact','VegBankContactParty','VB.AR.17.CONTACT','2','2',null,null WHERE (select count(1) from aux_role where accessionCode='VB.AR.17.CONTACT')=0; +-- INSERT INTO aux_role ( rolecode , roledescription , accessioncode , roleproject , roleobservation , roletaxonint , roleclassint ) SELECT 'PI','PrimaryInvestigator','VB.AR.18.PI','1','1',null,null WHERE (select count(1) from aux_role where accessionCode='VB.AR.18.PI')=0; +-- INSERT INTO aux_role ( rolecode , roledescription , accessioncode , roleproject , roleobservation , roletaxonint , roleclassint ) SELECT 'DataManager',null,'VB.AR.19.DATAMANAGER',null,null,'2',null WHERE (select count(1) from aux_role where accessionCode='VB.AR.19.DATAMANAGER')=0; +-- INSERT INTO aux_role ( rolecode , roledescription , accessioncode , roleproject , roleobservation , roletaxonint , roleclassint ) SELECT 'Classifier',null,'VB.AR.34.CLASSIFIER',null,null,null,'1' WHERE (select count(1) from aux_role where accessionCode='VB.AR.34.CLASSIFIER')=0; +-- INSERT INTO aux_role ( rolecode , roledescription , accessioncode , roleproject , roleobservation , roletaxonint , roleclassint ) SELECT 'Plotauthor',null,'VB.AR.36.PLOTAUTHOR',null,null,'1',null WHERE (select count(1) from aux_role where accessionCode='VB.AR.36.PLOTAUTHOR')=0; +-- INSERT INTO aux_role ( rolecode , roledescription , accessioncode , roleproject , roleobservation , roletaxonint , roleclassint ) SELECT 'Co-PI',null,'VB.AR.38.COPI','2','2',null,null WHERE (select count(1) from aux_role where accessionCode='VB.AR.38.COPI')=0; +-- INSERT INTO aux_role ( rolecode , roledescription , accessioncode , roleproject , roleobservation , roletaxonint , roleclassint ) SELECT 'Computer(automated)',null,'VB.AR.39.COMPUTERAUTOMAT',null,null,'2',null WHERE (select count(1) from aux_role where accessionCode='VB.AR.39.COMPUTERAUTOMAT')=0; +-- INSERT INTO aux_role ( rolecode , roledescription , accessioncode , roleproject , roleobservation , roletaxonint , roleclassint ) SELECT 'Consultant',null,'VB.AR.40.CONSULTANT',null,null,null,'2' WHERE (select count(1) from aux_role where accessionCode='VB.AR.40.CONSULTANT')=0; +-- INSERT INTO aux_role ( rolecode , roledescription , accessioncode , roleproject , roleobservation , roletaxonint , roleclassint ) SELECT 'Fieldassistant',null,'VB.AR.43.FIELDASSISTANT',null,'2',null,null WHERE (select count(1) from aux_role where accessionCode='VB.AR.43.FIELDASSISTANT')=0; +-- INSERT INTO aux_role ( rolecode , roledescription , accessioncode , roleproject , roleobservation , roletaxonint , roleclassint ) SELECT 'Guide',null,'VB.AR.44.GUIDE',null,'2',null,null WHERE (select count(1) from aux_role where accessionCode='VB.AR.44.GUIDE')=0; +-- INSERT INTO aux_role ( rolecode , roledescription , accessioncode , roleproject , roleobservation , roletaxonint , roleclassint ) SELECT 'Landowner',null,'VB.AR.45.LANDOWNER',null,'2',null,null WHERE (select count(1) from aux_role where accessionCode='VB.AR.45.LANDOWNER')=0; +-- INSERT INTO aux_role ( rolecode , roledescription , accessioncode , roleproject , roleobservation , roletaxonint , roleclassint ) SELECT 'Unknown','NotSpecifiedorUnknown','VB.AR.47.NOTSPECIFIEDUNK','2','2','2','2' WHERE (select count(1) from aux_role where accessionCode='VB.AR.47.NOTSPECIFIEDUNK')=0; +-- INSERT INTO aux_role ( rolecode , roledescription , accessioncode , roleproject , roleobservation , roletaxonint , roleclassint ) SELECT 'Passiveobserver',null,'VB.AR.48.PASSIVEOBSERVER',null,'2',null,null WHERE (select count(1) from aux_role where accessionCode='VB.AR.48.PASSIVEOBSERVER')=0; +-- INSERT INTO aux_role ( rolecode , roledescription , accessioncode , roleproject , roleobservation , roletaxonint , roleclassint ) SELECT 'Plotcontributor',null,'VB.AR.50.PLOTCONTRIBUTOR',null,null,'2',null WHERE (select count(1) from aux_role where accessionCode='VB.AR.50.PLOTCONTRIBUTOR')=0; +-- -- Try to resolve ERROR: duplicate key value violates unique constraint "aux_role_pkey" +-- ALTER SEQUENCE aux_role_role_id_seq RESTART WITH 20; +-- -- Dou Disable: INSERT INTO aux_role ( rolecode , roledescription , accessioncode , roleproject , roleobservation , roletaxonint , roleclassint ) SELECT 'Publicationauthor',null,'VB.AR.51.PUBLICATIONAUTH',null,null,'2','2' WHERE (select count(1) from aux_role where accessionCode='VB.AR.51.PUBLICATIONAUTH')=0; +-- INSERT INTO aux_role ( rolecode , roledescription , accessioncode , roleproject , roleobservation , roletaxonint , roleclassint ) SELECT 'Researchadvisor',null,'VB.AR.53.RESEARCHADVISOR','2','2',null,'2' WHERE (select count(1) from aux_role where accessionCode='VB.AR.53.RESEARCHADVISOR')=0; +-- INSERT INTO aux_role ( rolecode , roledescription , accessioncode , roleproject , roleobservation , roletaxonint , roleclassint ) SELECT 'Systemmanager',null,'VB.AR.54.SYSTEMMANAGER',null,null,null,null WHERE (select count(1) from aux_role where accessionCode='VB.AR.54.SYSTEMMANAGER')=0; +-- INSERT INTO aux_role ( rolecode , roledescription , accessioncode , roleproject , roleobservation , roletaxonint , roleclassint ) SELECT 'Taxonomist',null,'VB.AR.55.TAXONOMIST',null,'2',null,null WHERE (select count(1) from aux_role where accessionCode='VB.AR.55.TAXONOMIST')=0; --- only adds data if there is currently none in this table. --- Dou Disable: insert into dba_onerow (dba_onerow_id) select (1) where (select count(1) from dba_onerow)=0; \ No newline at end of file +-- -- only adds data if there is currently none in this table. +-- -- Dou Disable: insert into dba_onerow (dba_onerow_id) select (1) where (select count(1) from dba_onerow)=0; \ No newline at end of file From d3f7b88504600bba8ec4b6f4590975711a34bea9 Mon Sep 17 00:00:00 2001 From: Dou Mok Date: Fri, 23 Aug 2024 17:10:28 -0700 Subject: [PATCH 26/49] Add missing table 'temp_ks_commconcept_acccodelist' and sequence 'dba_preassignacccode_dba_requestnumber_seq' --- migrations/V1.0__vegbank.sql | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/migrations/V1.0__vegbank.sql b/migrations/V1.0__vegbank.sql index 26a530d..1bf9c9e 100644 --- a/migrations/V1.0__vegbank.sql +++ b/migrations/V1.0__vegbank.sql @@ -2601,4 +2601,17 @@ CREATE TABLE dba_dataCache data9 varchar (255), data10 varchar (255) -); \ No newline at end of file +); + +-- DOU: Add Missing Tables + +CREATE TABLE temp_ks_commconcept_acccodelist ( + accessioncode character varying(255) +); + +CREATE SEQUENCE dba_preassignacccode_dba_requestnumber_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; \ No newline at end of file From 6955cc1b0b9665223e00721c8984b6ed55a578da Mon Sep 17 00:00:00 2001 From: Dou Mok Date: Fri, 23 Aug 2024 17:11:56 -0700 Subject: [PATCH 27/49] Add log to 'sql-logs' where successfully loaded all records from data-only dump file with only one exception (hydrologicregime), but unable to apply last constraints migration --- .../vegbank2_psql_output_disable_v1.6.txt | 502 ++++++++++++++++++ 1 file changed, 502 insertions(+) create mode 100644 sql-logs/vegbank2_psql_output_disable_v1.6.txt diff --git a/sql-logs/vegbank2_psql_output_disable_v1.6.txt b/sql-logs/vegbank2_psql_output_disable_v1.6.txt new file mode 100644 index 0000000..5838799 --- /dev/null +++ b/sql-logs/vegbank2_psql_output_disable_v1.6.txt @@ -0,0 +1,502 @@ +The following was added to V1.0__vegbank.sql migration + +CREATE TABLE temp_ks_commconcept_acccodelist ( + accessioncode character varying(255) +); + +CREATE SEQUENCE dba_preassignacccode_dba_requestnumber_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + +--- + +SET +SET +SET +SET +SET + set_config +------------ + +(1 row) + +SET +SET +SET +SET +COPY 4024 +COPY 621 +COPY 21 +COPY 220 +COPY 470 +COPY 31 +COPY 115277 +COPY 261 +COPY 34610 +COPY 21 +psql:/Users/doumok/Code/testing/vegbank_dataonly_20240814.sql:271284: ERROR: value too long for type character varying(30) +CONTEXT: COPY observation, line 147, column hydrologicregime: "non-tidal - intermittently flooded" +COPY 102425 +COPY 48584 +COPY 123701 +COPY 38961 +COPY 39041 +COPY 34377 +COPY 102951 +COPY 0 +COPY 146761 +COPY 398 +COPY 8 +COPY 19 +COPY 19 +COPY 9 +COPY 1 +COPY 2658 +COPY 594 +COPY 866 +COPY 1 +COPY 2233737 +COPY 55 +COPY 114063 +COPY 35 +COPY 49566 +COPY 37531 +COPY 1502 +COPY 0 +COPY 410177 +COPY 44949 +COPY 64563 +COPY 64722 +COPY 0 +COPY 0 +COPY 165021 +COPY 3814 +COPY 0 +COPY 234827 +COPY 450175 +COPY 293172 +COPY 273779 +COPY 131380 +COPY 0 +COPY 931997 +COPY 191 +COPY 0 +COPY 152 +COPY 206 +COPY 39607 +COPY 66900 +COPY 204 +COPY 347097 +COPY 1884790 +COPY 3604899 +COPY 600241 +COPY 8371 +COPY 2526264 +COPY 768 +COPY 404 +COPY 125 +COPY 24099 +COPY 293137 +COPY 1033 +COPY 106 +COPY 578 +COPY 1372162 +COPY 0 +COPY 0 +COPY 0 +COPY 0 +COPY 0 +COPY 0 + setval +-------- + 83465 +(1 row) + + setval +-------- + 55 +(1 row) + + setval +-------- + 53019 +(1 row) + + setval +-------- + 167422 +(1 row) + + setval +-------- + 53849 +(1 row) + + setval +-------- + 34406 +(1 row) + + setval +-------- + 114107 +(1 row) + + setval +-------- + 1 +(1 row) + + setval +-------- + 176530 +(1 row) + + setval +-------- + 53806 +(1 row) + + setval +-------- + 178678 +(1 row) + + setval +-------- + 9864 +(1 row) + + setval +-------- + 1634 +(1 row) + + setval +-------- + 36 +(1 row) + + setval +-------- + 36 +(1 row) + + setval +-------- + 9 +(1 row) + + setval +-------- + 1 +(1 row) + + setval +-------- + 2658 +(1 row) + + setval +-------- + 1782 +(1 row) + + setval +-------- + 2596 +(1 row) + + setval +-------- + 1 +(1 row) + + setval +--------- + 2233737 +(1 row) + + setval +-------- + 1248 +(1 row) + + setval +-------- + 165 +(1 row) + + setval +-------- + 49566 +(1 row) + + setval +-------- + 42135 +(1 row) + + setval +-------- + 1509 +(1 row) + + setval +-------- + 1 +(1 row) + + setval +-------- + 64627 +(1 row) + + setval +-------- + 126301 +(1 row) + + setval +-------- + 1 +(1 row) + + setval +-------- + 1 +(1 row) + + setval +-------- + 206488 +(1 row) + + setval +-------- + 195158 +(1 row) + + setval +-------- + 4639 +(1 row) + + setval +-------- + 199633 +(1 row) + + setval +-------- + 1 +(1 row) + + setval +-------- + 250506 +(1 row) + + setval +-------- + 402424 +(1 row) + + setval +-------- + 131381 +(1 row) + + setval +-------- + 1 +(1 row) + + setval +-------- + 462227 +(1 row) + + setval +-------- + 275371 +(1 row) + + setval +-------- + 933732 +(1 row) + + setval +-------- + 208747 +(1 row) + + setval +-------- + 11129 +(1 row) + + setval +-------- + 6854 +(1 row) + + setval +-------- + 87577 +(1 row) + + setval +-------- + 1 +(1 row) + + setval +-------- + 14610 +(1 row) + + setval +-------- + 222 +(1 row) + + setval +-------- + 14561 +(1 row) + + setval +-------- + 153910 +(1 row) + + setval +-------- + 68564 +(1 row) + + setval +-------- + 35998 +(1 row) + + setval +--------- + 1174914 +(1 row) + + setval +-------- + 35929 +(1 row) + + setval +-------- + 756060 +(1 row) + + setval +-------- + 2084 +(1 row) + + setval +-------- + 218064 +(1 row) + + setval +-------- + 1008 +(1 row) + + setval +--------- + 6320366 +(1 row) + + setval +--------- + 3764529 +(1 row) + + setval +--------- + 3527277 +(1 row) + + setval +-------- + 10181 +(1 row) + + setval +-------- + 1 +(1 row) + + setval +-------- + 1 +(1 row) + + setval +-------- + 131 +(1 row) + + setval +-------- + 203673 +(1 row) + + setval +---------- + 30705768 +(1 row) + + setval +-------- + 20307 +(1 row) + + setval +-------- + 1 +(1 row) + + setval +-------- + 1 +(1 row) + + setval +-------- + 1 +(1 row) + + setval +-------- + 1 +(1 row) + + setval +-------- + 1 +(1 row) + + setval +-------- + 1 +(1 row) + + setval +-------- + 1185 +(1 row) + From 934e2cd67202b0808346bca3e120c42f3d9c54f9 Mon Sep 17 00:00:00 2001 From: Dou Mok Date: Fri, 23 Aug 2024 17:12:56 -0700 Subject: [PATCH 28/49] Move sql-logs and sql-transformations folder into new parent directory 'sql' --- {sql-logs => sql/sql-logs}/vegbank2_psql_output.txt | 0 {sql-logs => sql/sql-logs}/vegbank2_psql_output_disable_v1.6.txt | 0 {sql-transformations => sql/sql-transformations}/INSTALL.md | 0 .../sql-transformations}/VegBankModel2SQL.xsl | 0 .../sql-transformations}/addCoverCodeToTaxImportance.sql | 0 .../sql-transformations}/addInterpFldsToObs.sql | 0 .../sql-transformations}/addObsSynDenorm.sql | 0 .../sql-transformations}/addTaxonObsDenormPlantNames.sql | 0 .../sql-transformations}/addTop5SppToObs_denormFlds.sql | 0 .../sql-transformations}/add_currentaccepted_toconcept.sql | 0 .../sql-transformations}/add_requestAccCodeTblFields.sql | 0 {sql-transformations => sql/sql-transformations}/csvtools.xsl | 0 .../sql-transformations}/db_model_vegbank.xml | 0 .../sql-transformations}/db_model_vegbank_updateSQLFileList.txt | 0 .../sql-transformations}/dbmodel-to-ddtables.xsl | 0 {sql-transformations => sql/sql-transformations}/getvegbanksql.sh | 0 .../sql-transformations}/getvegbanksql_datadictionary.sh | 0 .../sql-transformations}/throwAways/add_datasetItem_denorms.sql | 0 .../throwAways/alterTaxObsDenormRenameSciNameToFull.sql | 0 .../sql-transformations}/throwAways/createTable_dba_stats.sql | 0 20 files changed, 0 insertions(+), 0 deletions(-) rename {sql-logs => sql/sql-logs}/vegbank2_psql_output.txt (100%) rename {sql-logs => sql/sql-logs}/vegbank2_psql_output_disable_v1.6.txt (100%) rename {sql-transformations => sql/sql-transformations}/INSTALL.md (100%) rename {sql-transformations => sql/sql-transformations}/VegBankModel2SQL.xsl (100%) rename {sql-transformations => sql/sql-transformations}/addCoverCodeToTaxImportance.sql (100%) rename {sql-transformations => sql/sql-transformations}/addInterpFldsToObs.sql (100%) rename {sql-transformations => sql/sql-transformations}/addObsSynDenorm.sql (100%) rename {sql-transformations => sql/sql-transformations}/addTaxonObsDenormPlantNames.sql (100%) rename {sql-transformations => sql/sql-transformations}/addTop5SppToObs_denormFlds.sql (100%) rename {sql-transformations => sql/sql-transformations}/add_currentaccepted_toconcept.sql (100%) rename {sql-transformations => sql/sql-transformations}/add_requestAccCodeTblFields.sql (100%) rename {sql-transformations => sql/sql-transformations}/csvtools.xsl (100%) rename {sql-transformations => sql/sql-transformations}/db_model_vegbank.xml (100%) rename {sql-transformations => sql/sql-transformations}/db_model_vegbank_updateSQLFileList.txt (100%) rename {sql-transformations => sql/sql-transformations}/dbmodel-to-ddtables.xsl (100%) rename {sql-transformations => sql/sql-transformations}/getvegbanksql.sh (100%) rename {sql-transformations => sql/sql-transformations}/getvegbanksql_datadictionary.sh (100%) rename {sql-transformations => sql/sql-transformations}/throwAways/add_datasetItem_denorms.sql (100%) rename {sql-transformations => sql/sql-transformations}/throwAways/alterTaxObsDenormRenameSciNameToFull.sql (100%) rename {sql-transformations => sql/sql-transformations}/throwAways/createTable_dba_stats.sql (100%) diff --git a/sql-logs/vegbank2_psql_output.txt b/sql/sql-logs/vegbank2_psql_output.txt similarity index 100% rename from sql-logs/vegbank2_psql_output.txt rename to sql/sql-logs/vegbank2_psql_output.txt diff --git a/sql-logs/vegbank2_psql_output_disable_v1.6.txt b/sql/sql-logs/vegbank2_psql_output_disable_v1.6.txt similarity index 100% rename from sql-logs/vegbank2_psql_output_disable_v1.6.txt rename to sql/sql-logs/vegbank2_psql_output_disable_v1.6.txt diff --git a/sql-transformations/INSTALL.md b/sql/sql-transformations/INSTALL.md similarity index 100% rename from sql-transformations/INSTALL.md rename to sql/sql-transformations/INSTALL.md diff --git a/sql-transformations/VegBankModel2SQL.xsl b/sql/sql-transformations/VegBankModel2SQL.xsl similarity index 100% rename from sql-transformations/VegBankModel2SQL.xsl rename to sql/sql-transformations/VegBankModel2SQL.xsl diff --git a/sql-transformations/addCoverCodeToTaxImportance.sql b/sql/sql-transformations/addCoverCodeToTaxImportance.sql similarity index 100% rename from sql-transformations/addCoverCodeToTaxImportance.sql rename to sql/sql-transformations/addCoverCodeToTaxImportance.sql diff --git a/sql-transformations/addInterpFldsToObs.sql b/sql/sql-transformations/addInterpFldsToObs.sql similarity index 100% rename from sql-transformations/addInterpFldsToObs.sql rename to sql/sql-transformations/addInterpFldsToObs.sql diff --git a/sql-transformations/addObsSynDenorm.sql b/sql/sql-transformations/addObsSynDenorm.sql similarity index 100% rename from sql-transformations/addObsSynDenorm.sql rename to sql/sql-transformations/addObsSynDenorm.sql diff --git a/sql-transformations/addTaxonObsDenormPlantNames.sql b/sql/sql-transformations/addTaxonObsDenormPlantNames.sql similarity index 100% rename from sql-transformations/addTaxonObsDenormPlantNames.sql rename to sql/sql-transformations/addTaxonObsDenormPlantNames.sql diff --git a/sql-transformations/addTop5SppToObs_denormFlds.sql b/sql/sql-transformations/addTop5SppToObs_denormFlds.sql similarity index 100% rename from sql-transformations/addTop5SppToObs_denormFlds.sql rename to sql/sql-transformations/addTop5SppToObs_denormFlds.sql diff --git a/sql-transformations/add_currentaccepted_toconcept.sql b/sql/sql-transformations/add_currentaccepted_toconcept.sql similarity index 100% rename from sql-transformations/add_currentaccepted_toconcept.sql rename to sql/sql-transformations/add_currentaccepted_toconcept.sql diff --git a/sql-transformations/add_requestAccCodeTblFields.sql b/sql/sql-transformations/add_requestAccCodeTblFields.sql similarity index 100% rename from sql-transformations/add_requestAccCodeTblFields.sql rename to sql/sql-transformations/add_requestAccCodeTblFields.sql diff --git a/sql-transformations/csvtools.xsl b/sql/sql-transformations/csvtools.xsl similarity index 100% rename from sql-transformations/csvtools.xsl rename to sql/sql-transformations/csvtools.xsl diff --git a/sql-transformations/db_model_vegbank.xml b/sql/sql-transformations/db_model_vegbank.xml similarity index 100% rename from sql-transformations/db_model_vegbank.xml rename to sql/sql-transformations/db_model_vegbank.xml diff --git a/sql-transformations/db_model_vegbank_updateSQLFileList.txt b/sql/sql-transformations/db_model_vegbank_updateSQLFileList.txt similarity index 100% rename from sql-transformations/db_model_vegbank_updateSQLFileList.txt rename to sql/sql-transformations/db_model_vegbank_updateSQLFileList.txt diff --git a/sql-transformations/dbmodel-to-ddtables.xsl b/sql/sql-transformations/dbmodel-to-ddtables.xsl similarity index 100% rename from sql-transformations/dbmodel-to-ddtables.xsl rename to sql/sql-transformations/dbmodel-to-ddtables.xsl diff --git a/sql-transformations/getvegbanksql.sh b/sql/sql-transformations/getvegbanksql.sh similarity index 100% rename from sql-transformations/getvegbanksql.sh rename to sql/sql-transformations/getvegbanksql.sh diff --git a/sql-transformations/getvegbanksql_datadictionary.sh b/sql/sql-transformations/getvegbanksql_datadictionary.sh similarity index 100% rename from sql-transformations/getvegbanksql_datadictionary.sh rename to sql/sql-transformations/getvegbanksql_datadictionary.sh diff --git a/sql-transformations/throwAways/add_datasetItem_denorms.sql b/sql/sql-transformations/throwAways/add_datasetItem_denorms.sql similarity index 100% rename from sql-transformations/throwAways/add_datasetItem_denorms.sql rename to sql/sql-transformations/throwAways/add_datasetItem_denorms.sql diff --git a/sql-transformations/throwAways/alterTaxObsDenormRenameSciNameToFull.sql b/sql/sql-transformations/throwAways/alterTaxObsDenormRenameSciNameToFull.sql similarity index 100% rename from sql-transformations/throwAways/alterTaxObsDenormRenameSciNameToFull.sql rename to sql/sql-transformations/throwAways/alterTaxObsDenormRenameSciNameToFull.sql diff --git a/sql-transformations/throwAways/createTable_dba_stats.sql b/sql/sql-transformations/throwAways/createTable_dba_stats.sql similarity index 100% rename from sql-transformations/throwAways/createTable_dba_stats.sql rename to sql/sql-transformations/throwAways/createTable_dba_stats.sql From d7e7c75bbcb178656293c1426ff1ddf0bc9622ec Mon Sep 17 00:00:00 2001 From: Dou Mok Date: Sat, 24 Aug 2024 09:36:25 -0700 Subject: [PATCH 29/49] Revise 'V1.0' migration observation table's hydrologicRegime varchar to 50 --- migrations/V1.0__vegbank.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/migrations/V1.0__vegbank.sql b/migrations/V1.0__vegbank.sql index 1bf9c9e..72829bb 100644 --- a/migrations/V1.0__vegbank.sql +++ b/migrations/V1.0__vegbank.sql @@ -989,7 +989,7 @@ CREATE TABLE observation successionalStatus text, numberOfTaxa Integer, basalArea Float, - hydrologicRegime varchar (30), + hydrologicRegime varchar (50), soilMoistureRegime varchar (30), soilDrainage varchar (30), waterSalinity varchar (30), From 203ce2fccc43c5b2d65abfad975bdb3e037b47d6 Mon Sep 17 00:00:00 2001 From: Dou Mok Date: Sat, 24 Aug 2024 09:39:06 -0700 Subject: [PATCH 30/49] Revise 'V1.0' migration observation table's hydrologicRegime varchar to 255 --- migrations/V1.0__vegbank.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/migrations/V1.0__vegbank.sql b/migrations/V1.0__vegbank.sql index 72829bb..8abdbd7 100644 --- a/migrations/V1.0__vegbank.sql +++ b/migrations/V1.0__vegbank.sql @@ -989,7 +989,7 @@ CREATE TABLE observation successionalStatus text, numberOfTaxa Integer, basalArea Float, - hydrologicRegime varchar (50), + hydrologicRegime varchar (255), soilMoistureRegime varchar (30), soilDrainage varchar (30), waterSalinity varchar (30), From 21ceaba2de117e354383130732e73400816be514 Mon Sep 17 00:00:00 2001 From: Dou Mok Date: Sat, 24 Aug 2024 09:41:16 -0700 Subject: [PATCH 31/49] Add note into 'V1.6' migrations file to clarify why this migration has been commented out/disabled --- migrations/V1.6__vegbank_populate_configtables.sql | 2 ++ 1 file changed, 2 insertions(+) diff --git a/migrations/V1.6__vegbank_populate_configtables.sql b/migrations/V1.6__vegbank_populate_configtables.sql index 9b447e1..3d73c91 100644 --- a/migrations/V1.6__vegbank_populate_configtables.sql +++ b/migrations/V1.6__vegbank_populate_configtables.sql @@ -1,3 +1,5 @@ +-- NOTE 20240824 +-- This migrations file has been disabled as the data-only dump file will populate these config tables -- ------------------------------------------------------------------------------------------ -- ---- THIS FILE ASSUMES THAT THE MODEL HAS BEEN COMPLETELY BUILT From a10247dcfb7490263cf56d029c85a18c9c8d1ca4 Mon Sep 17 00:00:00 2001 From: Dou Mok Date: Sat, 24 Aug 2024 09:49:18 -0700 Subject: [PATCH 32/49] Remove redundant sequence creation for 'dba_preassignacccode_dba_requestnumber_seq' in 'V1.12' migrations, which was re-added previously into 'V1.0' migration --- migrations/V1.12__add_constraints.sql | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/migrations/V1.12__add_constraints.sql b/migrations/V1.12__add_constraints.sql index 825928a..863133a 100644 --- a/migrations/V1.12__add_constraints.sql +++ b/migrations/V1.12__add_constraints.sql @@ -877,7 +877,4 @@ ALTER TABLE userRecordOwner --CREATE ANY NAMED SEQUENCES: - -- - - - CREATE SEQUENCE dba_preassignacccode_dba_requestnumber_seq ; \ No newline at end of file + -- \ No newline at end of file From a85bcd4cc3f48ac29468b3ff8bd5b4824ea958ee Mon Sep 17 00:00:00 2001 From: Dou Mok Date: Sat, 24 Aug 2024 10:02:28 -0700 Subject: [PATCH 33/49] Rename sql-log files --- ..._output.txt => 1_vegbank2_psql_output.txt} | 0 ...> 2_vegbank2_psql_output_disable_v1.6.txt} | 0 ...k2_psql_output_hydrologicregime_update.txt | 489 ++++++++++++++++++ 3 files changed, 489 insertions(+) rename sql/sql-logs/{vegbank2_psql_output.txt => 1_vegbank2_psql_output.txt} (100%) rename sql/sql-logs/{vegbank2_psql_output_disable_v1.6.txt => 2_vegbank2_psql_output_disable_v1.6.txt} (100%) create mode 100644 sql/sql-logs/3_vegbank2_psql_output_hydrologicregime_update.txt diff --git a/sql/sql-logs/vegbank2_psql_output.txt b/sql/sql-logs/1_vegbank2_psql_output.txt similarity index 100% rename from sql/sql-logs/vegbank2_psql_output.txt rename to sql/sql-logs/1_vegbank2_psql_output.txt diff --git a/sql/sql-logs/vegbank2_psql_output_disable_v1.6.txt b/sql/sql-logs/2_vegbank2_psql_output_disable_v1.6.txt similarity index 100% rename from sql/sql-logs/vegbank2_psql_output_disable_v1.6.txt rename to sql/sql-logs/2_vegbank2_psql_output_disable_v1.6.txt diff --git a/sql/sql-logs/3_vegbank2_psql_output_hydrologicregime_update.txt b/sql/sql-logs/3_vegbank2_psql_output_hydrologicregime_update.txt new file mode 100644 index 0000000..c7fe7dd --- /dev/null +++ b/sql/sql-logs/3_vegbank2_psql_output_hydrologicregime_update.txt @@ -0,0 +1,489 @@ +This was produced after altering the 'hydrologicregime' column with a longer varchar length + + +SET +SET +SET +SET +SET + set_config +------------ + +(1 row) + +SET +SET +SET +SET +COPY 4024 +COPY 621 +COPY 21 +COPY 220 +COPY 470 +COPY 31 +COPY 115277 +COPY 261 +COPY 34610 +COPY 21 +COPY 115624 +COPY 102425 +COPY 48584 +COPY 123701 +COPY 38961 +COPY 39041 +COPY 34377 +COPY 102951 +COPY 0 +COPY 146761 +COPY 398 +COPY 8 +COPY 19 +COPY 19 +COPY 9 +COPY 1 +COPY 2658 +COPY 594 +COPY 866 +COPY 1 +COPY 2233737 +COPY 55 +COPY 114063 +COPY 35 +COPY 49566 +COPY 37531 +COPY 1502 +COPY 0 +COPY 410177 +COPY 44949 +COPY 64563 +COPY 64722 +COPY 0 +COPY 0 +COPY 165021 +COPY 3814 +COPY 0 +COPY 234827 +COPY 450175 +COPY 293172 +COPY 273779 +COPY 131380 +COPY 0 +COPY 931997 +COPY 191 +COPY 0 +COPY 152 +COPY 206 +COPY 39607 +COPY 66900 +COPY 204 +COPY 347097 +COPY 1884790 +COPY 3604899 +COPY 600241 +COPY 8371 +COPY 2526264 +COPY 768 +COPY 404 +COPY 125 +COPY 24099 +COPY 293137 +COPY 1033 +COPY 106 +COPY 578 +COPY 1372162 +COPY 0 +COPY 0 +COPY 0 +COPY 0 +COPY 0 +COPY 0 + setval +-------- + 83465 +(1 row) + + setval +-------- + 55 +(1 row) + + setval +-------- + 53019 +(1 row) + + setval +-------- + 167422 +(1 row) + + setval +-------- + 53849 +(1 row) + + setval +-------- + 34406 +(1 row) + + setval +-------- + 114107 +(1 row) + + setval +-------- + 1 +(1 row) + + setval +-------- + 176530 +(1 row) + + setval +-------- + 53806 +(1 row) + + setval +-------- + 178678 +(1 row) + + setval +-------- + 9864 +(1 row) + + setval +-------- + 1634 +(1 row) + + setval +-------- + 36 +(1 row) + + setval +-------- + 36 +(1 row) + + setval +-------- + 9 +(1 row) + + setval +-------- + 1 +(1 row) + + setval +-------- + 2658 +(1 row) + + setval +-------- + 1782 +(1 row) + + setval +-------- + 2596 +(1 row) + + setval +-------- + 1 +(1 row) + + setval +--------- + 2233737 +(1 row) + + setval +-------- + 1248 +(1 row) + + setval +-------- + 165 +(1 row) + + setval +-------- + 49566 +(1 row) + + setval +-------- + 42135 +(1 row) + + setval +-------- + 1509 +(1 row) + + setval +-------- + 1 +(1 row) + + setval +-------- + 64627 +(1 row) + + setval +-------- + 126301 +(1 row) + + setval +-------- + 1 +(1 row) + + setval +-------- + 1 +(1 row) + + setval +-------- + 206488 +(1 row) + + setval +-------- + 195158 +(1 row) + + setval +-------- + 4639 +(1 row) + + setval +-------- + 199633 +(1 row) + + setval +-------- + 1 +(1 row) + + setval +-------- + 250506 +(1 row) + + setval +-------- + 402424 +(1 row) + + setval +-------- + 131381 +(1 row) + + setval +-------- + 1 +(1 row) + + setval +-------- + 462227 +(1 row) + + setval +-------- + 275371 +(1 row) + + setval +-------- + 933732 +(1 row) + + setval +-------- + 208747 +(1 row) + + setval +-------- + 11129 +(1 row) + + setval +-------- + 6854 +(1 row) + + setval +-------- + 87577 +(1 row) + + setval +-------- + 1 +(1 row) + + setval +-------- + 14610 +(1 row) + + setval +-------- + 222 +(1 row) + + setval +-------- + 14561 +(1 row) + + setval +-------- + 153910 +(1 row) + + setval +-------- + 68564 +(1 row) + + setval +-------- + 35998 +(1 row) + + setval +--------- + 1174914 +(1 row) + + setval +-------- + 35929 +(1 row) + + setval +-------- + 756060 +(1 row) + + setval +-------- + 2084 +(1 row) + + setval +-------- + 218064 +(1 row) + + setval +-------- + 1008 +(1 row) + + setval +--------- + 6320366 +(1 row) + + setval +--------- + 3764529 +(1 row) + + setval +--------- + 3527277 +(1 row) + + setval +-------- + 10181 +(1 row) + + setval +-------- + 1 +(1 row) + + setval +-------- + 1 +(1 row) + + setval +-------- + 131 +(1 row) + + setval +-------- + 203673 +(1 row) + + setval +---------- + 30705768 +(1 row) + + setval +-------- + 20307 +(1 row) + + setval +-------- + 1 +(1 row) + + setval +-------- + 1 +(1 row) + + setval +-------- + 1 +(1 row) + + setval +-------- + 1 +(1 row) + + setval +-------- + 1 +(1 row) + + setval +-------- + 1 +(1 row) + + setval +-------- + 1185 +(1 row) + From ab7240de36d8b7622c78a66fe8311f1e61f898e0 Mon Sep 17 00:00:00 2001 From: Dou Mok Date: Sat, 24 Aug 2024 10:56:11 -0700 Subject: [PATCH 34/49] Rename 'INSTALL.md' in sql-transformations to 'README', revise content, and revise output file name from --- .../{INSTALL.md => README.md} | 28 +++++++++++++------ sql/sql-transformations/getvegbanksql.sh | 2 +- 2 files changed, 21 insertions(+), 9 deletions(-) rename sql/sql-transformations/{INSTALL.md => README.md} (63%) diff --git a/sql/sql-transformations/INSTALL.md b/sql/sql-transformations/README.md similarity index 63% rename from sql/sql-transformations/INSTALL.md rename to sql/sql-transformations/README.md index 13a108b..6f3f09c 100644 --- a/sql/sql-transformations/INSTALL.md +++ b/sql/sql-transformations/README.md @@ -1,11 +1,13 @@ -# VegBank PostGres Migration Notes +# VegBank PostGres Migration Notes (How the migration files were generated) -This install document outlines how to generate the Vegbank schema from scratch to reproduce the migration files found in `/migrations` +This README document outlines the process taken to generate the Vegbank schema from scratch to reproduce the migration files found in `/migrations`, along with the modifications made to get everything in sync. -## Step 1: 0_vegbank.sql +## Step 1: V1.0__vegbank.sql -This is the first migration sql file to create the relations. -Run the following bash script in 'sql-transformations': +This first migration SQL produced - it contains all the tables/relations needed for a data-only insert. It also +includes the alter table commands to apply foreign key constraints. These constraints will cause issues with loading data, so those commands have been moved to a new migration file `V1.12__add_constraints.sql`. which is to be applied after the data has been copied after migrating to `V1.11__populate_datadictionary`. + +To generate this initial file, run the following bash script in 'sql-transformations': ```sh ./getvegbanksql.sh ``` @@ -97,9 +99,13 @@ When reviewing Vegbank's 'db_model_vegbank.xml', there appears to be specific up ## Step 2: The remaining migrations -The other migration sqls (Steps 1 to 8) were obtained by following the 'build.xml' structure in the [Vegbank repo](https://github.com/NCEAS/vegbank/). +The other migration sqls were obtained by following the 'build.xml' structure in the [Vegbank repo](https://github.com/NCEAS/vegbank/). These files have also been named for consistency to follow `flyway` best practices. -Note - the migration files have been renamed for consistency. There also exists SQL code within these files that cause a flyway migration failure - so these files have been amended accordingly (ex. DROP VIEW -> DROP VIEW IF EXISTS) +Notes: +- There also exists SQL code within these files that cause a flyway migration failure - so these files have been amended accordingly (ex. DROP VIEW -> DROP VIEW IF EXISTS), namely in V1.3, V1.4, V1.5 +- I also added an additional migration file (V1.8) to drop views before creating them again to ensure consistency +- In V1.6, all commands were disabled as the config tables were already being populated through the data-only dump file. +- During the testing process, an additional table was also added to V1.0 which was necessary (missing): `temp_ks_commconcept_acccodelist` ## Step 3: Populating the Data Dictionary @@ -109,4 +115,10 @@ Run the following to create the relevant 'populate-datadictionary.sql' sql file. ```sh ./getvegbanksql_datadictionary.sh -``` \ No newline at end of file +``` + +## Step 4: Applying constraints + +In order to load a data-only postgres dump file, we need to remove the foreign key constraints. This is why the constraints SQL was extracted from `V1.0__vegbank.sql` and moved to its own migration file `V1.12__add_constraints.sql`, which is to be applied AFTER the data-only dump file has been loaded. + +This also means that when setting up postgres, and applying migrations, the target should first be V1.11, then the data dump, then the V1.12 execution. \ No newline at end of file diff --git a/sql/sql-transformations/getvegbanksql.sh b/sql/sql-transformations/getvegbanksql.sh index 9cfc66a..94ce221 100755 --- a/sql/sql-transformations/getvegbanksql.sh +++ b/sql/sql-transformations/getvegbanksql.sh @@ -3,7 +3,7 @@ # Define the input and output file names INPUT_XML="db_model_vegbank.xml" STYLESHEET_XSL="VegBankModel2SQL.xsl" -OUTPUT_SQL="vegbank.sql" +OUTPUT_SQL="V1.0__vegbank.sql" # Confirm input XML file exists if [ ! -f "$INPUT_XML" ]; then From 0cc1d4b00065bad11bd3257d385a5159e6a58ce7 Mon Sep 17 00:00:00 2001 From: Dou Mok Date: Sat, 24 Aug 2024 11:14:27 -0700 Subject: [PATCH 35/49] Add README.md --- sql/sql-transformations/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sql/sql-transformations/README.md b/sql/sql-transformations/README.md index 6f3f09c..b68851f 100644 --- a/sql/sql-transformations/README.md +++ b/sql/sql-transformations/README.md @@ -1,6 +1,6 @@ # VegBank PostGres Migration Notes (How the migration files were generated) -This README document outlines the process taken to generate the Vegbank schema from scratch to reproduce the migration files found in `/migrations`, along with the modifications made to get everything in sync. +This README document outlines the process taken to generate the Vegbank schema from scratch to reproduce the migration files found in `/migrations`, along with the modifications made to get everything in sync. This document is meant to provide context, not the concrete steps to set-up postgres from scratch and migrate to the latest version. ## Step 1: V1.0__vegbank.sql From 645ef293f8126e117837c7ecce8ad2fd544b5753 Mon Sep 17 00:00:00 2001 From: Dou Mok Date: Sat, 24 Aug 2024 12:04:36 -0700 Subject: [PATCH 36/49] Add new 'INSTALL.md' document in repo root to describe how to successfully restore vegbank's postgres from a data-only dump file with the existing migrations --- INSTALL.md | 427 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 427 insertions(+) create mode 100644 INSTALL.md diff --git a/INSTALL.md b/INSTALL.md new file mode 100644 index 0000000..c219c38 --- /dev/null +++ b/INSTALL.md @@ -0,0 +1,427 @@ +# Introduction + +This install document describes how to restore the Vegbank database from a data-only dump file. + +# Local Development Installation (Postgres 10.23, MacOS M2) + +// TODO: Automate as much of this process as possible with a bash script + +Requirements: +- Postgres.app with PostgreSQL 10 – 15 (Universal/Intel) + - https://postgresapp.com/downloads_legacy.html +- Flyway CLI + - https://documentation.red-gate.com/fd/command-line-184127404.html + +Step 1: + +Install the `postgres.app` and launch a Postgres 10.23 server. + +Step 2: + +Access the postgres server via `psql`, and create a new vegbank db and roles: + +``` +CREATE ROLE vegbank WITH LOGIN PASSWORD 'vegbank'; +CREATE DATABASE vegbank +WITH + ENCODING = 'UTF8' + LC_COLLATE = 'en_US.UTF-8' + LC_CTYPE = 'en_US.UTF-8'; +GRANT ALL PRIVILEGES ON DATABASE vegbank TO vegbank; +``` + +Step 3: + +Take the `flyway.conf` file and move it into your local flyway `conf` installation. Ensure that the contents match the location of the `/migrations` folder found in the directory where this `vegbank2` repo exists. For example: + +``` +// ex. /Users/doumok/Code/flyway-10.17.0/conf/flyway.conf +flyway.url=jdbc:postgresql://localhost:5432/vegbank2 +flyway.user=vegbank +flyway.password=vegbank +flyway.locations=filesystem:/Users/doumok/Code/vegbank2/migrations +``` + +Step 4: + +Run the following command to apply migrations up until `V1.11__populate_datadictionary` + +``` +flyway -target=1.11 migrate +``` + +Step 5: + +Execute the data-only dump file: + +``` +psql -U doumok -d vegbank2 -f /Users/doumok/Code/testing/vegbank_dataonly_20240814.sql + +// The following command will place the output into a txt file of in the directory of your choice +psql -U doumok -d vegbank2 -f /Users/doumok/Code/testing/vegbank_dataonly_20240814.sql > /your/desired/dir/vegbank2_psql_output.txt 2>&1 +``` + +If you don't have a dump file, you can get one by asking a sys admin for `vegbank` to provide you with one via the following command: + +``` +postgres@vegbank:~/dumps$ pg_dump -d vegbank --data-only -f vegbank_dataonly_[YYMMDD].sq +``` + +Step 6: + +Finish the migration: + +``` +flyway migrate +``` + +An example of the full process on my local terminal for added context: + +```sh +doumok@Dou-NCEAS-MBP14 ~ % psql +psql (14.11 (Homebrew), server 10.23) +Type "help" for help. + +doumok=# DROP DATABASE IF EXISTS vegbank2; +DROP DATABASE +doumok=# CREATE ROLE vegbank WITH LOGIN PASSWORD 'vegbank'; +doumok=# CREATE DATABASE vegbank2 +WITH + ENCODING = 'UTF8' + LC_COLLATE = 'en_US.UTF-8' + LC_CTYPE = 'en_US.UTF-8'; +CREATE DATABASE +doumok=# GRANT ALL PRIVILEGES ON DATABASE vegbank TO vegbank; +doumok=# +\q +doumok@Dou-NCEAS-MBP14 ~ % flyway -target=1.11 migrate +A more recent version of Flyway is available. Find out more about Flyway 10.17.2 at https://rd.gt/3rXiSlV + +Flyway Community Edition 10.17.0 by Redgate + +See release notes here: https://rd.gt/416ObMi +Database: jdbc:postgresql://localhost:5432/vegbank2 (PostgreSQL 10.23) +Schema history table "public"."flyway_schema_history" does not exist yet +Successfully validated 13 migrations (execution time 00:00.071s) +Creating Schema History table "public"."flyway_schema_history" ... +Current version of schema "public": << Empty Schema >> +Migrating schema "public" to version "1.0 - vegbank" +Migrating schema "public" to version "1.1 - create aggregrates" +Migrating schema "public" to version "1.2 - create extras" +Migrating schema "public" to version "1.3 - create indices" +DB: index "plantusage_plantname_x" does not exist, skipping +DB: index "plantusage_plantname_id_x" does not exist, skipping +DB: index "plantusage_plantconcept_id_x" does not exist, skipping +DB: index "plantusage_classsystem_x" does not exist, skipping +DB: index "plantusage_party_id_x" does not exist, skipping +DB: index "plantusage_plantstatus_id_x" does not exist, skipping +DB: index "plantname_plantname_x" does not exist, skipping +DB: index "plantname_reference_id_x" does not exist, skipping +DB: index "plantconcept_plantname_id_x" does not exist, skipping +DB: index "plantconcept_reference_id_x" does not exist, skipping +DB: index "plantconcept_dobscount_x" does not exist, skipping +DB: index "plantstatus_plantlevel_x" does not exist, skipping +DB: index "plantstatus_plantconcept_id_x" does not exist, skipping +DB: index "plantstatus_reference_id_x" does not exist, skipping +DB: index "plantstatus_plantparent_id_x" does not exist, skipping +DB: index "plantstatus_party_id_x" does not exist, skipping +DB: index "userregionalexp_usercertification_id_x" does not exist, skipping +DB: index "userdatasetitem_userdataset_id_x" does not exist, skipping +DB: index "userdataset_usr_id_x" does not exist, skipping +DB: index "usernotify_usr_id_x" does not exist, skipping +DB: index "embargo_plot_id_x" does not exist, skipping +DB: index "userpermission_embargo_id_x" does not exist, skipping +DB: index "userpermission_usr_id_x" does not exist, skipping +DB: index "userquery_usr_id_x" does not exist, skipping +DB: index "userpreference_usr_id_x" does not exist, skipping +DB: index "userrecordowner_usr_id_x" does not exist, skipping +DB: index "usr_party_id_x" does not exist, skipping +DB: index "covermethod_reference_id_x" does not exist, skipping +DB: index "stratummethod_reference_id_x" does not exist, skipping +DB: index "usercertification_usr_id_x" does not exist, skipping +DB: index "stratum_observation_id_x" does not exist, skipping +DB: index "stratum_stratumtype_id_x" does not exist, skipping +DB: index "stratum_stratummethod_id_x" does not exist, skipping +DB: index "stemlocation_stemcount_id_x" does not exist, skipping +DB: index "observation_previousobs_id_x" does not exist, skipping +DB: index "observation_plot_id_x" does not exist, skipping +DB: index "observation_project_id_x" does not exist, skipping +DB: index "observation_covermethod_id_x" does not exist, skipping +DB: index "observation_stratummethod_id_x" does not exist, skipping +DB: index "observation_soiltaxon_id_x" does not exist, skipping +DB: index "taxonobservation_observation_id_x" does not exist, skipping +DB: index "taxonobservation_reference_id_x" does not exist, skipping +DB: index "reference_referencejournal_id_x" does not exist, skipping +DB: index "taxoninterpretation_taxonobservation_id_x" does not exist, skipping +DB: index "taxoninterpretation_stemlocation_id_x" does not exist, skipping +DB: index "taxoninterpretation_plantconcept_id_x" does not exist, skipping +DB: index "taxoninterpretation_plantname_id_x" does not exist, skipping +DB: index "taxoninterpretation_party_id_x" does not exist, skipping +DB: index "taxoninterpretation_role_id_x" does not exist, skipping +DB: index "taxoninterpretation_reference_id_x" does not exist, skipping +DB: index "taxoninterpretation_collector_id_x" does not exist, skipping +DB: index "taxoninterpretation_museum_id_x" does not exist, skipping +DB: index "taxonalt_taxoninterpretation_id_x" does not exist, skipping +DB: index "taxonalt_plantconcept_id_x" does not exist, skipping +DB: index "telephone_party_id_x" does not exist, skipping +DB: index "plot_reference_id_x" does not exist, skipping +DB: index "plot_parent_id_x" does not exist, skipping +DB: index "party_currentname_id_x" does not exist, skipping +DB: index "place_plot_id_x" does not exist, skipping +DB: index "place_namedplace_id_x" does not exist, skipping +DB: index "namedplace_reference_id_x" does not exist, skipping +DB: index "projectcontributor_project_id_x" does not exist, skipping +DB: index "projectcontributor_party_id_x" does not exist, skipping +DB: index "projectcontributor_role_id_x" does not exist, skipping +DB: index "revision_previousrevision_id_x" does not exist, skipping +DB: index "soilobs_observation_id_x" does not exist, skipping +DB: index "soiltaxon_soilparent_id_x" does not exist, skipping +DB: index "stemcount_taxonimportance_id_x" does not exist, skipping +DB: index "stratumtype_stratummethod_id_x" does not exist, skipping +DB: index "taxonimportance_taxonobservation_id_x" does not exist, skipping +DB: index "taxonimportance_stratum_id_x" does not exist, skipping +DB: index "observationcontributor_observation_id_x" does not exist, skipping +DB: index "observationcontributor_party_id_x" does not exist, skipping +DB: index "observationcontributor_role_id_x" does not exist, skipping +DB: index "observationsynonym_synonymobservation_id_x" does not exist, skipping +DB: index "observationsynonym_primaryobservation_id_x" does not exist, skipping +DB: index "observationsynonym_party_id_x" does not exist, skipping +DB: index "observationsynonym_role_id_x" does not exist, skipping +DB: index "partymember_parentparty_id_x" does not exist, skipping +DB: index "partymember_childparty_id_x" does not exist, skipping +DB: index "partymember_role_id_x" does not exist, skipping +DB: index "referenceparty_currentparty_id_x" does not exist, skipping +DB: index "classcontributor_commclass_id_x" does not exist, skipping +DB: index "classcontributor_party_id_x" does not exist, skipping +DB: index "classcontributor_role_id_x" does not exist, skipping +DB: index "commclass_observation_id_x" does not exist, skipping +DB: index "commclass_classpublication_id_x" does not exist, skipping +DB: index "commconcept_commname_id_x" does not exist, skipping +DB: index "commconcept_reference_id_x" does not exist, skipping +DB: index "commconcept_dobscount_x" does not exist, skipping +DB: index "comminterpretation_commclass_id_x" does not exist, skipping +DB: index "comminterpretation_commconcept_id_x" does not exist, skipping +DB: index "comminterpretation_commauthority_id_x" does not exist, skipping +DB: index "coverindex_covermethod_id_x" does not exist, skipping +DB: index "definedvalue_userdefined_id_x" does not exist, skipping +DB: index "disturbanceobs_observation_id_x" does not exist, skipping +DB: index "graphic_observation_id_x" does not exist, skipping +DB: index "note_notelink_id_x" does not exist, skipping +DB: index "note_party_id_x" does not exist, skipping +DB: index "note_role_id_x" does not exist, skipping +DB: index "plantlineage_childplantstatus_id_x" does not exist, skipping +DB: index "plantlineage_parentplantstatus_id_x" does not exist, skipping +DB: index "address_party_id_x" does not exist, skipping +DB: index "address_organization_id_x" does not exist, skipping +DB: index "referencealtident_reference_id_x" does not exist, skipping +DB: index "referencecontributor_reference_id_x" does not exist, skipping +DB: index "referencecontributor_referenceparty_id_x" does not exist, skipping +DB: index "commcorrelation_commstatus_id_x" does not exist, skipping +DB: index "commcorrelation_commconcept_id_x" does not exist, skipping +DB: index "commlineage_parentcommstatus_id_x" does not exist, skipping +DB: index "commlineage_childcommstatus_id_x" does not exist, skipping +DB: index "commname_reference_id_x" does not exist, skipping +DB: index "commusage_commname_id_x" does not exist, skipping +DB: index "commusage_commconcept_id_x" does not exist, skipping +DB: index "commusage_party_id_x" does not exist, skipping +DB: index "commusage_commstatus_id_x" does not exist, skipping +DB: index "commusage_commname_x" does not exist, skipping +DB: index "commusage_classsystem_x" does not exist, skipping +DB: index "commstatus_commconcept_id_x" does not exist, skipping +DB: index "commstatus_reference_id_x" does not exist, skipping +DB: index "commstatus_commparent_id_x" does not exist, skipping +DB: index "commstatus_party_id_x" does not exist, skipping +DB: index "commstatus_commlevel_x" does not exist, skipping +DB: index "plantcorrelation_plantstatus_id_x" does not exist, skipping +DB: index "plantcorrelation_plantconcept_id_x" does not exist, skipping +DB: index "keywords_table_id_entity_key" does not exist, skipping +DB: index "emb_classcontributor_idx" does not exist, skipping +DB: index "emb_commclass_idx" does not exist, skipping +DB: index "emb_comminterpretation_idx" does not exist, skipping +DB: index "emb_disturbanceobs_idx" does not exist, skipping +DB: index "emb_observation_idx" does not exist, skipping +DB: index "emb_plot_idx" does not exist, skipping +DB: index "emb_soilobs_idx" does not exist, skipping +DB: index "emb_stemcount_idx" does not exist, skipping +DB: index "emb_stemlocation_idx" does not exist, skipping +DB: index "emb_taxonalt_idx" does not exist, skipping +DB: index "emb_taxonimportance_idx" does not exist, skipping +DB: index "emb_taxoninterpretation_idx" does not exist, skipping +DB: index "emb_taxonobservation_idx" does not exist, skipping +DB: index "taxonobservation_int_origplantconcept_id_x" does not exist, skipping +DB: index "taxonobservation_int_currplantconcept_id_x" does not exist, skipping +DB: index "userdatasetitem_accessioncode_index" does not exist, skipping +DB: index "userdatasetitem2_accessioncode_index" does not exist, skipping +DB: index "reference_accessioncode_index" does not exist, skipping +DB: index "referenceparty_accessioncode_index" does not exist, skipping +DB: index "referencejournal_accessioncode_index" does not exist, skipping +DB: index "commclass_accessioncode_index" does not exist, skipping +DB: index "covermethod_accessioncode_index" does not exist, skipping +DB: index "namedplace_accessioncode_index" does not exist, skipping +DB: index "observation_accessioncode_index" does not exist, skipping +DB: index "party_accessioncode_index" does not exist, skipping +DB: index "plot_accessioncode_index" does not exist, skipping +DB: index "project_accessioncode_index" does not exist, skipping +DB: index "soiltaxon_accessioncode_index" does not exist, skipping +DB: index "stratummethod_accessioncode_index" does not exist, skipping +DB: index "taxonobservation_accessioncode_index" does not exist, skipping +DB: index "userdefined_accessioncode_index" does not exist, skipping +DB: index "userdataset_accessioncode_index" does not exist, skipping +DB: index "userquery_accessioncode_index" does not exist, skipping +DB: index "commconcept_accessioncode_index" does not exist, skipping +DB: index "plantconcept_accessioncode_index" does not exist, skipping +DB: index "aux_role_accessioncode_index" does not exist, skipping +DB: index "taxoninterpretation_accessioncode_index" does not exist, skipping +DB: index "observationsynonym_accessioncode_index" does not exist, skipping +DB: index "note_accessioncode_index" does not exist, skipping +DB: index "graphic_accessioncode_index" does not exist, skipping +DB: index "plantstatus_accessioncode_index" does not exist, skipping +DB: index "commstatus_accessioncode_index" does not exist, skipping +Migrating schema "public" to version "1.4 - drop vegbank views" +DB: view "view_busrule_plotsizeshape" does not exist, skipping +DB: view "view_busrule_duplstratumtype" does not exist, skipping +DB: view "view_busrule_duplcovercode" does not exist, skipping +DB: view "view_emb_embargo_complete" does not exist, skipping +DB: view "view_emb_embargo_currentfullonly" does not exist, skipping +DB: view "view_export_classcontributor" does not exist, skipping +DB: view "view_export_commclass" does not exist, skipping +DB: view "view_export_comminterpretation" does not exist, skipping +DB: view "view_export_disturbanceobs" does not exist, skipping +DB: view "view_export_observation" does not exist, skipping +DB: view "view_export_observationcontributor" does not exist, skipping +DB: view "view_export_plot" does not exist, skipping +DB: view "view_export_plot_pre" does not exist, skipping +DB: view "view_export_soilobs" does not exist, skipping +DB: view "view_export_stemcount" does not exist, skipping +DB: view "view_export_stemlocation" does not exist, skipping +DB: view "view_export_taxonalt" does not exist, skipping +DB: view "view_export_taxonimportance" does not exist, skipping +DB: view "view_export_taxoninterpretation" does not exist, skipping +DB: view "view_export_taxonobservation" does not exist, skipping +DB: view "view_dbafielddesc_notimpl" does not exist, skipping +DB: view "view_plotall_withembargo" does not exist, skipping +DB: view "view_taxonobs_distinctid_curr_counts_plants" does not exist, skipping +DB: view "view_taxonobs_distinctid_curr_counts" does not exist, skipping +DB: view "view_taxonobs_distinctid_curr" does not exist, skipping +DB: view "view_taxonobs_withmaxcover" does not exist, skipping +DB: view "view_csv_taxonimportance" does not exist, skipping +DB: view "view_csv_taxonimportance_pre" does not exist, skipping +DB: view "view_browseparty_all_count_combined" does not exist, skipping +DB: view "view_browseparty_classcontrib_count" does not exist, skipping +DB: view "view_browseparty_obscontrib_count" does not exist, skipping +DB: view "view_browseparty_projectcontrib_count" does not exist, skipping +DB: view "view_browseparty_all_count" does not exist, skipping +DB: view "view_browseparty_all" does not exist, skipping +DB: view "view_browseparty_obscontrib" does not exist, skipping +DB: view "view_browseparty_classcontrib" does not exist, skipping +DB: view "view_browseparty_projectcontrib" does not exist, skipping +DB: view "view_comminterp_more" does not exist, skipping +DB: view "view_taxoninterp_more" does not exist, skipping +DB: view "view_observation_transl" does not exist, skipping +DB: view "view_notemb_classcontributor" does not exist, skipping +DB: view "view_notemb_comminterpretation" does not exist, skipping +DB: view "view_notemb_commclass" does not exist, skipping +DB: view "view_notemb_disturbanceobs" does not exist, skipping +DB: view "view_notemb_soilobs" does not exist, skipping +DB: view "view_notemb_stemcount" does not exist, skipping +DB: view "view_notemb_stemlocation" does not exist, skipping +DB: view "view_notemb_taxonalt" does not exist, skipping +DB: view "view_notemb_taxonimportance" does not exist, skipping +DB: view "view_notemb_taxoninterpretation" does not exist, skipping +DB: view "view_notemb_taxonobservation" does not exist, skipping +DB: view "view_notemb_observation" does not exist, skipping +DB: view "view_notemb_observationcontributor" does not exist, skipping +DB: view "view_notemb_plot" does not exist, skipping +DB: view "view_plantconcept_transl" does not exist, skipping +DB: view "view_commconcept_transl" does not exist, skipping +DB: view "view_reference_transl" does not exist, skipping +DB: view "view_party_transl" does not exist, skipping +DB: view "view_party_public" does not exist, skipping +DB: view "view_keywprojplaces" does not exist, skipping +DB: view "view_kwhelper_projcontrib" does not exist, skipping +DB: view "view_kwhelper_refparty" does not exist, skipping +DB: view "view_kwhelper_refjournal" does not exist, skipping +DB: view "view_all_commnames_code" does not exist, skipping +DB: view "view_all_commnames_sciname" does not exist, skipping +DB: view "view_all_commnames_translated" does not exist, skipping +DB: view "view_all_commnames_common" does not exist, skipping +DB: view "view_std_commnames_code" does not exist, skipping +DB: view "view_std_commnames_sciname" does not exist, skipping +DB: view "view_std_commnames_translated" does not exist, skipping +DB: view "view_std_commnames_common" does not exist, skipping +DB: view "view_all_plantnames_code" does not exist, skipping +DB: view "view_all_plantnames_common" does not exist, skipping +DB: view "view_all_plantnames_sciname" does not exist, skipping +DB: view "view_all_plantnames_scinamenoauth" does not exist, skipping +DB: view "view_std_plantnames_code" does not exist, skipping +DB: view "view_std_plantnames_common" does not exist, skipping +DB: view "view_std_plantnames_sciname" does not exist, skipping +DB: view "view_std_plantnames_scinamenoauth" does not exist, skipping +Migrating schema "public" to version "1.5 - create vegbank views" +DB: view "view_busrule_plotsizeshape" does not exist, skipping +DB: view "view_busrule_duplstratumtype" does not exist, skipping +DB: view "view_busrule_duplcovercode" does not exist, skipping +DB: view "view_emb_embargo_complete" does not exist, skipping +DB: view "view_emb_embargo_currentfullonly" does not exist, skipping +DB: view "view_std_plantnames_code" does not exist, skipping +DB: view "view_std_plantnames_sciname" does not exist, skipping +DB: view "view_std_plantnames_scinamenoauth" does not exist, skipping +DB: view "view_std_plantnames_common" does not exist, skipping +DB: view "view_all_plantnames_code" does not exist, skipping +DB: view "view_all_plantnames_sciname" does not exist, skipping +DB: view "view_all_plantnames_scinamenoauth" does not exist, skipping +DB: view "view_all_plantnames_common" does not exist, skipping +DB: view "view_std_commnames_code" does not exist, skipping +DB: view "view_std_commnames_sciname" does not exist, skipping +DB: view "view_std_commnames_translated" does not exist, skipping +DB: view "view_std_commnames_common" does not exist, skipping +DB: view "view_all_commnames_code" does not exist, skipping +DB: view "view_all_commnames_sciname" does not exist, skipping +DB: view "view_all_commnames_translated" does not exist, skipping +DB: view "view_all_commnames_common" does not exist, skipping +Migrating schema "public" to version "1.6 - vegbank populate configtables" +Migrating schema "public" to version "1.7 - create temp tbls" +Migrating schema "public" to version "1.8 - drop vegbank views" +Migrating schema "public" to version "1.9 - create vegbank views" +DB: view "view_busrule_plotsizeshape" does not exist, skipping +DB: view "view_busrule_duplstratumtype" does not exist, skipping +DB: view "view_busrule_duplcovercode" does not exist, skipping +DB: view "view_emb_embargo_complete" does not exist, skipping +DB: view "view_emb_embargo_currentfullonly" does not exist, skipping +DB: view "view_std_plantnames_code" does not exist, skipping +DB: view "view_std_plantnames_sciname" does not exist, skipping +DB: view "view_std_plantnames_scinamenoauth" does not exist, skipping +DB: view "view_std_plantnames_common" does not exist, skipping +DB: view "view_all_plantnames_code" does not exist, skipping +DB: view "view_all_plantnames_sciname" does not exist, skipping +DB: view "view_all_plantnames_scinamenoauth" does not exist, skipping +DB: view "view_all_plantnames_common" does not exist, skipping +DB: view "view_std_commnames_code" does not exist, skipping +DB: view "view_std_commnames_sciname" does not exist, skipping +DB: view "view_std_commnames_translated" does not exist, skipping +DB: view "view_std_commnames_common" does not exist, skipping +DB: view "view_all_commnames_code" does not exist, skipping +DB: view "view_all_commnames_sciname" does not exist, skipping +DB: view "view_all_commnames_translated" does not exist, skipping +DB: view "view_all_commnames_common" does not exist, skipping +Migrating schema "public" to version "1.10 - create admin user" +Migrating schema "public" to version "1.11 - populate datadictionary" +Successfully applied 12 migrations to schema "public", now at version v1.11 (execution time 00:00.907s) + +You are not signed in to Flyway, to sign in please run auth +doumok@Dou-NCEAS-MBP14 ~ % psql -U doumok -d vegbank2 -f /Users/doumok/Code/testing/vegbank_dataonly_20240814.sql > /Users/doumok/Code/testing/vegbank2_psql_output_hydrologicregime_update.txt 2>&1 + +doumok@Dou-NCEAS-MBP14 ~ % flyway migrate +A more recent version of Flyway is available. Find out more about Flyway 10.17.2 at https://rd.gt/3rXiSlV + +Flyway Community Edition 10.17.0 by Redgate + +See release notes here: https://rd.gt/416ObMi +Database: jdbc:postgresql://localhost:5432/vegbank2 (PostgreSQL 10.23) +Successfully validated 13 migrations (execution time 00:00.111s) +Current version of schema "public": 1.11 +Migrating schema "public" to version "1.12 - add constraints" +Successfully applied 1 migration to schema "public", now at version v1.12 (execution time 00:14.342s) + +You are not signed in to Flyway, to sign in please run auth +``` \ No newline at end of file From ea95718b466ca694e7dbdac45cf7c3c41d4dbb3c Mon Sep 17 00:00:00 2001 From: Dou Mok Date: Sat, 24 Aug 2024 12:07:59 -0700 Subject: [PATCH 37/49] Update readme docs --- INSTALL.md | 2 ++ sql/sql-transformations/README.md | 3 +-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/INSTALL.md b/INSTALL.md index c219c38..c6a95b0 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -67,6 +67,8 @@ If you don't have a dump file, you can get one by asking a sys admin for `vegban postgres@vegbank:~/dumps$ pg_dump -d vegbank --data-only -f vegbank_dataonly_[YYMMDD].sq ``` +**NOTE:** If any exceptions occur with `COPY` commands in the data insertion process, the entire table the command is trying to add into the database will not be executed. Exceptions must be resolved in order for the table's data to be loaded (all or nothing). + Step 6: Finish the migration: diff --git a/sql/sql-transformations/README.md b/sql/sql-transformations/README.md index b68851f..2e779bb 100644 --- a/sql/sql-transformations/README.md +++ b/sql/sql-transformations/README.md @@ -4,8 +4,7 @@ This README document outlines the process taken to generate the Vegbank schema f ## Step 1: V1.0__vegbank.sql -This first migration SQL produced - it contains all the tables/relations needed for a data-only insert. It also -includes the alter table commands to apply foreign key constraints. These constraints will cause issues with loading data, so those commands have been moved to a new migration file `V1.12__add_constraints.sql`. which is to be applied after the data has been copied after migrating to `V1.11__populate_datadictionary`. +This first migration SQL produced - it contains all the tables/relations needed for a data-only insert. It also includes the alter table commands to apply foreign key constraints. These constraints will cause issues with loading data, so those commands have been moved to a new migration file `V1.12__add_constraints.sql`. which is to be applied after the data has been copied after migrating to `V1.11__populate_datadictionary`. To generate this initial file, run the following bash script in 'sql-transformations': ```sh From fe0a00a0f1dbf0291c7e13ff78e0dd5f4182c192 Mon Sep 17 00:00:00 2001 From: Dou Mok Date: Wed, 28 Aug 2024 13:10:14 -0700 Subject: [PATCH 38/49] Add additional context to 'INSTALL.md' for when generating a data-only dump file --- INSTALL.md | 29 ++++++++++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) diff --git a/INSTALL.md b/INSTALL.md index c6a95b0..52c982f 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -65,9 +65,36 @@ If you don't have a dump file, you can get one by asking a sys admin for `vegban ``` postgres@vegbank:~/dumps$ pg_dump -d vegbank --data-only -f vegbank_dataonly_[YYMMDD].sq +pg_dump: NOTICE: there are circular foreign-key constraints on this table: +pg_dump: observation +pg_dump: You might not be able to restore the dump without using --disable-triggers or temporarily dropping the constraints. +pg_dump: Consider using a full dump instead of a --data-only dump to avoid this problem. +pg_dump: NOTICE: there are circular foreign-key constraints on this table: +pg_dump: party +pg_dump: You might not be able to restore the dump without using --disable-triggers or temporarily dropping the constraints. +pg_dump: Consider using a full dump instead of a --data-only dump to avoid this problem. +pg_dump: NOTICE: there are circular foreign-key constraints on this table: +pg_dump: plot +pg_dump: You might not be able to restore the dump without using --disable-triggers or temporarily dropping the constraints. +pg_dump: Consider using a full dump instead of a --data-only dump to avoid this problem. +pg_dump: NOTICE: there are circular foreign-key constraints on this table: +pg_dump: referenceparty +pg_dump: You might not be able to restore the dump without using --disable-triggers or temporarily dropping the constraints. +pg_dump: Consider using a full dump instead of a --data-only dump to avoid this problem. +pg_dump: NOTICE: there are circular foreign-key constraints on this table: +pg_dump: revision +pg_dump: You might not be able to restore the dump without using --disable-triggers or temporarily dropping the constraints. +pg_dump: Consider using a full dump instead of a --data-only dump to avoid this problem. +pg_dump: NOTICE: there are circular foreign-key constraints on this table: +pg_dump: soiltaxon +pg_dump: You might not be able to restore the dump without using --disable-triggers or temporarily dropping the constraints. +pg_dump: Consider using a full dump instead of a --data-only dump to avoid this problem. +postgres@vegbank:~/dumps$ ``` -**NOTE:** If any exceptions occur with `COPY` commands in the data insertion process, the entire table the command is trying to add into the database will not be executed. Exceptions must be resolved in order for the table's data to be loaded (all or nothing). +**NOTE 1:** You can see that the output above generated from creating the dump file displays warnings, no problem. The migration files can handle these issues. + +**NOTE 2:** If any exceptions occur with `COPY` commands in the data insertion process, the entire table the command is trying to add into the database will not be executed. Exceptions must be resolved in order for the table's data to be loaded (all or nothing). Step 6: From 80aa80de175ac53c8ba670bdcc1fbfca1bf669c5 Mon Sep 17 00:00:00 2001 From: Dou Mok Date: Fri, 30 Aug 2024 11:49:44 -0700 Subject: [PATCH 39/49] Update 'INSTALL.md' for docker pg16 restoration process for vegbank db and add new logs file for reference/context --- INSTALL.md | 400 +++++++++++++- .../4_vegbank2_psql_output_pg16_20240830.txt | 486 ++++++++++++++++++ 2 files changed, 878 insertions(+), 8 deletions(-) create mode 100644 sql/sql-logs/4_vegbank2_psql_output_pg16_20240830.txt diff --git a/INSTALL.md b/INSTALL.md index 52c982f..90f7e1d 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -1,16 +1,14 @@ # Introduction -This install document describes how to restore the Vegbank database from a data-only dump file. +This install document describes how to restore the Vegbank database from a data-only dump file to either a local Postgres instance or a Docker container. -# Local Development Installation (Postgres 10.23, MacOS M2) +## Local Postgres Development (Postgres 10.23, MacOS M2) -// TODO: Automate as much of this process as possible with a bash script - -Requirements: +**Requirements:** - Postgres.app with PostgreSQL 10 – 15 (Universal/Intel) - - https://postgresapp.com/downloads_legacy.html + - https://postgresapp.com/downloads_legacy.html - Flyway CLI - - https://documentation.red-gate.com/fd/command-line-184127404.html + - https://documentation.red-gate.com/fd/command-line-184127404.html Step 1: @@ -32,7 +30,7 @@ GRANT ALL PRIVILEGES ON DATABASE vegbank TO vegbank; Step 3: -Take the `flyway.conf` file and move it into your local flyway `conf` installation. Ensure that the contents match the location of the `/migrations` folder found in the directory where this `vegbank2` repo exists. For example: +Take the `flyway.conf` file in this repo and move it into your local flyway `conf` installation. Ensure that the contents match the location of the `/migrations` folder found in the directory where this `vegbank2` repo exists. For example: ``` // ex. /Users/doumok/Code/flyway-10.17.0/conf/flyway.conf @@ -453,4 +451,390 @@ Migrating schema "public" to version "1.12 - add constraints" Successfully applied 1 migration to schema "public", now at version v1.12 (execution time 00:14.342s) You are not signed in to Flyway, to sign in please run auth +``` + +## Postgres Docker Development (Postgres12, 16) + +This process is also applicable to Postgres12 and 16, starting from 10.23 is not necessary. + +**Requirements:** +- Docker + - https://docs.docker.com/engine/install/ +- Flyway CLI + - https://documentation.red-gate.com/fd/command-line-184127404.html + +**Step 1: Install Docker and Launch a Postgres Instance** + +After installing Docker, run the following command to launch a postgres container: + +```sh +docker run --name vegbank -e POSTGRES_PASSWORD=vegbank -e POSTGRES_DB=vegbank -e POSTGRES_USER=vegbank -e PGDATA=/tmp/postgresql/data -e POSTGRES_HOST_AUTH_METHOD=password -p 5432:5432 -d postgres:16 +``` + - You are asking Docker to run a postgres database called `vegbank`, with password `vegbank` and user `vegbank` + - You are providing a location for where postgres files are to exist within the container + - This container is now listening on port 5432 + - We are selecting `postgres:16` or Postgres V16, you may also select `postgres:12` if you prefer + +**Step 2: Apply SQL files to Postgres via Flyway migrations** + +Migrate `flyway` to v1.11. See the above section (Step 3, `Local Development (Postgres 10.23, MacOS M2)`) to work with `flyway` if you haven't already set it up. + +```sh +flyway -target=1.11 migrate +``` + - Specifically migrate to migrations version 1.11, this is everything the vegbank db needs without constraints applied + +**Step 3: Restore the vegbank data via a data-only dump (backup) file** + +Load data only dump file. See above section to obtain data-only dump file if you do not have it. + +```sh +psql -h localhost -p 5432 -U vegbank -d vegbank -f /Users/doumok/Code/testing/vegbank_dataonly_20240814.sql > /Users/doumok/Code/testing/vegbank2_psql_output_pg16_20240830.txt 2>&1 +``` + - To assist with debugging, I have chosen here to redirect the output from the psql commands to a text file. If you delete this line, then the output will print to your terminal. + +**Step 4: Finish the vegbank database restoration process by applying constraints** + +Finish the migration by applying the constraints. This will apply the last migration V1.12 + +```sh +flyway migrate +``` + +Example Output for Reference: + +```sh +doumok@Dou-NCEAS-MBP14 ~ % docker run --name vegbank -e POSTGRES_PASSWORD=vegbank -e POSTGRES_DB=vegbank -e POSTGRES_USER=vegbank -e PGDATA=/tmp/postgresql/data -e POSTGRES_HOST_AUTH_METHOD=password -p 5432:5432 -d postgres:16 +4a95526c841a7cb302975cc7e92ed121f57f8e5c8b7b7937e55782b7f84bb80d +doumok@Dou-NCEAS-MBP14 ~ % flyway -target=1.11 migrate +A more recent version of Flyway is available. Find out more about Flyway 10.17.2 at https://rd.gt/3rXiSlV + +Flyway Community Edition 10.17.0 by Redgate + +See release notes here: https://rd.gt/416ObMi +Database: jdbc:postgresql://localhost:5432/vegbank (PostgreSQL 16.3) +Schema history table "public"."flyway_schema_history" does not exist yet +Successfully validated 13 migrations (execution time 00:00.069s) +Creating Schema History table "public"."flyway_schema_history" ... +Current version of schema "public": << Empty Schema >> +Migrating schema "public" to version "1.0 - vegbank" +Migrating schema "public" to version "1.1 - create aggregrates" +Migrating schema "public" to version "1.2 - create extras" +Migrating schema "public" to version "1.3 - create indices" +DB: index "plantusage_plantname_x" does not exist, skipping +DB: index "plantusage_plantname_id_x" does not exist, skipping +DB: index "plantusage_plantconcept_id_x" does not exist, skipping +DB: index "plantusage_classsystem_x" does not exist, skipping +DB: index "plantusage_party_id_x" does not exist, skipping +DB: index "plantusage_plantstatus_id_x" does not exist, skipping +DB: index "plantname_plantname_x" does not exist, skipping +DB: index "plantname_reference_id_x" does not exist, skipping +DB: index "plantconcept_plantname_id_x" does not exist, skipping +DB: index "plantconcept_reference_id_x" does not exist, skipping +DB: index "plantconcept_dobscount_x" does not exist, skipping +DB: index "plantstatus_plantlevel_x" does not exist, skipping +DB: index "plantstatus_plantconcept_id_x" does not exist, skipping +DB: index "plantstatus_reference_id_x" does not exist, skipping +DB: index "plantstatus_plantparent_id_x" does not exist, skipping +DB: index "plantstatus_party_id_x" does not exist, skipping +DB: index "userregionalexp_usercertification_id_x" does not exist, skipping +DB: index "userdatasetitem_userdataset_id_x" does not exist, skipping +DB: index "userdataset_usr_id_x" does not exist, skipping +DB: index "usernotify_usr_id_x" does not exist, skipping +DB: index "embargo_plot_id_x" does not exist, skipping +DB: index "userpermission_embargo_id_x" does not exist, skipping +DB: index "userpermission_usr_id_x" does not exist, skipping +DB: index "userquery_usr_id_x" does not exist, skipping +DB: index "userpreference_usr_id_x" does not exist, skipping +DB: index "userrecordowner_usr_id_x" does not exist, skipping +DB: index "usr_party_id_x" does not exist, skipping +DB: index "covermethod_reference_id_x" does not exist, skipping +DB: index "stratummethod_reference_id_x" does not exist, skipping +DB: index "usercertification_usr_id_x" does not exist, skipping +DB: index "stratum_observation_id_x" does not exist, skipping +DB: index "stratum_stratumtype_id_x" does not exist, skipping +DB: index "stratum_stratummethod_id_x" does not exist, skipping +DB: index "stemlocation_stemcount_id_x" does not exist, skipping +DB: index "observation_previousobs_id_x" does not exist, skipping +DB: index "observation_plot_id_x" does not exist, skipping +DB: index "observation_project_id_x" does not exist, skipping +DB: index "observation_covermethod_id_x" does not exist, skipping +DB: index "observation_stratummethod_id_x" does not exist, skipping +DB: index "observation_soiltaxon_id_x" does not exist, skipping +DB: index "taxonobservation_observation_id_x" does not exist, skipping +DB: index "taxonobservation_reference_id_x" does not exist, skipping +DB: index "reference_referencejournal_id_x" does not exist, skipping +DB: index "taxoninterpretation_taxonobservation_id_x" does not exist, skipping +DB: index "taxoninterpretation_stemlocation_id_x" does not exist, skipping +DB: index "taxoninterpretation_plantconcept_id_x" does not exist, skipping +DB: index "taxoninterpretation_plantname_id_x" does not exist, skipping +DB: index "taxoninterpretation_party_id_x" does not exist, skipping +DB: index "taxoninterpretation_role_id_x" does not exist, skipping +DB: index "taxoninterpretation_reference_id_x" does not exist, skipping +DB: index "taxoninterpretation_collector_id_x" does not exist, skipping +DB: index "taxoninterpretation_museum_id_x" does not exist, skipping +DB: index "taxonalt_taxoninterpretation_id_x" does not exist, skipping +DB: index "taxonalt_plantconcept_id_x" does not exist, skipping +DB: index "telephone_party_id_x" does not exist, skipping +DB: index "plot_reference_id_x" does not exist, skipping +DB: index "plot_parent_id_x" does not exist, skipping +DB: index "party_currentname_id_x" does not exist, skipping +DB: index "place_plot_id_x" does not exist, skipping +DB: index "place_namedplace_id_x" does not exist, skipping +DB: index "namedplace_reference_id_x" does not exist, skipping +DB: index "projectcontributor_project_id_x" does not exist, skipping +DB: index "projectcontributor_party_id_x" does not exist, skipping +DB: index "projectcontributor_role_id_x" does not exist, skipping +DB: index "revision_previousrevision_id_x" does not exist, skipping +DB: index "soilobs_observation_id_x" does not exist, skipping +DB: index "soiltaxon_soilparent_id_x" does not exist, skipping +DB: index "stemcount_taxonimportance_id_x" does not exist, skipping +DB: index "stratumtype_stratummethod_id_x" does not exist, skipping +DB: index "taxonimportance_taxonobservation_id_x" does not exist, skipping +DB: index "taxonimportance_stratum_id_x" does not exist, skipping +DB: index "observationcontributor_observation_id_x" does not exist, skipping +DB: index "observationcontributor_party_id_x" does not exist, skipping +DB: index "observationcontributor_role_id_x" does not exist, skipping +DB: index "observationsynonym_synonymobservation_id_x" does not exist, skipping +DB: index "observationsynonym_primaryobservation_id_x" does not exist, skipping +DB: index "observationsynonym_party_id_x" does not exist, skipping +DB: index "observationsynonym_role_id_x" does not exist, skipping +DB: index "partymember_parentparty_id_x" does not exist, skipping +DB: index "partymember_childparty_id_x" does not exist, skipping +DB: index "partymember_role_id_x" does not exist, skipping +DB: index "referenceparty_currentparty_id_x" does not exist, skipping +DB: index "classcontributor_commclass_id_x" does not exist, skipping +DB: index "classcontributor_party_id_x" does not exist, skipping +DB: index "classcontributor_role_id_x" does not exist, skipping +DB: index "commclass_observation_id_x" does not exist, skipping +DB: index "commclass_classpublication_id_x" does not exist, skipping +DB: index "commconcept_commname_id_x" does not exist, skipping +DB: index "commconcept_reference_id_x" does not exist, skipping +DB: index "commconcept_dobscount_x" does not exist, skipping +DB: index "comminterpretation_commclass_id_x" does not exist, skipping +DB: index "comminterpretation_commconcept_id_x" does not exist, skipping +DB: index "comminterpretation_commauthority_id_x" does not exist, skipping +DB: index "coverindex_covermethod_id_x" does not exist, skipping +DB: index "definedvalue_userdefined_id_x" does not exist, skipping +DB: index "disturbanceobs_observation_id_x" does not exist, skipping +DB: index "graphic_observation_id_x" does not exist, skipping +DB: index "note_notelink_id_x" does not exist, skipping +DB: index "note_party_id_x" does not exist, skipping +DB: index "note_role_id_x" does not exist, skipping +DB: index "plantlineage_childplantstatus_id_x" does not exist, skipping +DB: index "plantlineage_parentplantstatus_id_x" does not exist, skipping +DB: index "address_party_id_x" does not exist, skipping +DB: index "address_organization_id_x" does not exist, skipping +DB: index "referencealtident_reference_id_x" does not exist, skipping +DB: index "referencecontributor_reference_id_x" does not exist, skipping +DB: index "referencecontributor_referenceparty_id_x" does not exist, skipping +DB: index "commcorrelation_commstatus_id_x" does not exist, skipping +DB: index "commcorrelation_commconcept_id_x" does not exist, skipping +DB: index "commlineage_parentcommstatus_id_x" does not exist, skipping +DB: index "commlineage_childcommstatus_id_x" does not exist, skipping +DB: index "commname_reference_id_x" does not exist, skipping +DB: index "commusage_commname_id_x" does not exist, skipping +DB: index "commusage_commconcept_id_x" does not exist, skipping +DB: index "commusage_party_id_x" does not exist, skipping +DB: index "commusage_commstatus_id_x" does not exist, skipping +DB: index "commusage_commname_x" does not exist, skipping +DB: index "commusage_classsystem_x" does not exist, skipping +DB: index "commstatus_commconcept_id_x" does not exist, skipping +DB: index "commstatus_reference_id_x" does not exist, skipping +DB: index "commstatus_commparent_id_x" does not exist, skipping +DB: index "commstatus_party_id_x" does not exist, skipping +DB: index "commstatus_commlevel_x" does not exist, skipping +DB: index "plantcorrelation_plantstatus_id_x" does not exist, skipping +DB: index "plantcorrelation_plantconcept_id_x" does not exist, skipping +DB: index "keywords_table_id_entity_key" does not exist, skipping +DB: index "emb_classcontributor_idx" does not exist, skipping +DB: index "emb_commclass_idx" does not exist, skipping +DB: index "emb_comminterpretation_idx" does not exist, skipping +DB: index "emb_disturbanceobs_idx" does not exist, skipping +DB: index "emb_observation_idx" does not exist, skipping +DB: index "emb_plot_idx" does not exist, skipping +DB: index "emb_soilobs_idx" does not exist, skipping +DB: index "emb_stemcount_idx" does not exist, skipping +DB: index "emb_stemlocation_idx" does not exist, skipping +DB: index "emb_taxonalt_idx" does not exist, skipping +DB: index "emb_taxonimportance_idx" does not exist, skipping +DB: index "emb_taxoninterpretation_idx" does not exist, skipping +DB: index "emb_taxonobservation_idx" does not exist, skipping +DB: index "taxonobservation_int_origplantconcept_id_x" does not exist, skipping +DB: index "taxonobservation_int_currplantconcept_id_x" does not exist, skipping +DB: index "userdatasetitem_accessioncode_index" does not exist, skipping +DB: index "userdatasetitem2_accessioncode_index" does not exist, skipping +DB: index "reference_accessioncode_index" does not exist, skipping +DB: index "referenceparty_accessioncode_index" does not exist, skipping +DB: index "referencejournal_accessioncode_index" does not exist, skipping +DB: index "commclass_accessioncode_index" does not exist, skipping +DB: index "covermethod_accessioncode_index" does not exist, skipping +DB: index "namedplace_accessioncode_index" does not exist, skipping +DB: index "observation_accessioncode_index" does not exist, skipping +DB: index "party_accessioncode_index" does not exist, skipping +DB: index "plot_accessioncode_index" does not exist, skipping +DB: index "project_accessioncode_index" does not exist, skipping +DB: index "soiltaxon_accessioncode_index" does not exist, skipping +DB: index "stratummethod_accessioncode_index" does not exist, skipping +DB: index "taxonobservation_accessioncode_index" does not exist, skipping +DB: index "userdefined_accessioncode_index" does not exist, skipping +DB: index "userdataset_accessioncode_index" does not exist, skipping +DB: index "userquery_accessioncode_index" does not exist, skipping +DB: index "commconcept_accessioncode_index" does not exist, skipping +DB: index "plantconcept_accessioncode_index" does not exist, skipping +DB: index "aux_role_accessioncode_index" does not exist, skipping +DB: index "taxoninterpretation_accessioncode_index" does not exist, skipping +DB: index "observationsynonym_accessioncode_index" does not exist, skipping +DB: index "note_accessioncode_index" does not exist, skipping +DB: index "graphic_accessioncode_index" does not exist, skipping +DB: index "plantstatus_accessioncode_index" does not exist, skipping +DB: index "commstatus_accessioncode_index" does not exist, skipping +Migrating schema "public" to version "1.4 - drop vegbank views" +DB: view "view_busrule_plotsizeshape" does not exist, skipping +DB: view "view_busrule_duplstratumtype" does not exist, skipping +DB: view "view_busrule_duplcovercode" does not exist, skipping +DB: view "view_emb_embargo_complete" does not exist, skipping +DB: view "view_emb_embargo_currentfullonly" does not exist, skipping +DB: view "view_export_classcontributor" does not exist, skipping +DB: view "view_export_commclass" does not exist, skipping +DB: view "view_export_comminterpretation" does not exist, skipping +DB: view "view_export_disturbanceobs" does not exist, skipping +DB: view "view_export_observation" does not exist, skipping +DB: view "view_export_observationcontributor" does not exist, skipping +DB: view "view_export_plot" does not exist, skipping +DB: view "view_export_plot_pre" does not exist, skipping +DB: view "view_export_soilobs" does not exist, skipping +DB: view "view_export_stemcount" does not exist, skipping +DB: view "view_export_stemlocation" does not exist, skipping +DB: view "view_export_taxonalt" does not exist, skipping +DB: view "view_export_taxonimportance" does not exist, skipping +DB: view "view_export_taxoninterpretation" does not exist, skipping +DB: view "view_export_taxonobservation" does not exist, skipping +DB: view "view_dbafielddesc_notimpl" does not exist, skipping +DB: view "view_plotall_withembargo" does not exist, skipping +DB: view "view_taxonobs_distinctid_curr_counts_plants" does not exist, skipping +DB: view "view_taxonobs_distinctid_curr_counts" does not exist, skipping +DB: view "view_taxonobs_distinctid_curr" does not exist, skipping +DB: view "view_taxonobs_withmaxcover" does not exist, skipping +DB: view "view_csv_taxonimportance" does not exist, skipping +DB: view "view_csv_taxonimportance_pre" does not exist, skipping +DB: view "view_browseparty_all_count_combined" does not exist, skipping +DB: view "view_browseparty_classcontrib_count" does not exist, skipping +DB: view "view_browseparty_obscontrib_count" does not exist, skipping +DB: view "view_browseparty_projectcontrib_count" does not exist, skipping +DB: view "view_browseparty_all_count" does not exist, skipping +DB: view "view_browseparty_all" does not exist, skipping +DB: view "view_browseparty_obscontrib" does not exist, skipping +DB: view "view_browseparty_classcontrib" does not exist, skipping +DB: view "view_browseparty_projectcontrib" does not exist, skipping +DB: view "view_comminterp_more" does not exist, skipping +DB: view "view_taxoninterp_more" does not exist, skipping +DB: view "view_observation_transl" does not exist, skipping +DB: view "view_notemb_classcontributor" does not exist, skipping +DB: view "view_notemb_comminterpretation" does not exist, skipping +DB: view "view_notemb_commclass" does not exist, skipping +DB: view "view_notemb_disturbanceobs" does not exist, skipping +DB: view "view_notemb_soilobs" does not exist, skipping +DB: view "view_notemb_stemcount" does not exist, skipping +DB: view "view_notemb_stemlocation" does not exist, skipping +DB: view "view_notemb_taxonalt" does not exist, skipping +DB: view "view_notemb_taxonimportance" does not exist, skipping +DB: view "view_notemb_taxoninterpretation" does not exist, skipping +DB: view "view_notemb_taxonobservation" does not exist, skipping +DB: view "view_notemb_observation" does not exist, skipping +DB: view "view_notemb_observationcontributor" does not exist, skipping +DB: view "view_notemb_plot" does not exist, skipping +DB: view "view_plantconcept_transl" does not exist, skipping +DB: view "view_commconcept_transl" does not exist, skipping +DB: view "view_reference_transl" does not exist, skipping +DB: view "view_party_transl" does not exist, skipping +DB: view "view_party_public" does not exist, skipping +DB: view "view_keywprojplaces" does not exist, skipping +DB: view "view_kwhelper_projcontrib" does not exist, skipping +DB: view "view_kwhelper_refparty" does not exist, skipping +DB: view "view_kwhelper_refjournal" does not exist, skipping +DB: view "view_all_commnames_code" does not exist, skipping +DB: view "view_all_commnames_sciname" does not exist, skipping +DB: view "view_all_commnames_translated" does not exist, skipping +DB: view "view_all_commnames_common" does not exist, skipping +DB: view "view_std_commnames_code" does not exist, skipping +DB: view "view_std_commnames_sciname" does not exist, skipping +DB: view "view_std_commnames_translated" does not exist, skipping +DB: view "view_std_commnames_common" does not exist, skipping +DB: view "view_all_plantnames_code" does not exist, skipping +DB: view "view_all_plantnames_common" does not exist, skipping +DB: view "view_all_plantnames_sciname" does not exist, skipping +DB: view "view_all_plantnames_scinamenoauth" does not exist, skipping +DB: view "view_std_plantnames_code" does not exist, skipping +DB: view "view_std_plantnames_common" does not exist, skipping +DB: view "view_std_plantnames_sciname" does not exist, skipping +DB: view "view_std_plantnames_scinamenoauth" does not exist, skipping +Migrating schema "public" to version "1.5 - create vegbank views" +DB: view "view_busrule_plotsizeshape" does not exist, skipping +DB: view "view_busrule_duplstratumtype" does not exist, skipping +DB: view "view_busrule_duplcovercode" does not exist, skipping +DB: view "view_emb_embargo_complete" does not exist, skipping +DB: view "view_emb_embargo_currentfullonly" does not exist, skipping +DB: view "view_std_plantnames_code" does not exist, skipping +DB: view "view_std_plantnames_sciname" does not exist, skipping +DB: view "view_std_plantnames_scinamenoauth" does not exist, skipping +DB: view "view_std_plantnames_common" does not exist, skipping +DB: view "view_all_plantnames_code" does not exist, skipping +DB: view "view_all_plantnames_sciname" does not exist, skipping +DB: view "view_all_plantnames_scinamenoauth" does not exist, skipping +DB: view "view_all_plantnames_common" does not exist, skipping +DB: view "view_std_commnames_code" does not exist, skipping +DB: view "view_std_commnames_sciname" does not exist, skipping +DB: view "view_std_commnames_translated" does not exist, skipping +DB: view "view_std_commnames_common" does not exist, skipping +DB: view "view_all_commnames_code" does not exist, skipping +DB: view "view_all_commnames_sciname" does not exist, skipping +DB: view "view_all_commnames_translated" does not exist, skipping +DB: view "view_all_commnames_common" does not exist, skipping +Migrating schema "public" to version "1.6 - vegbank populate configtables" +Migrating schema "public" to version "1.7 - create temp tbls" +Migrating schema "public" to version "1.8 - drop vegbank views" +Migrating schema "public" to version "1.9 - create vegbank views" +DB: view "view_busrule_plotsizeshape" does not exist, skipping +DB: view "view_busrule_duplstratumtype" does not exist, skipping +DB: view "view_busrule_duplcovercode" does not exist, skipping +DB: view "view_emb_embargo_complete" does not exist, skipping +DB: view "view_emb_embargo_currentfullonly" does not exist, skipping +DB: view "view_std_plantnames_code" does not exist, skipping +DB: view "view_std_plantnames_sciname" does not exist, skipping +DB: view "view_std_plantnames_scinamenoauth" does not exist, skipping +DB: view "view_std_plantnames_common" does not exist, skipping +DB: view "view_all_plantnames_code" does not exist, skipping +DB: view "view_all_plantnames_sciname" does not exist, skipping +DB: view "view_all_plantnames_scinamenoauth" does not exist, skipping +DB: view "view_all_plantnames_common" does not exist, skipping +DB: view "view_std_commnames_code" does not exist, skipping +DB: view "view_std_commnames_sciname" does not exist, skipping +DB: view "view_std_commnames_translated" does not exist, skipping +DB: view "view_std_commnames_common" does not exist, skipping +DB: view "view_all_commnames_code" does not exist, skipping +DB: view "view_all_commnames_sciname" does not exist, skipping +DB: view "view_all_commnames_translated" does not exist, skipping +DB: view "view_all_commnames_common" does not exist, skipping +Migrating schema "public" to version "1.10 - create admin user" +Migrating schema "public" to version "1.11 - populate datadictionary" +Successfully applied 12 migrations to schema "public", now at version v1.11 (execution time 00:01.146s) + +You are not signed in to Flyway, to sign in please run auth +doumok@Dou-NCEAS-MBP14 ~ % psql -h localhost -p 5432 -U vegbank -d vegbank -f /Users/doumok/Code/testing/vegbank_dataonly_20240814.sql > /Users/doumok/Code/testing/vegbank2_psql_output_pg16_20240830.txt 2>&1 +Password for user vegbank: +doumok@Dou-NCEAS-MBP14 ~ % flyway migrate +A more recent version of Flyway is available. Find out more about Flyway 10.17.2 at https://rd.gt/3rXiSlV + +Flyway Community Edition 10.17.0 by Redgate + +See release notes here: https://rd.gt/416ObMi +Database: jdbc:postgresql://localhost:5432/vegbank (PostgreSQL 16.3) +Successfully validated 13 migrations (execution time 00:00.096s) +Current version of schema "public": 1.11 +Migrating schema "public" to version "1.12 - add constraints" +Successfully applied 1 migration to schema "public", now at version v1.12 (execution time 00:09.733s) + +You are not signed in to Flyway, to sign in please run auth +doumok@Dou-NCEAS-MBP14 ~ % ``` \ No newline at end of file diff --git a/sql/sql-logs/4_vegbank2_psql_output_pg16_20240830.txt b/sql/sql-logs/4_vegbank2_psql_output_pg16_20240830.txt new file mode 100644 index 0000000..2ad5c9d --- /dev/null +++ b/sql/sql-logs/4_vegbank2_psql_output_pg16_20240830.txt @@ -0,0 +1,486 @@ +SET +SET +SET +SET +SET + set_config +------------ + +(1 row) + +SET +SET +SET +SET +COPY 4024 +COPY 621 +COPY 21 +COPY 220 +COPY 470 +COPY 31 +COPY 115277 +COPY 261 +COPY 34610 +COPY 21 +COPY 115624 +COPY 102425 +COPY 48584 +COPY 123701 +COPY 38961 +COPY 39041 +COPY 34377 +COPY 102951 +COPY 0 +COPY 146761 +COPY 398 +COPY 8 +COPY 19 +COPY 19 +COPY 9 +COPY 1 +COPY 2658 +COPY 594 +COPY 866 +COPY 1 +COPY 2233737 +COPY 55 +COPY 114063 +COPY 35 +COPY 49566 +COPY 37531 +COPY 1502 +COPY 0 +COPY 410177 +COPY 44949 +COPY 64563 +COPY 64722 +COPY 0 +COPY 0 +COPY 165021 +COPY 3814 +COPY 0 +COPY 234827 +COPY 450175 +COPY 293172 +COPY 273779 +COPY 131380 +COPY 0 +COPY 931997 +COPY 191 +COPY 0 +COPY 152 +COPY 206 +COPY 39607 +COPY 66900 +COPY 204 +COPY 347097 +COPY 1884790 +COPY 3604899 +COPY 600241 +COPY 8371 +COPY 2526264 +COPY 768 +COPY 404 +COPY 125 +COPY 24099 +COPY 293137 +COPY 1033 +COPY 106 +COPY 578 +COPY 1372162 +COPY 0 +COPY 0 +COPY 0 +COPY 0 +COPY 0 +COPY 0 + setval +-------- + 83465 +(1 row) + + setval +-------- + 55 +(1 row) + + setval +-------- + 53019 +(1 row) + + setval +-------- + 167422 +(1 row) + + setval +-------- + 53849 +(1 row) + + setval +-------- + 34406 +(1 row) + + setval +-------- + 114107 +(1 row) + + setval +-------- + 1 +(1 row) + + setval +-------- + 176530 +(1 row) + + setval +-------- + 53806 +(1 row) + + setval +-------- + 178678 +(1 row) + + setval +-------- + 9864 +(1 row) + + setval +-------- + 1634 +(1 row) + + setval +-------- + 36 +(1 row) + + setval +-------- + 36 +(1 row) + + setval +-------- + 9 +(1 row) + + setval +-------- + 1 +(1 row) + + setval +-------- + 2658 +(1 row) + + setval +-------- + 1782 +(1 row) + + setval +-------- + 2596 +(1 row) + + setval +-------- + 1 +(1 row) + + setval +--------- + 2233737 +(1 row) + + setval +-------- + 1248 +(1 row) + + setval +-------- + 165 +(1 row) + + setval +-------- + 49566 +(1 row) + + setval +-------- + 42135 +(1 row) + + setval +-------- + 1509 +(1 row) + + setval +-------- + 1 +(1 row) + + setval +-------- + 64627 +(1 row) + + setval +-------- + 126301 +(1 row) + + setval +-------- + 1 +(1 row) + + setval +-------- + 1 +(1 row) + + setval +-------- + 206488 +(1 row) + + setval +-------- + 195158 +(1 row) + + setval +-------- + 4639 +(1 row) + + setval +-------- + 199633 +(1 row) + + setval +-------- + 1 +(1 row) + + setval +-------- + 250506 +(1 row) + + setval +-------- + 402424 +(1 row) + + setval +-------- + 131381 +(1 row) + + setval +-------- + 1 +(1 row) + + setval +-------- + 462227 +(1 row) + + setval +-------- + 275371 +(1 row) + + setval +-------- + 933732 +(1 row) + + setval +-------- + 208747 +(1 row) + + setval +-------- + 11129 +(1 row) + + setval +-------- + 6854 +(1 row) + + setval +-------- + 87577 +(1 row) + + setval +-------- + 1 +(1 row) + + setval +-------- + 14610 +(1 row) + + setval +-------- + 222 +(1 row) + + setval +-------- + 14561 +(1 row) + + setval +-------- + 153910 +(1 row) + + setval +-------- + 68564 +(1 row) + + setval +-------- + 35998 +(1 row) + + setval +--------- + 1174914 +(1 row) + + setval +-------- + 35929 +(1 row) + + setval +-------- + 756060 +(1 row) + + setval +-------- + 2084 +(1 row) + + setval +-------- + 218064 +(1 row) + + setval +-------- + 1008 +(1 row) + + setval +--------- + 6320366 +(1 row) + + setval +--------- + 3764529 +(1 row) + + setval +--------- + 3527277 +(1 row) + + setval +-------- + 10181 +(1 row) + + setval +-------- + 1 +(1 row) + + setval +-------- + 1 +(1 row) + + setval +-------- + 131 +(1 row) + + setval +-------- + 203673 +(1 row) + + setval +---------- + 30705768 +(1 row) + + setval +-------- + 20307 +(1 row) + + setval +-------- + 1 +(1 row) + + setval +-------- + 1 +(1 row) + + setval +-------- + 1 +(1 row) + + setval +-------- + 1 +(1 row) + + setval +-------- + 1 +(1 row) + + setval +-------- + 1 +(1 row) + + setval +-------- + 1185 +(1 row) + From 7b0dbe8b0a137626720d66f3469979763fc60c28 Mon Sep 17 00:00:00 2001 From: Matt Jones Date: Wed, 18 Sep 2024 16:07:10 -0800 Subject: [PATCH 40/49] Add license and contributing docs. --- CONTRIBUTING.md | 206 ++++++++++++++++++++++++++++++++++++++++++++++++ LICENSE | 201 ++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 407 insertions(+) create mode 100644 CONTRIBUTING.md create mode 100644 LICENSE diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..91b3701 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,206 @@ +# Contributing + +**🎉 First off, thanks for contributing! 🎉** + +- [✨ Types of contributions](#types-of-contributions) +- [📤 Pull Requests](#pull-requests) +- [🚀 Development Workflow](#development-workflow) +- [🔀 Release process](#release-process) +- [🔬 Testing](#testing) +- [🎨 Code style](#code-style) +- [📄 Contributor license agreement](#contributor-license-agreement) + +## ✨ Types of contributions + +We welcome all types of contributions, including bug fixes, feature enhancements, +bug reports, documentation, graphics, and many others. You might consider contributing by: + +- Report a bug or request a new feature in our [issue tracker](https://github.com/DataONEorg/REPONAME/issues) +- Fix a bug and contribute the code with a Pull Request +- Write or edit some documentation +- Sharing helpful tips or FAQ-type answers to users or future contributors +- Create screenshots or tutorials of features of MetacatUI +- Answer questions on DataONE Discussions +- ... + +This is an open source project, and we welcome full +participation in the project. Contributions are reviewed and suggestions are +made to increase value to the community. We strive to +incorporate code, documentation, and other useful contributions quickly and +efficiently while maintaining a high-quality software product. + +## 📤 Pull Requests +We use the pull-request model for contributions. See [GitHub's help on pull-requests](https://help.github.com/articles/about-pull-requests/). + +In short: + +- add an [issue](https://github.com/DataONEorg/REPONAME/issues) describing your planned changes, or add a comment to an existing issue; +- on GitHub, fork the [repository](https://github.com/DataONEorg/REPONAME) +- on your computer, clone your forked copy of the repository +- base your work on the `develop` branch and commit your changes +- push your branch to your forked repository, and submit a pull-request +- our team will be notified of your Pull Request and will review your changes +- our team may request changes before we will approve the Pull Request, or we will make them for you +- once the code is reviewed, our team will merge in your changes to `develop` for the next planned release + +## 🚀 Development Workflow + +Development is managed through the git repository at https://github.com/DataONEorg/REPONAME. The repository is organized into several branches, each with a specific purpose. + +**main**. The `main` branch represents the stable branch that is constantly maintained with the current release. It should generally be safe to install and use the `main` branch the same way as binary releases. The version number in all configuration files and the README on the `main` branch follows [semantic versioning](https://semver.org/) and should always be set to the current stable release, for example `2.8.5`. + +**develop**. Development takes place on a single branch for integrated development and testing of the set of features +targeting the next release. Commits should only be pushed to this branch once they are ready to be deployed to +production immediately after being pushed. This keeps the `develop` branch in a state of readiness for the next release. +Any unreleased code changes on the `develop` branch represent changes that have been tested and staged for the next +release. +The tip of the `develop` branch always represents the set of features that are awaiting the next release. The develop +branch represents the opportunity to integrate changes from multiple features for integrated testing before release. + +Version numbers on the `develop` branch represent either the planned next release number (e.g., `2.9.0`), or the planned next release number with a `beta` designator or release candidate `rc` designator appended as appropriate. For example, `2.8.6-beta1` or `2.9.0-rc1`. + +**feature**. To isolate development on a specific set of capabilities, especially if it may be disruptive to other +developers working on the `develop` branch, feature branches should be created. + +Feature branches are named as `feature-` + `{issue}` + `-{short-description}`, with `{issue}` being the GitHub issue number related to that new feature. e.g. `feature-23-refactor-storage`. + +All `feature-*` branches should be frequently merged with changes from `develop` to +ensure that the branch stays up to date with other features that have +been tested and are awaiting release. Thus, each `feature-*` branch can be tested on its own before it is merged with other features on develop, and afterwards as well. Once a feature is complete and ready for full integration testing, it is generally merged into the `develop` branch after review through a pull request. + +**bugfix**. A final branch type are `bugfix` branches, which work the same as feature branches, but fix bugs rather than adding new functionality. Sometimes it is hard to distinguish features from bug fixes, so some repositories may choose to use `feature` branches for both types of change. Bugfix branches are named similarly, following the pattern: `bugfix-` + `{issue}` + `-{short-description}`, with `{issue}` being the GitHub issue number related to that bug. e.g. `bugfix-83-fix-name-display`. + +### Development flow overview + +```mermaid +%%{init: { 'theme': 'base', + 'gitGraph': { + 'rotateCommitLabel': false, + 'showCommitLabel': false + }, + 'themeVariables': { + 'commitLabelColor': '#ffffffff', + 'commitLabelBackground': '#000000' + } +}}%% +gitGraph + commit id: "1" tag: "v1.0.0" + branch develop + checkout develop + commit id: "2" + branch feature-A + commit id: "3" + commit id: "4" + checkout develop + merge feature-A id: "5" + commit id: "6" + commit id: "7" + branch feature-B + commit id: "8" + commit id: "9" + checkout develop + merge feature-B id: "10" type: NORMAL + checkout main + merge develop id: "11" tag: "v1.1.0" +``` + +## 🔀 Release process + +1. Our release process starts with integration testing in a `develop` branch. Once all +changes that are desired in a release are merged into the `develop` branch, we run +the full set of tests on a clean checkout of the `develop` branch. +2. After testing, the `develop` branch is merged to main, and the `main` branch is tagged with +the new version number (e.g. `2.11.2`). At this point, the tip of the `main` branch will +reflect the new release and the `develop` branch can be fast-forwarded to sync with `main` to +start work on the next release. +3. Releases can be downloaded from the [GitHub releases page](https://github.com/DataONEorg/REPONAME/releases). + +## 🔬 Testing + +**Unit and integration tests**. We maintain a full suite of tests in the `tests` subdirectory. +Any new code developed should include a robust set of tests for each public +method, as well as integration tests from new feature sets. Tests should fully +exercise the feature to ensure that it responds correctly to both good data inputs +and various classes of corrupt or bad data. All tests should pass before submitting a PR +or merging to `develop`. + +Tests are automatically run via GitHub Actions. Check the root `README.md` file +for this GitHub Actions status badge and make sure it says "Passing": + +## 🎨 Code style + +Code should be written to professional standards to enable clean, well-documented, +readable, and maintainable software. While there has been significant variability +in the coding styles applied historically, new contributions should strive for +clean code formatting. We generally follow PEP8 guidelines for Python code formatting, +typically enforced through the `black` code formatting package. + +## 📄 Contributor license agreement + +In order to clarify the intellectual property license +granted with Contributions from any person or entity, you agree to +a Contributor License Agreement ("CLA") with the Regents of the University of +California (hereafter, the "Regents"). + +1. Definitions. + "You" (or "Your") shall mean the copyright owner or legal entity + authorized by the copyright owner that is making this Agreement + with the Regents. For legal entities, the entity making a + Contribution and all other entities that control, are controlled + by, or are under common control with that entity are considered to + be a single Contributor. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + "Contribution" shall mean any original work of authorship, + including any modifications or additions to an existing work, that + is intentionally submitted by You to the Regents for inclusion + in, or documentation of, any of the products owned or managed by + the Regents (the "Work"). For the purposes of this definition, + "submitted" means any form of electronic, verbal, or written + communication sent to the Regents or its representatives, + including but not limited to communication on electronic mailing + lists, source code control systems, and issue tracking systems that + are managed by, or on behalf of, the Regents for the purpose of + discussing and improving the Work, but excluding communication that + is conspicuously marked or otherwise designated in writing by You + as "Not a Contribution." +2. Grant of Copyright License. Subject to the terms and conditions of + this Agreement, You hereby grant to the Regents and to + recipients of software distributed by the Regents a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare derivative works of, + publicly display, publicly perform, sublicense, and distribute Your + Contributions and such derivative works. +3. Grant of Patent License. Subject to the terms and conditions of + this Agreement, You hereby grant to the Regents and to + recipients of software distributed by the Regents a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have + made, use, offer to sell, sell, import, and otherwise transfer the + Work, where such license applies only to those patent claims + licensable by You that are necessarily infringed by Your + Contribution(s) alone or by combination of Your Contribution(s) + with the Work to which such Contribution(s) was submitted. If any + entity institutes patent litigation against You or any other entity + (including a cross-claim or counterclaim in a lawsuit) alleging + that your Contribution, or the Work to which you have contributed, + constitutes direct or contributory patent infringement, then any + patent licenses granted to that entity under this Agreement for + that Contribution or Work shall terminate as of the date such + litigation is filed. +4. You represent that you are legally entitled to grant the above + license. If your employer(s) has rights to intellectual property + that you create that includes your Contributions, you represent + that you have received permission to make Contributions on behalf + of that employer, that your employer has waived such rights for + your Contributions to the Regents, or that your employer has + executed a separate Corporate CLA with the Regents. +5. You represent that each of Your Contributions is Your original + creation (see section 7 for submissions on behalf of others). You + represent that Your Contribution submissions include complete + details of any third-party license or other restriction (including, + but not limited to, related patents and trademarks) of which you + are personally aware and which are associated with any part of Your + Contributions. diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..261eeb9 --- /dev/null +++ b/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. From 41ee62c93c202b7aa939319697ade16a212048b7 Mon Sep 17 00:00:00 2001 From: Matt Jones Date: Wed, 18 Sep 2024 16:20:59 -0800 Subject: [PATCH 41/49] Update READEM to follow the standard repo template. --- README.md | 79 +++++++++++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 71 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index cf72ed0..3696b15 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,15 @@ ![VegBank](http://vegbank.org/vegbank/images/vegbank_logo69x100trans.gif) ![VegBank](http://vegbank.org/vegbank/images/vegbank_caps170x40outline.jpg) + +## VegBank + +- **Authors**: Last, First (ORCID); ... +- **License**: [Apache 2](http://opensource.org/licenses/Apache-2.0) +- [Package source code on GitHub](https://github.com/NCEAS/vegbank2) +- [**Submit Bugs and feature requests**](https://github.com/NCEAS/vegbank2/issues) +- Contact us: support@dataone.org + The [VegBank](http://vegbank.org) data system provides a community managed data portal for vegetation data, particularly plots, plant taxonomy, and communities. It is a product of the Ecological Society of America (ESA) Vegetation Panel, and is affiliated with the National Vegetation Classification (USNVC). VegBank provides a common storage system and web portal for accessing: @@ -9,17 +18,19 @@ VegBank provides a common storage system and web portal for accessing: - Plant taxonomy data - Community data +VegBank is an open source, community projects. We [welcome contributions](./CONTRIBUTING.md) in many forms, including code, graphics, documentation, bug reports, testing, etc. Use the [DataONE discussions](https://github.com/DataONEorg/dataone/discussions) to discuss these contributions with us. + ## Redesign VegBank was originally designed and implemented in the early 2000's using server technology of the time, particularly as a Java servlet providing access to data that is stored in a backend postgresql database, and using Apache Struts to build a web-based interface for querying and viewing the data. While the system has served well, most of these technology components have become obsolete, and need to be replaced. This repository is being used to [redesign VegBank](vegbank2-plans.md), which will be refactored into several standalone components: -- VegBank REST API -- VegBank Web UI: Core Features -- VegBank Web UI: Ancillary Features -- VegBank: New features -## Project deliverables +- [vegbank-service](.): the VegBank data system and API access service +- [vegbank-web](): the VegBank web application that accesses the service +- [vegbankr](.): the VegBank R package that accesses the service + +### Project deliverables -### Task 1: Project Planning and Reporting +#### Task 1: Project Planning and Reporting - D-1.1 Project start-up meeting - D-1.2 Detailed plan and timeline @@ -29,14 +40,66 @@ VegBank was originally designed and implemented in the early 2000's using server - Draft Report: prior to end of the contract term (01/05/2026) - Final Progress Report: Due prior to end of contract term (02/01/2026) -### Task 2: Improvements to VegBank Data Storage Design +#### Task 2: Improvements to VegBank Data Storage Design - D-2.1 Refactored data model and design plans - D-2.2 Deployed and refactored, open-source VegBank - D-2.3 Publish an open-source R package for VegBank -### Task 3: California Vegetation Data Upload into VegBank +#### Task 3: California Vegetation Data Upload into VegBank - D-3.1 Create tool for inducting California vegetation data - D-3.2 Induct California vegetation survey data into VegBank + +## Documentation + +Documentation is a work in progress, and can be found ... + +## Development build + +This is a python package, and built using the [Python Poetry](https://python-poetry.org) build tool. + +To install locally, create a virtual environment for python 3.12+, +install poetry, and then install or build the package with `poetry install` or `poetry build`, respectively. + +To run tests, navigate to the root directory and run `pytest -s`. The test suite contains tests that +take a longer time to run (relating to the storage of large files) - to execute all tests, run +`pytest --run-slow`. To see detailed + +## Usage Example + +```py +from product import Product + +# Example code here... + +``` + +## License +``` +Copyright [2024] [Regents of the University of California] + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +``` + +## Acknowledgements +Work on this package was supported by: + +- California Department of Fish and Wildlife +- DataONE Network +- National Center for Ecological Analysis and Synthesis, a Center funded by the University of California, Santa Barbara, and the State of California. +- National Science Foundation + +[![nceas_footer](https://www.nceas.ucsb.edu/sites/default/files/2020-03/NCEAS-full%20logo-4C.png)](https://www.nceas.ucsb.edu) + From fd20d31fc031d85d03b777ac9f9016bbb4b35182 Mon Sep 17 00:00:00 2001 From: Matt Jones Date: Wed, 18 Sep 2024 16:31:52 -0800 Subject: [PATCH 42/49] Moved database files to src/database directory. --- {migrations => src/database/migrations}/V1.0__vegbank.sql | 0 .../database/migrations}/V1.10__create_admin_user.sql | 0 .../database/migrations}/V1.11__populate_datadictionary.sql | 0 .../database/migrations}/V1.12__add_constraints.sql | 0 .../database/migrations}/V1.1__create_aggregrates.sql | 0 {migrations => src/database/migrations}/V1.2__create_extras.sql | 0 {migrations => src/database/migrations}/V1.3__create_indices.sql | 0 .../database/migrations}/V1.4__drop_vegbank_views.sql | 0 .../database/migrations}/V1.5__create_vegbank_views.sql | 0 .../database/migrations}/V1.6__vegbank_populate_configtables.sql | 0 .../database/migrations}/V1.7__create_temp_tbls.sql | 0 .../database/migrations}/V1.8__drop_vegbank_views.sql | 0 .../database/migrations}/V1.9__create_vegbank_views.sql | 0 {resources => src/database/resources}/README.md | 0 {resources => src/database/resources}/flyway.conf | 0 {sql => src/database/sql}/sql-logs/1_vegbank2_psql_output.txt | 0 .../sql}/sql-logs/2_vegbank2_psql_output_disable_v1.6.txt | 0 .../sql-logs/3_vegbank2_psql_output_hydrologicregime_update.txt | 0 .../sql}/sql-logs/4_vegbank2_psql_output_pg16_20240830.txt | 0 {sql => src/database/sql}/sql-transformations/README.md | 0 .../database/sql}/sql-transformations/VegBankModel2SQL.xsl | 0 .../sql}/sql-transformations/addCoverCodeToTaxImportance.sql | 0 .../database/sql}/sql-transformations/addInterpFldsToObs.sql | 0 {sql => src/database/sql}/sql-transformations/addObsSynDenorm.sql | 0 .../sql}/sql-transformations/addTaxonObsDenormPlantNames.sql | 0 .../sql}/sql-transformations/addTop5SppToObs_denormFlds.sql | 0 .../sql}/sql-transformations/add_currentaccepted_toconcept.sql | 0 .../sql}/sql-transformations/add_requestAccCodeTblFields.sql | 0 {sql => src/database/sql}/sql-transformations/csvtools.xsl | 0 .../database/sql}/sql-transformations/db_model_vegbank.xml | 0 .../sql-transformations/db_model_vegbank_updateSQLFileList.txt | 0 .../database/sql}/sql-transformations/dbmodel-to-ddtables.xsl | 0 {sql => src/database/sql}/sql-transformations/getvegbanksql.sh | 0 .../sql}/sql-transformations/getvegbanksql_datadictionary.sh | 0 .../sql-transformations/throwAways/add_datasetItem_denorms.sql | 0 .../throwAways/alterTaxObsDenormRenameSciNameToFull.sql | 0 .../sql}/sql-transformations/throwAways/createTable_dba_stats.sql | 0 37 files changed, 0 insertions(+), 0 deletions(-) rename {migrations => src/database/migrations}/V1.0__vegbank.sql (100%) rename {migrations => src/database/migrations}/V1.10__create_admin_user.sql (100%) rename {migrations => src/database/migrations}/V1.11__populate_datadictionary.sql (100%) rename {migrations => src/database/migrations}/V1.12__add_constraints.sql (100%) rename {migrations => src/database/migrations}/V1.1__create_aggregrates.sql (100%) rename {migrations => src/database/migrations}/V1.2__create_extras.sql (100%) rename {migrations => src/database/migrations}/V1.3__create_indices.sql (100%) rename {migrations => src/database/migrations}/V1.4__drop_vegbank_views.sql (100%) rename {migrations => src/database/migrations}/V1.5__create_vegbank_views.sql (100%) rename {migrations => src/database/migrations}/V1.6__vegbank_populate_configtables.sql (100%) rename {migrations => src/database/migrations}/V1.7__create_temp_tbls.sql (100%) rename {migrations => src/database/migrations}/V1.8__drop_vegbank_views.sql (100%) rename {migrations => src/database/migrations}/V1.9__create_vegbank_views.sql (100%) rename {resources => src/database/resources}/README.md (100%) rename {resources => src/database/resources}/flyway.conf (100%) rename {sql => src/database/sql}/sql-logs/1_vegbank2_psql_output.txt (100%) rename {sql => src/database/sql}/sql-logs/2_vegbank2_psql_output_disable_v1.6.txt (100%) rename {sql => src/database/sql}/sql-logs/3_vegbank2_psql_output_hydrologicregime_update.txt (100%) rename {sql => src/database/sql}/sql-logs/4_vegbank2_psql_output_pg16_20240830.txt (100%) rename {sql => src/database/sql}/sql-transformations/README.md (100%) rename {sql => src/database/sql}/sql-transformations/VegBankModel2SQL.xsl (100%) rename {sql => src/database/sql}/sql-transformations/addCoverCodeToTaxImportance.sql (100%) rename {sql => src/database/sql}/sql-transformations/addInterpFldsToObs.sql (100%) rename {sql => src/database/sql}/sql-transformations/addObsSynDenorm.sql (100%) rename {sql => src/database/sql}/sql-transformations/addTaxonObsDenormPlantNames.sql (100%) rename {sql => src/database/sql}/sql-transformations/addTop5SppToObs_denormFlds.sql (100%) rename {sql => src/database/sql}/sql-transformations/add_currentaccepted_toconcept.sql (100%) rename {sql => src/database/sql}/sql-transformations/add_requestAccCodeTblFields.sql (100%) rename {sql => src/database/sql}/sql-transformations/csvtools.xsl (100%) rename {sql => src/database/sql}/sql-transformations/db_model_vegbank.xml (100%) rename {sql => src/database/sql}/sql-transformations/db_model_vegbank_updateSQLFileList.txt (100%) rename {sql => src/database/sql}/sql-transformations/dbmodel-to-ddtables.xsl (100%) rename {sql => src/database/sql}/sql-transformations/getvegbanksql.sh (100%) rename {sql => src/database/sql}/sql-transformations/getvegbanksql_datadictionary.sh (100%) rename {sql => src/database/sql}/sql-transformations/throwAways/add_datasetItem_denorms.sql (100%) rename {sql => src/database/sql}/sql-transformations/throwAways/alterTaxObsDenormRenameSciNameToFull.sql (100%) rename {sql => src/database/sql}/sql-transformations/throwAways/createTable_dba_stats.sql (100%) diff --git a/migrations/V1.0__vegbank.sql b/src/database/migrations/V1.0__vegbank.sql similarity index 100% rename from migrations/V1.0__vegbank.sql rename to src/database/migrations/V1.0__vegbank.sql diff --git a/migrations/V1.10__create_admin_user.sql b/src/database/migrations/V1.10__create_admin_user.sql similarity index 100% rename from migrations/V1.10__create_admin_user.sql rename to src/database/migrations/V1.10__create_admin_user.sql diff --git a/migrations/V1.11__populate_datadictionary.sql b/src/database/migrations/V1.11__populate_datadictionary.sql similarity index 100% rename from migrations/V1.11__populate_datadictionary.sql rename to src/database/migrations/V1.11__populate_datadictionary.sql diff --git a/migrations/V1.12__add_constraints.sql b/src/database/migrations/V1.12__add_constraints.sql similarity index 100% rename from migrations/V1.12__add_constraints.sql rename to src/database/migrations/V1.12__add_constraints.sql diff --git a/migrations/V1.1__create_aggregrates.sql b/src/database/migrations/V1.1__create_aggregrates.sql similarity index 100% rename from migrations/V1.1__create_aggregrates.sql rename to src/database/migrations/V1.1__create_aggregrates.sql diff --git a/migrations/V1.2__create_extras.sql b/src/database/migrations/V1.2__create_extras.sql similarity index 100% rename from migrations/V1.2__create_extras.sql rename to src/database/migrations/V1.2__create_extras.sql diff --git a/migrations/V1.3__create_indices.sql b/src/database/migrations/V1.3__create_indices.sql similarity index 100% rename from migrations/V1.3__create_indices.sql rename to src/database/migrations/V1.3__create_indices.sql diff --git a/migrations/V1.4__drop_vegbank_views.sql b/src/database/migrations/V1.4__drop_vegbank_views.sql similarity index 100% rename from migrations/V1.4__drop_vegbank_views.sql rename to src/database/migrations/V1.4__drop_vegbank_views.sql diff --git a/migrations/V1.5__create_vegbank_views.sql b/src/database/migrations/V1.5__create_vegbank_views.sql similarity index 100% rename from migrations/V1.5__create_vegbank_views.sql rename to src/database/migrations/V1.5__create_vegbank_views.sql diff --git a/migrations/V1.6__vegbank_populate_configtables.sql b/src/database/migrations/V1.6__vegbank_populate_configtables.sql similarity index 100% rename from migrations/V1.6__vegbank_populate_configtables.sql rename to src/database/migrations/V1.6__vegbank_populate_configtables.sql diff --git a/migrations/V1.7__create_temp_tbls.sql b/src/database/migrations/V1.7__create_temp_tbls.sql similarity index 100% rename from migrations/V1.7__create_temp_tbls.sql rename to src/database/migrations/V1.7__create_temp_tbls.sql diff --git a/migrations/V1.8__drop_vegbank_views.sql b/src/database/migrations/V1.8__drop_vegbank_views.sql similarity index 100% rename from migrations/V1.8__drop_vegbank_views.sql rename to src/database/migrations/V1.8__drop_vegbank_views.sql diff --git a/migrations/V1.9__create_vegbank_views.sql b/src/database/migrations/V1.9__create_vegbank_views.sql similarity index 100% rename from migrations/V1.9__create_vegbank_views.sql rename to src/database/migrations/V1.9__create_vegbank_views.sql diff --git a/resources/README.md b/src/database/resources/README.md similarity index 100% rename from resources/README.md rename to src/database/resources/README.md diff --git a/resources/flyway.conf b/src/database/resources/flyway.conf similarity index 100% rename from resources/flyway.conf rename to src/database/resources/flyway.conf diff --git a/sql/sql-logs/1_vegbank2_psql_output.txt b/src/database/sql/sql-logs/1_vegbank2_psql_output.txt similarity index 100% rename from sql/sql-logs/1_vegbank2_psql_output.txt rename to src/database/sql/sql-logs/1_vegbank2_psql_output.txt diff --git a/sql/sql-logs/2_vegbank2_psql_output_disable_v1.6.txt b/src/database/sql/sql-logs/2_vegbank2_psql_output_disable_v1.6.txt similarity index 100% rename from sql/sql-logs/2_vegbank2_psql_output_disable_v1.6.txt rename to src/database/sql/sql-logs/2_vegbank2_psql_output_disable_v1.6.txt diff --git a/sql/sql-logs/3_vegbank2_psql_output_hydrologicregime_update.txt b/src/database/sql/sql-logs/3_vegbank2_psql_output_hydrologicregime_update.txt similarity index 100% rename from sql/sql-logs/3_vegbank2_psql_output_hydrologicregime_update.txt rename to src/database/sql/sql-logs/3_vegbank2_psql_output_hydrologicregime_update.txt diff --git a/sql/sql-logs/4_vegbank2_psql_output_pg16_20240830.txt b/src/database/sql/sql-logs/4_vegbank2_psql_output_pg16_20240830.txt similarity index 100% rename from sql/sql-logs/4_vegbank2_psql_output_pg16_20240830.txt rename to src/database/sql/sql-logs/4_vegbank2_psql_output_pg16_20240830.txt diff --git a/sql/sql-transformations/README.md b/src/database/sql/sql-transformations/README.md similarity index 100% rename from sql/sql-transformations/README.md rename to src/database/sql/sql-transformations/README.md diff --git a/sql/sql-transformations/VegBankModel2SQL.xsl b/src/database/sql/sql-transformations/VegBankModel2SQL.xsl similarity index 100% rename from sql/sql-transformations/VegBankModel2SQL.xsl rename to src/database/sql/sql-transformations/VegBankModel2SQL.xsl diff --git a/sql/sql-transformations/addCoverCodeToTaxImportance.sql b/src/database/sql/sql-transformations/addCoverCodeToTaxImportance.sql similarity index 100% rename from sql/sql-transformations/addCoverCodeToTaxImportance.sql rename to src/database/sql/sql-transformations/addCoverCodeToTaxImportance.sql diff --git a/sql/sql-transformations/addInterpFldsToObs.sql b/src/database/sql/sql-transformations/addInterpFldsToObs.sql similarity index 100% rename from sql/sql-transformations/addInterpFldsToObs.sql rename to src/database/sql/sql-transformations/addInterpFldsToObs.sql diff --git a/sql/sql-transformations/addObsSynDenorm.sql b/src/database/sql/sql-transformations/addObsSynDenorm.sql similarity index 100% rename from sql/sql-transformations/addObsSynDenorm.sql rename to src/database/sql/sql-transformations/addObsSynDenorm.sql diff --git a/sql/sql-transformations/addTaxonObsDenormPlantNames.sql b/src/database/sql/sql-transformations/addTaxonObsDenormPlantNames.sql similarity index 100% rename from sql/sql-transformations/addTaxonObsDenormPlantNames.sql rename to src/database/sql/sql-transformations/addTaxonObsDenormPlantNames.sql diff --git a/sql/sql-transformations/addTop5SppToObs_denormFlds.sql b/src/database/sql/sql-transformations/addTop5SppToObs_denormFlds.sql similarity index 100% rename from sql/sql-transformations/addTop5SppToObs_denormFlds.sql rename to src/database/sql/sql-transformations/addTop5SppToObs_denormFlds.sql diff --git a/sql/sql-transformations/add_currentaccepted_toconcept.sql b/src/database/sql/sql-transformations/add_currentaccepted_toconcept.sql similarity index 100% rename from sql/sql-transformations/add_currentaccepted_toconcept.sql rename to src/database/sql/sql-transformations/add_currentaccepted_toconcept.sql diff --git a/sql/sql-transformations/add_requestAccCodeTblFields.sql b/src/database/sql/sql-transformations/add_requestAccCodeTblFields.sql similarity index 100% rename from sql/sql-transformations/add_requestAccCodeTblFields.sql rename to src/database/sql/sql-transformations/add_requestAccCodeTblFields.sql diff --git a/sql/sql-transformations/csvtools.xsl b/src/database/sql/sql-transformations/csvtools.xsl similarity index 100% rename from sql/sql-transformations/csvtools.xsl rename to src/database/sql/sql-transformations/csvtools.xsl diff --git a/sql/sql-transformations/db_model_vegbank.xml b/src/database/sql/sql-transformations/db_model_vegbank.xml similarity index 100% rename from sql/sql-transformations/db_model_vegbank.xml rename to src/database/sql/sql-transformations/db_model_vegbank.xml diff --git a/sql/sql-transformations/db_model_vegbank_updateSQLFileList.txt b/src/database/sql/sql-transformations/db_model_vegbank_updateSQLFileList.txt similarity index 100% rename from sql/sql-transformations/db_model_vegbank_updateSQLFileList.txt rename to src/database/sql/sql-transformations/db_model_vegbank_updateSQLFileList.txt diff --git a/sql/sql-transformations/dbmodel-to-ddtables.xsl b/src/database/sql/sql-transformations/dbmodel-to-ddtables.xsl similarity index 100% rename from sql/sql-transformations/dbmodel-to-ddtables.xsl rename to src/database/sql/sql-transformations/dbmodel-to-ddtables.xsl diff --git a/sql/sql-transformations/getvegbanksql.sh b/src/database/sql/sql-transformations/getvegbanksql.sh similarity index 100% rename from sql/sql-transformations/getvegbanksql.sh rename to src/database/sql/sql-transformations/getvegbanksql.sh diff --git a/sql/sql-transformations/getvegbanksql_datadictionary.sh b/src/database/sql/sql-transformations/getvegbanksql_datadictionary.sh similarity index 100% rename from sql/sql-transformations/getvegbanksql_datadictionary.sh rename to src/database/sql/sql-transformations/getvegbanksql_datadictionary.sh diff --git a/sql/sql-transformations/throwAways/add_datasetItem_denorms.sql b/src/database/sql/sql-transformations/throwAways/add_datasetItem_denorms.sql similarity index 100% rename from sql/sql-transformations/throwAways/add_datasetItem_denorms.sql rename to src/database/sql/sql-transformations/throwAways/add_datasetItem_denorms.sql diff --git a/sql/sql-transformations/throwAways/alterTaxObsDenormRenameSciNameToFull.sql b/src/database/sql/sql-transformations/throwAways/alterTaxObsDenormRenameSciNameToFull.sql similarity index 100% rename from sql/sql-transformations/throwAways/alterTaxObsDenormRenameSciNameToFull.sql rename to src/database/sql/sql-transformations/throwAways/alterTaxObsDenormRenameSciNameToFull.sql diff --git a/sql/sql-transformations/throwAways/createTable_dba_stats.sql b/src/database/sql/sql-transformations/throwAways/createTable_dba_stats.sql similarity index 100% rename from sql/sql-transformations/throwAways/createTable_dba_stats.sql rename to src/database/sql/sql-transformations/throwAways/createTable_dba_stats.sql From 133651f298b88dff275774e2a815711cd2d548cd Mon Sep 17 00:00:00 2001 From: Matt Jones Date: Wed, 18 Sep 2024 16:56:39 -0800 Subject: [PATCH 43/49] Initial example pyproject.toml file for poetry build --- pyproject.toml | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 pyproject.toml diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..d084c91 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,25 @@ +[tool.poetry] +name = "vegbank" +version = "2.0.0-alpha1" +description = "VegBank database and data access service" +authors = [ + "Robert Shelton (shelton@nceas.ucsb.edu)", + "Dou Mok (mok@nceas.ucsb.edu)", + "Jim Regetz (regetz@nceas.ucsb.edu)", + "Matthew B. Jones (jones@nceas.ucsb.edu)" + ] +license = "Apache2" +readme = "README.md" + +[tool.poetry.dependencies] +python = "^3.12" + +[tool.poetry.group.dev.dependencies] +poetry = ">=1.8.3" +pytest = ">=8.3.3" +pylint = ">=3.2.7" +black = ">=24.8.0" + +[build-system] +requires = ["poetry-core"] +build-backend = "poetry.core.masonry.api" From b0f3b6be3d3441a0e3dd057bbc6559f824a17113 Mon Sep 17 00:00:00 2001 From: RWShelton Date: Wed, 25 Sep 2024 15:43:33 -0700 Subject: [PATCH 44/49] Adding helm chart with baseline postgres setup, updating gitignore with helm files --- .gitignore | 8 +++ helm/.helmignore | 23 +++++++ helm/Chart.yaml | 33 ++++++++++ helm/templates/configmap.yaml | 8 +++ helm/values.yaml | 119 ++++++++++++++++++++++++++++++++++ 5 files changed, 191 insertions(+) create mode 100644 helm/.helmignore create mode 100644 helm/Chart.yaml create mode 100644 helm/templates/configmap.yaml create mode 100644 helm/values.yaml diff --git a/.gitignore b/.gitignore index 32858aa..47f3a0a 100644 --- a/.gitignore +++ b/.gitignore @@ -10,3 +10,11 @@ # virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml hs_err_pid* + +# helm generated files +/helm/charts +/helm/Chart.lock + +# MacOS Generated Files +src/.DS_Store +.DS_Store diff --git a/helm/.helmignore b/helm/.helmignore new file mode 100644 index 0000000..0e8a0eb --- /dev/null +++ b/helm/.helmignore @@ -0,0 +1,23 @@ +# Patterns to ignore when building packages. +# This supports shell glob matching, relative path matching, and +# negation (prefixed with !). Only one pattern per line. +.DS_Store +# Common VCS dirs +.git/ +.gitignore +.bzr/ +.bzrignore +.hg/ +.hgignore +.svn/ +# Common backup files +*.swp +*.bak +*.tmp +*.orig +*~ +# Various IDEs +.project +.idea/ +*.tmproj +.vscode/ diff --git a/helm/Chart.yaml b/helm/Chart.yaml new file mode 100644 index 0000000..92498a9 --- /dev/null +++ b/helm/Chart.yaml @@ -0,0 +1,33 @@ +apiVersion: v2 +name: vegbank +description: A Helm chart for Kubernetes + +# A chart can be either an 'application' or a 'library' chart. +# +# Application charts are a collection of templates that can be packaged into versioned archives +# to be deployed. +# +# Library charts provide useful utilities or functions for the chart developer. They're included as +# a dependency of application charts to inject those utilities and functions into the rendering +# pipeline. Library charts do not define any templates and therefore cannot be deployed. +type: application + +# This is the chart version. This version number should be incremented each time you make changes +# to the chart and its templates, including the app version. +# Versions are expected to follow Semantic Versioning (https://semver.org/) +version: 0.1.0 + +# This is the version number of the application being deployed. This version number should be +# incremented each time you make changes to the application. Versions are not expected to +# follow Semantic Versioning. They should reflect the version the application is using. +# It is recommended to use it with quotes. +appVersion: "1.16.0" + +dependencies: +- name: postgresql + # @param version -- the bitnami postgresql CHART version, NOT the database version + # get full list using: $ helm search repo bitnami/postgresql --versions + # + version: 15.5.32 + repository: https://charts.bitnami.com/bitnami + condition: postgresql.enabled \ No newline at end of file diff --git a/helm/templates/configmap.yaml b/helm/templates/configmap.yaml new file mode 100644 index 0000000..cf3b368 --- /dev/null +++ b/helm/templates/configmap.yaml @@ -0,0 +1,8 @@ +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ .Release.Name }}-configmap +data: + myvalue: "Hello World" + + \ No newline at end of file diff --git a/helm/values.yaml b/helm/values.yaml new file mode 100644 index 0000000..3beb061 --- /dev/null +++ b/helm/values.yaml @@ -0,0 +1,119 @@ +# Default values for mychart. +# This is a YAML-formatted file. +# Declare variables to be passed into your templates. + +replicaCount: 1 + +image: + repository: nginx + pullPolicy: IfNotPresent + # Overrides the image tag whose default is the chart appVersion. + tag: "" + +imagePullSecrets: [] +nameOverride: "" +fullnameOverride: "" + +serviceAccount: + # Specifies whether a service account should be created + create: true + # Automatically mount a ServiceAccount's API credentials? + automount: true + # Annotations to add to the service account + annotations: {} + # The name of the service account to use. + # If not set and create is true, a name is generated using the fullname template + name: "" + +podAnnotations: {} +podLabels: {} + +podSecurityContext: {} + # fsGroup: 2000 + +securityContext: {} + # capabilities: + # drop: + # - ALL + # readOnlyRootFilesystem: true + # runAsNonRoot: true + # runAsUser: 1000 + +service: + type: ClusterIP + port: 80 + +ingress: + enabled: false + className: "" + annotations: {} + # kubernetes.io/ingress.class: nginx + # kubernetes.io/tls-acme: "true" + hosts: + - host: chart-example.local + paths: + - path: / + pathType: ImplementationSpecific + tls: [] + # - secretName: chart-example-tls + # hosts: + # - chart-example.local + +resources: {} + # We usually recommend not to specify default resources and to leave this as a conscious + # choice for the user. This also increases chances charts run on environments with little + # resources, such as Minikube. If you do want to specify resources, uncomment the following + # lines, adjust them as necessary, and remove the curly braces after 'resources:'. + # limits: + # cpu: 100m + # memory: 128Mi + # requests: + # cpu: 100m + # memory: 128Mi + +livenessProbe: + httpGet: + path: / + port: http +readinessProbe: + httpGet: + path: / + port: http + +autoscaling: + enabled: false + minReplicas: 1 + maxReplicas: 100 + targetCPUUtilizationPercentage: 80 + # targetMemoryUtilizationPercentage: 80 + +# Additional volumes on the output Deployment definition. +volumes: [] +# - name: foo +# secret: +# secretName: mysecret +# optional: false + +# Additional volumeMounts on the output Deployment definition. +volumeMounts: [] +# - name: foo +# mountPath: "/etc/foo" +# readOnly: true + +nodeSelector: {} + +tolerations: [] + +affinity: {} + +postgresql: + enabled: true + primary: + #borrowed this from metacat to get started, might need some further updating when we get to API time. + pgHbaConfiguration: | + host vegbank vegbank 0.0.0.0/0 password + host vegbank vegbank ::0/0 password + local all all trust + + + From bfae4a40a6ecae75c5d157187ec5ed35f275f364 Mon Sep 17 00:00:00 2001 From: Matt Jones Date: Mon, 30 Sep 2024 15:59:22 -0800 Subject: [PATCH 45/49] Add basic pytest framework. --- .gitignore | 163 +++++++++++++++++++++++++++++++++++++ README.md | 6 +- pyproject.toml | 5 ++ tests/test_vegbank2_app.py | 4 + 4 files changed, 175 insertions(+), 3 deletions(-) create mode 100644 tests/test_vegbank2_app.py diff --git a/.gitignore b/.gitignore index 47f3a0a..1ae086f 100644 --- a/.gitignore +++ b/.gitignore @@ -18,3 +18,166 @@ hs_err_pid* # MacOS Generated Files src/.DS_Store .DS_Store + +# Byte-compiled / optimized / DLL files +__pycache__/ +*.py[cod] +*$py.class + +# C extensions +*.so + +# Distribution / packaging +.Python +build/ +develop-eggs/ +dist/ +downloads/ +eggs/ +.eggs/ +lib/ +lib64/ +parts/ +sdist/ +var/ +wheels/ +share/python-wheels/ +*.egg-info/ +.installed.cfg +*.egg +MANIFEST + +# PyInstaller +# Usually these files are written by a python script from a template +# before PyInstaller builds the exe, so as to inject date/other infos into it. +*.manifest +*.spec + +# Installer logs +pip-log.txt +pip-delete-this-directory.txt + +# Unit test / coverage reports +htmlcov/ +.tox/ +.nox/ +.coverage +.coverage.* +.cache +nosetests.xml +coverage.xml +*.cover +*.py,cover +.hypothesis/ +.pytest_cache/ +cover/ + +# Translations +*.mo +*.pot + +# Django stuff: +*.log +local_settings.py +db.sqlite3 +db.sqlite3-journal + +# Flask stuff: +instance/ +.webassets-cache + +# Scrapy stuff: +.scrapy + +# Sphinx documentation +docs/_build/ + +# PyBuilder +.pybuilder/ +target/ + +# Jupyter Notebook +.ipynb_checkpoints + +# IPython +profile_default/ +ipython_config.py + +# pyenv +# For a library or package, you might want to ignore these files since the code is +# intended to run in multiple environments; otherwise, check them in: +# .python-version + +# pipenv +# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control. +# However, in case of collaboration, if having platform-specific dependencies or dependencies +# having no cross-platform support, pipenv may install dependencies that don't work, or not +# install all needed dependencies. +#Pipfile.lock + +# poetry +# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control. +# This is especially recommended for binary packages to ensure reproducibility, and is more +# commonly ignored for libraries. +# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control +#poetry.lock + +# pdm +# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control. +#pdm.lock +# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it +# in version control. +# https://pdm.fming.dev/latest/usage/project/#working-with-version-control +.pdm.toml +.pdm-python +.pdm-build/ + +# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm +__pypackages__/ + +# Celery stuff +celerybeat-schedule +celerybeat.pid + +# SageMath parsed files +*.sage.py + +# Environments +.env +.venv +env/ +venv/ +ENV/ +env.bak/ +venv.bak/ + +# Spyder project settings +.spyderproject +.spyproject + +# Rope project settings +.ropeproject + +# mkdocs documentation +/site + +# mypy +.mypy_cache/ +.dmypy.json +dmypy.json + +# Pyre type checker +.pyre/ + +# pytype static type analyzer +.pytype/ + +# Cython debug symbols +cython_debug/ + +# PyCharm +# JetBrains specific template is maintained in a separate JetBrains.gitignore that can +# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore +# and can be added to the global gitignore or merged into this file. For a more nuclear +# option (not recommended) you can uncomment the following to ignore the entire idea folder. +#.idea/ diff --git a/README.md b/README.md index 3696b15..0bb3e96 100644 --- a/README.md +++ b/README.md @@ -63,9 +63,9 @@ This is a python package, and built using the [Python Poetry](https://python-poe To install locally, create a virtual environment for python 3.12+, install poetry, and then install or build the package with `poetry install` or `poetry build`, respectively. -To run tests, navigate to the root directory and run `pytest -s`. The test suite contains tests that -take a longer time to run (relating to the storage of large files) - to execute all tests, run -`pytest --run-slow`. To see detailed +To run tests, navigate to the root directory and run `poetry run pytest`. If the test suite contains tests that +take a longer time to run (e.g., relating to the storage of large files) - mark them as `slow` and to execute all tests, run +`pytest --run-slow`. ## Usage Example diff --git a/pyproject.toml b/pyproject.toml index d084c91..84ba9f9 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -23,3 +23,8 @@ black = ">=24.8.0" [build-system] requires = ["poetry-core"] build-backend = "poetry.core.masonry.api" + +[tool.pytest.ini_options] +addopts = [ + "--import-mode=importlib", +] diff --git a/tests/test_vegbank2_app.py b/tests/test_vegbank2_app.py new file mode 100644 index 0000000..6172ccc --- /dev/null +++ b/tests/test_vegbank2_app.py @@ -0,0 +1,4 @@ +# Overall application tests that aren't specific to a particular module + +def test_always_passes(): + assert True From 32072e31e0055e5d48016d572ab733ad3f9a7e33 Mon Sep 17 00:00:00 2001 From: Matt Jones Date: Mon, 30 Sep 2024 16:41:17 -0800 Subject: [PATCH 46/49] Iniital poetry-based Github Action for CI. --- .github/workflows/python-app.yaml | 34 +++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 .github/workflows/python-app.yaml diff --git a/.github/workflows/python-app.yaml b/.github/workflows/python-app.yaml new file mode 100644 index 0000000..7459d34 --- /dev/null +++ b/.github/workflows/python-app.yaml @@ -0,0 +1,34 @@ +# This workflow will install Python dependencies, run tests and lint with a single version of Python +# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python + +name: Python build and test + +on: + push: + branches: [ "main", "develop" ] + pull_request: + branches: [ "main", "develop" ] + +permissions: + contents: read + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + - name: Set up Python 3.12 + uses: actions/setup-python@v3 + with: + python-version: "3.12" + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install poetry + poetry install + #if [ -f requirements.txt ]; then pip install -r requirements.txt; fi + - name: Test with pytest + run: | + poetry run pytest From 767aaacf089bbe9ad1e7d4cc3c14ddc8458b6a08 Mon Sep 17 00:00:00 2001 From: Matt Jones Date: Mon, 30 Sep 2024 16:41:52 -0800 Subject: [PATCH 47/49] Fix syntax errors in authors list. --- pyproject.toml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 84ba9f9..d46ed73 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -3,10 +3,10 @@ name = "vegbank" version = "2.0.0-alpha1" description = "VegBank database and data access service" authors = [ - "Robert Shelton (shelton@nceas.ucsb.edu)", - "Dou Mok (mok@nceas.ucsb.edu)", - "Jim Regetz (regetz@nceas.ucsb.edu)", - "Matthew B. Jones (jones@nceas.ucsb.edu)" + "Robert Shelton ", + "Dou Mok ", + "Jim Regetz ", + "Matthew B. Jones " ] license = "Apache2" readme = "README.md" From 2fca57550d8dd03b4d624b4c3945e63e29c820db Mon Sep 17 00:00:00 2001 From: Matt Jones Date: Mon, 30 Sep 2024 17:01:23 -0800 Subject: [PATCH 48/49] Add description of Github action (and `act`) to README --- README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.md b/README.md index 0bb3e96..d5c9641 100644 --- a/README.md +++ b/README.md @@ -67,6 +67,10 @@ To run tests, navigate to the root directory and run `poetry run pytest`. If the take a longer time to run (e.g., relating to the storage of large files) - mark them as `slow` and to execute all tests, run `pytest --run-slow`. +The GitHub repository has also been configured to run a [continuous integration build](https://github.com/NCEAS/vegbank2/actions) which executes the `poetry run pytest` command in the standard poetry-maintained virtual environment. To test the action run locally, you can install the `act` commandline client (e.g., `brew install act`) and then execute the actions from the local commandline. This depends on a local docker instance being configured, and the first run will take longer as the initial docker images are pulled. Thereafter, checking the action build before pushing commits can be run, for example, for the mac with: + +- `act --container-architecture linux/amd64` + ## Usage Example ```py From e35b3dce7750f7bafffb5063f8a466125b632105 Mon Sep 17 00:00:00 2001 From: Matt Jones Date: Tue, 1 Oct 2024 09:54:03 -0800 Subject: [PATCH 49/49] Misc editorial fixes from feedback on PR #32 --- CONTRIBUTING.md | 14 +++++++------- README.md | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 91b3701..0bb8803 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -15,12 +15,12 @@ We welcome all types of contributions, including bug fixes, feature enhancements, bug reports, documentation, graphics, and many others. You might consider contributing by: -- Report a bug or request a new feature in our [issue tracker](https://github.com/DataONEorg/REPONAME/issues) +- Report a bug or request a new feature in our [issue tracker](https://github.com/NCEAS/vegbank2/issues) - Fix a bug and contribute the code with a Pull Request - Write or edit some documentation - Sharing helpful tips or FAQ-type answers to users or future contributors -- Create screenshots or tutorials of features of MetacatUI -- Answer questions on DataONE Discussions +- Create screenshots or tutorials of features +- Answer questions on discussion boards and mailing lists - ... This is an open source project, and we welcome full @@ -34,8 +34,8 @@ We use the pull-request model for contributions. See [GitHub's help on pull-requ In short: -- add an [issue](https://github.com/DataONEorg/REPONAME/issues) describing your planned changes, or add a comment to an existing issue; -- on GitHub, fork the [repository](https://github.com/DataONEorg/REPONAME) +- add an [issue](https://github.com/NCEAS/vegbank2/issues) describing your planned changes, or add a comment to an existing issue; +- on GitHub, fork the [repository](https://github.com/NCEAS/vegbank2) - on your computer, clone your forked copy of the repository - base your work on the `develop` branch and commit your changes - push your branch to your forked repository, and submit a pull-request @@ -45,7 +45,7 @@ In short: ## 🚀 Development Workflow -Development is managed through the git repository at https://github.com/DataONEorg/REPONAME. The repository is organized into several branches, each with a specific purpose. +Development is managed through the git repository at https://github.com/NCEAS/vegbank2. The repository is organized into several branches, each with a specific purpose. **main**. The `main` branch represents the stable branch that is constantly maintained with the current release. It should generally be safe to install and use the `main` branch the same way as binary releases. The version number in all configuration files and the README on the `main` branch follows [semantic versioning](https://semver.org/) and should always be set to the current stable release, for example `2.8.5`. @@ -113,7 +113,7 @@ the full set of tests on a clean checkout of the `develop` branch. the new version number (e.g. `2.11.2`). At this point, the tip of the `main` branch will reflect the new release and the `develop` branch can be fast-forwarded to sync with `main` to start work on the next release. -3. Releases can be downloaded from the [GitHub releases page](https://github.com/DataONEorg/REPONAME/releases). +3. Releases can be downloaded from the [GitHub releases page](https://github.com/NCEAS/vegbank2/releases). ## 🔬 Testing diff --git a/README.md b/README.md index d5c9641..2f43440 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ - **License**: [Apache 2](http://opensource.org/licenses/Apache-2.0) - [Package source code on GitHub](https://github.com/NCEAS/vegbank2) - [**Submit Bugs and feature requests**](https://github.com/NCEAS/vegbank2/issues) -- Contact us: support@dataone.org +- Contact us: help@vegbank.org The [VegBank](http://vegbank.org) data system provides a community managed data portal for vegetation data, particularly plots, plant taxonomy, and communities. It is a product of the Ecological Society of America (ESA) Vegetation Panel, and is affiliated with the National Vegetation Classification (USNVC).