Mapping types

From Filtered Push Wiki
Jump to: navigation, search

For query

  1. simple mapping: Field a in schema A directly mapped to field b in schema B and they are of the same type
  2. simple mapping with data transformation: Field a in schema A directly mapped to field b in schema B, but they are of different types
  3. two or more fields are mapped to a single field
    1. example: in arctos, collection.guid_prefix || ':' ||cataloged_item.cat_num is mapped to 'guid'
  4. one field is mapped to more than one fields
  5. one field will be mapped into one field by being applied a function, which depends on other field
    1. In arctos, to_meters(locality.maximum_elevation, locality.orig_elev_units) is mapped to 'max_elev_in_m', where the 'unit' will determine the way you convert an elevation value.
  6. a synthesized field is mapped to one field. The inverse of this mapping would be map one field to multiple records.
    1. example: in arctos, concatidentifiers(cataloged_item.collection_object_id) is mapped to 'identifiedby', where 'concatidentifiers' will concatenate all records of identifier name related to the collection object, which are stored in a separate table.
    2. This looks like a hard case to express for logic based mapping description

For update with new annotations

update with schema mapping

  1. Three expectations:
    1. insert: For example, an annotator asserts a new determination of a specimen, which he only want a local data source to insert not to replace local determination with.
    2. update: For example, an annotator want a local source to update its corresponding record by asserting a misspelling in the determination of a specimen.
    3. delete: For example, an annotator want a local source to remove a property assertion of a specimen by asserting it is irrelevant.
  • Local schema:Focus on two dimensions: normalized or not (N), determination to specimen modeled as many to one or not(M)
    • a. not N and not M: (specimenID, taxon of the determination, ......,)
    • b. N and not M: (specimenID, taxonID for determination, .....) (taxonID, parent taxonID, ....)
    • c. N and M: (specimenID, ....),(determinationID, taxonID, specimenID,...), (taxonID, parent taxonID, ....)
    • d. not N but M: (specimenID, ....),(determinationID, taxon, specimenID,...)


  • Expected local action:
    • 1 and a: There is no way to insert a new determination without wiping out the old value, which means human interference is needed.
    • 1 and b: There is no way to insert a new determination without wiping out the old value, which means human interference is needed. More over, if the new determination is accepted, some more actions are needed in the taxon hierarchy structure: if the taxon of the new determination exists, a reference change in the specimen record is enough. If not, more insertion need to be triggered.
    • 1 and c: Add a new determination into the determination table. if the new determination is accepted, some more actions are needed in the taxon hierarchy structure: if the taxon of the new determination exists, a reference change in the specimen record is enough. If not, more insertion need to be triggered.
    • 1 and d: Add a new determination into the determination table.
    • 2 and a: update the determination field
    • 2 and b: Make the determination field refer to a new taxon. If the new does not exist, more insertion need to be triggered.
    • 2 and c: Make the determination field refer to a new taxon. If the new does not exist, more insertion need to be triggered.
    • 2 and d: update the determination field