icatproject / icat.server

The ICAT server offering both SOAP and "RESTlike" interfaces to a metadata catalog.
Other
1 stars 5 forks source link

Add a pid property to SampleType and change the uniqueness constraint #326

Open RKrahl opened 4 months ago

RKrahl commented 4 months ago

The following proposal for a minor schema change is a result of a discussion with Kirsty Syder, Steve Collins and myself. Credits should go to Steve for bringing it up.

The molecularFormula property in SampleType is not nullable, because it is part of the uniqueness constraint. This is unfortunate because for some samples, maybe even for most, molecularFormula is meaningless. Of course we can work around this by setting something like N/A or :unap to denote "not applicable", but that is probably only the second best solution.

Ideally, the sample type should use a controlled vocabulary, such as an ontology. In this case, we'd want to link any SampleType object with the corresponding term in that vocabulary. Hence, we'd need to add a pid property to do that. Consequently, we should use that pid property also in the uniqueness constraint, which would allow to change molecularFormula to be nullable.

As an interim solution in the absence of any controlled vocabulary for sample types, we could populate the pid attribute with some arbitrary local id that only needs to be unique and is otherwise an opaque string.

spc93 commented 4 months ago

Sounds good! It might be some time before we have PIDs for all salple types.

RKrahl commented 4 months ago

Note that this is partly a duplicate of #239.

RKrahl commented 3 months ago

In order to provide the details, the proposal is to change SampleType as follows:

SampleType

A type of sample

Constraint: pid

Relationships:

Card Class Field
0,* Sample samples

Other fields:

Field Type Description
name String[255] NOT NULL
pid String[255] NOT NULL A persistent identifier attributed to this sample type, ideally referring to a vocabulary term
description String[255] An informal description of the sample type
molecularFormula String[1023] The formula, if applicaple, either as free text string or International Chemical Identifier (InChI) or other standardized form
safetyInformation String [4000] Any safety information related to this type of sample
RKrahl commented 3 months ago

As discussed in the ICAT Schema Discussion on April 2nd and in the collaboration meeting today, this change should be in a version 7.0 release that we aim to make in the second half of this year.