Opened 5 years ago

Last modified 4 years ago

#2468 addressed enhancement

create taxonomy synonym mapping table

Reported by: Melanie Schori Owned by: Benjamin Haag
Priority: medium Milestone: Server 2.3.1
Component: Database, Schema Changes Version: N/A
Severity: Keywords:
Cc: Database Engine: N/A
Operating System: N/A

Description

Please create a new table taxonomy_synonym_map to store species synonym relationships. The fields should be ID (pkey), taxonomy_species_ID fkey, synonym_code, taxonomy_species_ID fkey, and note.

The friendly names for these fields should be Taxon A, Synonym Code, Taxon B, and Note. The user interface/dataview will need to display the name_authority as Taxon Authority for each taxonomy_species_ID as well to replicate the Taxon, Taxon Authority format that's used in the taxonomy_species table. That will produce:

ID Taxon A Taxon Authority Synonym Code Taxon B Taxon Authority Note

as the column names in the dataview, with Taxon Authority being displayed automatically (not editable) after a species ID is pulled in with a lookup and the record is saved. The table should require a value other than NULL in every field except note, and the unique index should be the combination of Taxon A, synonym_code, and Taxon B.

The table can initially be populated from data in taxonomy species, but it will need most data entered by hand, so there need to be dataviews created for the CT and ST under the taxonomy area as well as adding the table into the online taxonomy editor.

Attachments (3)

get_taxonomy_species_synonym_map_20220811.dataviewxml​ (15.2 KB ) - added by Benjamin Haag 4 years ago.
Trac_2468_Table.sql​ (3.0 KB ) - added by Benjamin Haag 22 months ago.
SQL used to create table and keys.
Trac_2468_Data.sql​ (489 bytes ) - added by Benjamin Haag 22 months ago.
SQL used to populate table with data mapped from taxonomy_species.

Download all attachments as: .zip

Change History (12)

comment:1 by Benjamin Haag, 4 years ago

On DEV:
1) Created taxonomy_synonym_map table.
2) Created get_taxonomy_species_synonym_map dataview. Parameters may need refinement.

comment:2 by Benjamin Haag, 4 years ago

Milestone: → Server 2.3.1
Status: assigned → addressed

comment:3 by Benjamin Haag, 4 years ago

Modified (corrected) get_taxonomy_species_synonym_map dataview. The parameters are:
1) Subject Species ID (list)
2) Synonym Code (exact match)
3) Predicate Species ID (list)

The "subject" species ID corresponds to the species ID; "predicate" corresponds to the "current" ID.

comment:4 by Benjamin Haag, 4 years ago

Added taxon A and B Name Authority fields.

comment:5 by Benjamin Haag, 4 years ago

1) Added Note field.
2) Updated attachment with dataview SQL>

comment:6 by Benjamin Haag, 4 years ago

Component: Database, Schema Changes → Taxonomy

comment:7 by Benjamin Haag, 4 years ago

Component: Taxonomy → Database, Schema Changes

comment:8 by Benjamin Haag, 4 years ago

1) Created taxonomy_species_synonym_map table on production.
2) Created get_taxonomy_species_synonym_map dataview, also on production.

comment:9 by Benjamin Haag, 4 years ago

Verified with Kurt Endress that dataview is functional on production. Awaiting testing.

by Benjamin Haag, 22 months ago

Attachment: Trac_2468_Table.sql​ added

SQL used to create table and keys.

by Benjamin Haag, 22 months ago

Attachment: Trac_2468_Data.sql​ added

SQL used to populate table with data mapped from taxonomy_species.

Note: See TracTickets for help on using tickets.