Opened 7 years ago

Closed 6 years ago

#1924 closed enhancement (fixed)

Refactor Taxonomy CWR Table Into Normalized Tables

Reported by: Benjamin Haag Owned by: Benjamin Haag
Priority: critical Milestone: Server 1.10.6
Component: Other Version: N/A
Severity: Keywords:
Cc: Database Engine: N/A
Operating System: N/A

Description

Refactor the taxonomy_cwr table as specified in the SQL statements in the attached file.

Attachments (1)

Trac_1924.Dataviews.sql​ (3.7 KB ) - added by Benjamin Haag 7 years ago.
DataView SQL

Download all attachments as: .zip

Change History (12)

comment:1 by Benjamin Haag, 7 years ago

Owner: set to Benjamin Haag
Status: new → assigned

comment:2 by Benjamin Haag, 7 years ago

Modify tables as follows:

taxonomy_ref_cwr_trait

  1. Change “desc” to “code”
  2. Add field for Title (SEE CODE VALUE)
  3. Desc will contain long desc – “rollover” definition 3.1. Obtain from code_val_lang (?)

taxonomy_ref_cwr_breeding_type

  1. Also use “code”, “title”, “desc” columns and naming convention.

taxonomy_cwr_trait_map

  1. Need to add columns that are currently in taxonomy_cwr: 1.1. breeding_usage 1.2. ontology_trait_identifier 1.3. citation (FK) 1.4. note

comment:3 by Benjamin Haag, 7 years ago

Tables completed and populated on dev, with minor revisions:

  1. get_taxonomy_ref_cwr_trait is a lookup of all traits (all values in code_value where group_name is 'CWR_TRAIT_CLASS').
  2. taxonomy_ref_cwr_breeding_type is a lookup of all breeding types (all values in code_value where group_name = 'CWR_BREEDING_TYPE')
  3. taxonomy_cwr_trait_map identifies each Crop Wild Relative, each row containing a unique combination of species ID, breeding type ID, and trait ID.

comment:4 by Benjamin Haag, 7 years ago

Correction; table name is taxonomy_ref_cwr_trait.

Dataviews created for each; name in each case is get_<>>TABLE NAME>>.

comment:5 by Benjamin Haag, 7 years ago

Status: assigned → accepted

Updates:

  1. For consistency's sake, the displayed field names will need to be tweaked slightly to match the format used in other tables. 1.1. ref_cwr_trait: Taxonomy Ref CWR Trait ID, Trait Code, Title, Description,

Created Date, Created By, Modified Date, Modified By, Owned Date, Owned By

1.2. ref_cwr_breeding_type: Taxonomy Ref CWR Breeding Type ID, Breeding Type Code,

Title, Description, Created Date, Created By, Modified Date, Modified By, Owned
Date, Owned By

  1. For CWR trait map, the first change I need is for the dataview to show the crop name instead of the crop_id number, the species name instead of the taxonomy_species_id number, the breeding type title instead of the ref_cwr_breeding_type_id number, and the trait title instead of the ref_cwr_trait_id number. The field names will need to be formatted to match the style of those outlined above.
  2. The citation field will need to display the citation text in the same format that's used for the current CWR table on production.

by Benjamin Haag, 7 years ago

Attachment: Trac_1924.Dataviews.sql​ added

DataView SQL

comment:6 by Benjamin Haag, 7 years ago

Completed changes to DataViews on dev.

comment:7 by Benjamin Haag, 7 years ago

Table taxonomy_cwr now has a FK to taxonomy_crop (on dev).

comment:8 by Benjamin Haag, 7 years ago

Milestone: Next Release - Server → Server 1.10.6

comment:9 by Benjamin Haag, 7 years ago

Resolution: → fixed
Status: accepted → closed

Resolution

Tables created and incorporated into build 1.10.6.

comment:10 by Benjamin Haag, 7 years ago

Resolution: fixed
Status: closed → reopened

comment:11 by Benjamin Haag, 6 years ago

Resolution: → fixed
Status: reopened → closed
Note: See TracTickets for help on using tickets.