Project

General

Profile

Auto-forwarding

A technique for populating recursive hierarchies during dup-select, where the import process attempts to create a maximally-nested hierarchy for every row, but for rows that have fewer than the maximum # of levels, each empty level is pruned and the parent fkey is auto-forwarded to the next level below it. The auto-forwarding takes place in the dup-select trigger, which detects the absence of a pkey1 and the presence of a parent fkey, and returns the parent fkey as the pkey.

This is an improvement over auto-folding, although it does require schema or import algorithm support. Unlike auto-folding, it does not require the pkey to be manually populated to the parent fkey for the empty levels, because this happens automatically.

This technique is used to populate the VegBIEN taxonomic hierarchy, where rows usually provide a subset of the full possible range of taxonomic ranks, and the levels for nonexistent ranks need to be bypassed upon import. It is also used to populate the VegCore/VegBIEN2 sampling event hierarchy for datasources other than VegBank/CVS, where the nested stratum event is empty and gets pruned.

1 or any other applicable constraint violation (column-based import currently auto-forwards for all constraint violations, which may not always be desirable)

2 for VegBIEN, this uses the XPath command /_simplifyPath:[next=parent_id]/path. for VegCore, this is implemented inside the dup-select trigger for tables that have a parent pointer.