Clarifying alias-using foreign keys

In a conversation with @martinwellman, who is developing out the LinkML schema (essentially a flattened YAML version) for the ODM, we realized we don’t make it very machine readable and actionable to see which primary keys are being referenced in certain “reformulations” of those IDs in other areas.

For example, and to illustrate the issue: in the relationships tables we have (with samples, for example) sampleIDsubj, relationshipID, and sampleIDobj. The two sampleID fields, for the object and the subject, take a regular sampleID from the samples table. But nowhere in the parts list (except in free text in the description or instructions) do we actually say that.

My suggestion as a possible way to address this is to add a new column to the parts table: fKAliasID. This would then have the value of the actual primary key being referenced in situations where the name is changed, like the above.

An example of the column in practice is found below:

The pros:

  • Succint
  • No major structural changes
  • makes the key linkages explicit
  • simple to implement

The cons:

  • new column
  • new variable (attribute)
  • A column for everything in the parts list but only 21 rows actually need a value in this column (overkill, reminiscent of the ‘short names’ column).

Happy to hear any feedback on this point, particularly interested in your thoughts, @dmanuel and @jeandavidt