Project

General

Profile

« Previous | Next » 

Revision 6791

schemas/vegbien.sql: Allow multiple institutionCodes for each specimenreplicate by linking new sourcelist table many-to-many to source via sourcename (which is now a linking table)

View differences:

VegBIEN.csv
52 52
loanto,"/location/locationevent/taxonoccurrence/aggregateoccurrence/notes/_join/6/_label[label=""loaned to""]/value",
53 53
inorout,"/location/locationevent/taxonoccurrence/aggregateoccurrence/notes/_join/7/_label[label=""in or out""]/value",
54 54
collectno,/location/locationevent/taxonoccurrence/aggregateoccurrence/plantobservation/collectionnumber,
55
accession,"/location/locationevent/taxonoccurrence/aggregateoccurrence/plantobservation/specimenreplicate/institution_id/sourcename/_if[@name=""if specimen""]/cond/_exists","Globally unique, although occasionally duplicated. [1]
55
accession,"/location/locationevent/taxonoccurrence/aggregateoccurrence/plantobservation/specimenreplicate/institution_id/sourcelist/_if[@name=""if specimen""]/cond/_exists","Globally unique, although occasionally duplicated. [1]
56 56

  
57 57
[1] Using the following query:
58 58
-----
......
61 61
GROUP BY herbarium, accession
62 62
HAVING count(*) > 1
63 63
-----"
64
herbarium,"/location/locationevent/taxonoccurrence/aggregateoccurrence/plantobservation/specimenreplicate/institution_id/sourcename/_if[@name=""if specimen""]/then/matched_source_id/source/shortname",
65
herbarium,"/location/locationevent/taxonoccurrence/aggregateoccurrence/plantobservation/specimenreplicate/institution_id/sourcename/_if[@name=""if specimen""]/then/name",
64
herbarium,"/location/locationevent/taxonoccurrence/aggregateoccurrence/plantobservation/specimenreplicate/institution_id/sourcelist/_if[@name=""if specimen""]/then/name",
65
herbarium,"/location/locationevent/taxonoccurrence/aggregateoccurrence/plantobservation/specimenreplicate/institution_id/sourcelist/_if[@name=""if specimen""]/then/sourcename/matched_source_id/source/shortname",
66
herbarium,"/location/locationevent/taxonoccurrence/aggregateoccurrence/plantobservation/specimenreplicate/institution_id/sourcelist/_if[@name=""if specimen""]/then/sourcename/name",
66 67
accession,/location/locationevent/taxonoccurrence/aggregateoccurrence/plantobservation/specimenreplicate/sourceaccessioncode,"Globally unique, although occasionally duplicated. [1]
67 68

  
68 69
[1] Using the following query:

Also available in: Unified diff