-
Notifications
You must be signed in to change notification settings - Fork 0
Questions
regetz edited this page Oct 13, 2025
·
7 revisions
This applies to both plants and communities
- What is special about the name attached directly to the concept record?
- Given that most concepts have multiple usages, and each usage has a name, what is the expected relationship between the (directly linked) concept name and the usage names?
This applies to both plants and communities
- Presumably at the time of (new) concept upload, we only need to support one status record per (new) concept
- Do we need to provide a way to create a new status record? Who and when? What happens to the old one?
- In the case of multiple status records, do we ever need to return more than one? Is just the most recent one sufficient?
- What if it's a "historical" query, i.e. could there be a desire to known what the status was sometime in the past, like at the time of observation record creation?
The commCorrelation table (currently 34,377 records) documents a particular relationship between two community concepts. Questions:
- Why does
commCorrelationlinkcommConcept<-->commStatus, rather thancommConcept<-->commConcept?- Note: In all current cases, the referenced
commStatuspoints to a differentcommConceptthan the one referenced directly by thecommCorrelationrecord (which makes sense, but isn't enforced by the DB). Moreover, there are no cases where
- Note: In all current cases, the referenced
- Does it matter which one is linked via
commConceptand which ascommStatus? - What do we want to store here?
- Do we need to support adding new correlations independently of adding new concepts, or is sufficient to expose this only at the time of adding new concepts (which can, via the loader tables, be correlated either to existing concepts in VegBank or to other new concepts being loaded).
- Ditch
partyMembertable. It has zero records. - Do we need all of the columns of
party(which currently has 4,038 records)?-
organizationname,surname,givenname, and maybemiddlenameall seem reasonable -
emailis populated for 324 parties -
currentname_idis always null -
salutationis null in all but 1 case -
contactinstructionsis null in all by 4 cases, 3 of which are organization URLs and 1 is uninformative -
partytypeis "person" in 102 cases, and null otherwise - What do we want to do with
partyPublic? - Add ORCID field?
- Add ROR field?
-
- What
addressinformation do we want to capture, if any?- Current schema has separate
addresstable with 622 entries - No parties have more than one address, which means current data could be a captured in the
partytable - 268 parties have no email in the
partytable, but do have email in theaddresstable. (Plus 13 records with email in both tables; in all cases, the two email addresses are identical) -
phonetypeis usually "work"/"Work", less often "Not specified" and "Cell" in 2 cases
- Current schema has separate
- What
telephoneinformation do we want to capture, if any?- Current schema has separate
telephonetable with 404 entries - No parties have more than one telephone, which means current data could be a field in the
partytable -
phonetypeis usually "work"/"Work", less often "Not specified" and "Cell" in 2 cases
- Current schema has separate
The original VegBank application maintains a number of denormalized and calculated fields for performance reasons, beyond what is documented in the ERD. We need to either live without them, or introduce logic somewhere for keeping them updated.
- Embargo info
plot.emb_plotobservation.emb_observationdisturbanceobs.emb_disturbanceobssoilobs.emb_soilobscommclass.emb_commclassclasscontributor.emb_classcontributorcomminterpretation.emb_comminterpretationtaxonobservation.emb_taxonobservationtaxonimportance.emb_taxonimportancestemcount.emb_stemcountstemlocation.emb_stemlocationtaxoninterpretation.emb_taxoninterpretationtaxonalt.emb_taxonalt
- Plant concept info
-
plantconcept.plantname(set from plantname) -
plantconcept.d_currentaccepted(set from plantstatus where (stopdate is null OR stopdate>now()) AND lower(plantconceptstatus)='accepted')) -
plantusage.plantconcept_id(set from plantstatus) -
plantusage.plantname(set from plantname) -
plantusage.party_id(set from plantstatus)
-
- Plant concept info
-
commconcept.commname(set from commname) -
commconcept.d_currentaccepted(set from commstatus where (stopdate is null OR stopdate>now()) AND lower(commconceptstatus)='accepted')) -
commusage.commconcept_id(set from commstatus) -
commusage.commname(set from commname) -
commusage.party_id(set from commstatus)
-
- Observation denorms
-
comminterpretation.commname(set from commname) -
plot.country: set to min(placename) from namedplace via place where placesystem='area|country|territory' -
plot.stateProvince: set to min(placename) from namedplace via place where placesystem='region|state|province' -
stratum.stratummethod_id: set to stratummethod_id from stratumtype -
stratum.stratumname: set to stratumname from stratumtype -
taxonimportance.stratumheight: set to stratumheight from stratum -
taxonimportance.stratumbase: set to stratumbase from stratum
-
- Observation counts and one date
-
commConcept.d_obscount: set tocount(distinct observation_id)from view_notemb_taxonobservation via taxoninterpretation -
plantConcept.d_obscount: set tocount(distinct observation_id)from view_notemb_commclass via comminterpretation -
namedPlace.d_obscount: set to count(1) from place -
party.d_obscount: set to countallcontrib from view_browseparty_all_count -
project.d_obscount: set to count(1) from view_notemb_observation -
project.d_lastPlotAddedDateset tomax(dateentered)from view_notemb_observation -
taxonimportance.coverCode: set via multi-step logic!
-
- Taxon observation plant interpretations
-
taxonobservation.int_origplantconcept_idset tomin(plantconcept_ID)from taxoninterpretation -
taxonobservation.int_origPlantSciFullset to sciname from temptbl_std_plantnames based on int_origplantconcept_id (classsystem 'Scientific', party_id 511, usage stop is NULL) -
taxonobservation.int_currPlantSciNameNoAuthset to scinamenoauth from temptbl_std_plantnames based on int_origplantconcept_id (classsystem 'Scientific without authors', party_id 511, usage stop is NULL) -
taxonobservation.int_currPlantCodeset to code from temptbl_std_plantnames based on int_origplantconcept_id (classsystem 'Code', party_id 511, usage stop is NULL) -
taxonobservation.int_currPlantCommonset to common from temptbl_std_plantnames based on int_origplantconcept_id (classsystem 'English Common', party_id 511, usage stop is NULL)
-
- Observation original comm interpretations (first one created)
-
observation.interp_orig_ci_IDset to comminterpretation.comminterpretation_ID via commclass with min(classStartDate) -
observation.interp_orig_cc_IDset to commconcept_ID from comminterpretation using interp_orig_ci_ID -
observation.interp_orig_scinameset to sciname from temptbl_std_commnames using interp_orig_ci_ID -
observation.interp_orig_codeset to code from temptbl_std_commnames using interp_orig_ci_ID -
observation.interp_orig_party_IDset to party_ID from classcontributor via comminterpretation using using interp_orig_ci_ID LIMIT 1 -
observation.interp_orig_partyNameset to party_id_transl from view_party_transl using interp_orig_ci_ID
-
- Observation current comm interpretations (last one created based on commclass.classstartdate)
-
observation.interp_current_ci_IDset to comminterpretation.comminterpretation_ID via commclass with max(classStartDate) - If interp_current_ci_ID == interp_orig_ci_ID, set
currto what was just set fororigeverywhere (cc_ID, sciname, code, party_ID, partyname), else repeat the 5 updates above using interp_current_ci_ID instead of interp_orig_ci_ID -
observation.interp_bestfit_ci_IDset to comminterpretation_ID from [view_comminterp_more] LIMIT 1 ordered by classfitnum (asc), classconfidencenum (desc) - If interp_bestfit_ci_ID == interp_orig_ci_ID, set
currto what was just set fororigeverywhere (cc_ID, sciname, code, party_ID, partyname), else if interp_bestfit_ci_ID == interp_current_ci_ID use what was just set forcurreverywhere, else repeat the 5 updates above using interp_current_ci_ID
-
- Observation top taxa
-
observation.topTaxon2Nameset tocoalesce(int_currplantscinamenoauth, authorplantName)from view_taxonobs_withmaxcover ordered by maxcover limit 1 offset 1 -
observation.topTaxon3Nameset tocoalesce(int_currplantscinamenoauth, authorplantName)from view_taxonobs_withmaxcover ordered by maxcover limit 1 offset 2 -
observation.topTaxon4Nameset tocoalesce(int_currplantscinamenoauth, authorplantName)from view_taxonobs_withmaxcover ordered by maxcover limit 1 offset 3 -
observation.topTaxon5Nameset tocoalesce(int_currplantscinamenoauth, authorplantName)from view_taxonobs_withmaxcover ordered by maxcover limit 1 offset 4 -
observation.topTaxon1Nameset tocoalesce(int_currplantscinamenoauth, authorplantName)from view_taxonobs_withmaxcover ordered by maxcover limit 1 offset 0 -
observation.latitudepotentially roundreallatitudedepending on confidentialitystatus (see here) -
observation.longitudepotentially roundreallongitudedepending on confidentialitystatus (see here)
-
- (more TBD? -- see starting here)